This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 17/18] Provide __size_t via <sys/_types.h>


On Apr 14 13:54, Sebastian Huber wrote:
> 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
> 	#endif
> 
> and therefore defines __size_t on Newlib targets which would trash a
> __size_t typedef.  Include <stddef.h> before <sys/_types.h> in
> <sys/types.h> and undefine __size_t in <sys/_types.h> as a workaround.

What about GCC upstream?  Why are they doing that in the first place?
What sense does it make to set __size_t to nothing, rather than setting
it to __SIZE_TYPE__?

Did you ask on the gcc list?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]