diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-03-24 11:05:46 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-03-24 15:51:14 +0100 |
commit | db5bfdbd8ab2729a95c95638fbcc1db8cbfef162 (patch) | |
tree | c44bf58a1b3f99a45ee09d8e5e85bacf0feec833 /newlib/libc | |
parent | 08fdddea3d2a170f5476ad296d9b73bcf2948471 (diff) | |
download | cygnal-db5bfdbd8ab2729a95c95638fbcc1db8cbfef162.tar.gz cygnal-db5bfdbd8ab2729a95c95638fbcc1db8cbfef162.tar.bz2 cygnal-db5bfdbd8ab2729a95c95638fbcc1db8cbfef162.zip |
Define BSD u_intN_t types indiscriminately
The u_intN_t types are BSD types but sanctioned by POSIX. They are
always defined when using Glibc headers so we follow suit.
newlib:
* libc/include/sys/types.h: Drop outdated __INTTYPES_DEFINED__
macro. Always define u_intN_t types.
cygwin:
* include/cygwin/types.h: Remove definition of u_intN_t types.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/include/sys/types.h | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index feea7af05..ebed1c010 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -18,21 +18,12 @@ #ifndef _SYS_TYPES_H #include <_ansi.h> -# include <sys/cdefs.h> - -#ifndef __INTTYPES_DEFINED__ -#define __INTTYPES_DEFINED__ - +#include <sys/cdefs.h> #include <machine/_types.h> -#if defined(__rtems__) || defined(__XMK__) -/* - * The following section is RTEMS specific and is needed to more - * closely match the types defined in the BSD sys/types.h. - * This is needed to let the RTEMS/BSD TCP/IP stack compile. - */ - -/* deprecated */ +/* BSD types permitted by POSIX and always exposed as in Glibc. Only provided + for backward compatibility with BSD code. The uintN_t standard types should + be preferred in new code. */ #if ___int8_t_defined typedef __uint8_t u_int8_t; #endif @@ -42,19 +33,25 @@ typedef __uint16_t u_int16_t; #if ___int32_t_defined typedef __uint32_t u_int32_t; #endif - #if ___int64_t_defined typedef __uint64_t u_int64_t; +#endif + +#if defined(__rtems__) || defined(__XMK__) +/* + * The following section is RTEMS specific and is needed to more + * closely match the types defined in the BSD sys/types.h. + * This is needed to let the RTEMS/BSD TCP/IP stack compile. + */ /* deprecated */ +#if ___int64_t_defined typedef __uint64_t u_quad_t; typedef __int64_t quad_t; typedef quad_t * qaddr_t; #endif -#endif - -#endif /* ! __INTTYPES_DEFINED */ +#endif /* __rtems__ || __XMK__ */ #ifndef __need_inttypes |