readlink.c compiling failed because of size_t

Joel Sherrill joel.sherrill at oarcorp.com
Wed Apr 25 19:02:45 UTC 2007


ray wrote:
> compiling failed in /cpukit/libcsupport/src/readlink.c
> type mismatch for:
>
> int readlink(
>   const char *pathname,
>   char       *buf,
>   int         bufsize
> )
>
> This function declare in include/sys/unistd.h
>
> ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
>
> it seems the size_t had changed in the new tool chain.  and I change readlink in /cpukit/libcsupport/src/readlink.c to
> ssize_t readlink(
>   const char *pathname,
>   char       *buf,
>   size_t     bufsize
> )
> Then everything is fine.
>
> I am using:
> gcc-4.2 with patch gcc-core-4.2-20070221-rtems4.8-20070228.diff
> newlib-1.15.0 with patch newlib-1.15.0-rtems4.8-20070413.diff
> Target is arm-rtems4.8
>
> What might cause this?
>
>   
Your RTEMS does not match your toolset.  Your newlib patch is
dated 13 April and Ralf committed a change to readlink on 14 April
to make the 3rd argument a size_t.

You are on the edge and slipped off briefly. :)

--joel
> --------------
> Thanks & Best Regards!
> ray
> 2007-04-26
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list