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] |
On 02/20/2013 08:17 AM, Corinna Vinschen wrote: >> GCC requires exact symmetry of types between ssize_t and size_t. >> I.e. checking for sizes of types is not sufficient for [s]size_t. > > Do you have a code suggestion then? GCC doesn't define ssize_t > by itself, nor in stddef.h except for BeOS. And the only predefines > helping us are > > #define __SIZE_MAX__ 18446744073709551615UL > #define __SIZEOF_INT__ 4 > #define __SIZEOF_LONG__ 8 > #define __SIZEOF_SIZE_T__ 8 > #define __SIZE_TYPE__ long unsigned int There's the key. But how to make gcc tell us the corresponding signed type? Can we write something that relies on __builtin_types_compatible_p? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |