On Fri, Apr 15, 2016 at 11:44 AM, Sebastian Huber
<sebastian.huber@xxxxxxxxxxxxxxxxxx> wrote:
>I work currently on a better FreeBSD compatibility for Newlib. For
>RTEMS we use the network, USB, SD/MMC stacks from FreeBSD. It would be
>nice to use <sys/types.h>, etc. from Newlib directly to compile FreeBSD
>user and kernel space files.
>
>Various FreeBSD source and header files need a typedef __size_t via
><sys/_types.h>. Unfortunately the GCC provided <stddef.h> uses
>
> #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
> || defined(__DragonFly__) \
> || defined(__FreeBSD_kernel__)
> /* __size_t is a typedef on FreeBSD 5, must not trash it. */
> #elif defined (__VMS__)
> /* __size_t is also a typedef on VMS. */
> #else
> #define __size_t
This looks odd - maybe it was meant to be a #undef? OTOH there are
a whole lot of other similar cases there which do not make sense to me...