diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-03 17:22:38 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-10-03 17:22:38 +0000 |
commit | 8afb8202d457c054d411988ffd980eea466045a9 (patch) | |
tree | dabd60b918f8444f290ff9b1c355e9dbca0cc75c /newlib/libc | |
parent | 14491fd0e0714d98351f632dbd64d6b6b6e428dd (diff) | |
download | cygnal-8afb8202d457c054d411988ffd980eea466045a9.tar.gz cygnal-8afb8202d457c054d411988ffd980eea466045a9.tar.bz2 cygnal-8afb8202d457c054d411988ffd980eea466045a9.zip |
2005-10-03 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/include/stdint.h: Include <sys/types.h> and
incorporate Ralf's change below.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/sys/linux/include/stdint.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/newlib/libc/sys/linux/include/stdint.h b/newlib/libc/sys/linux/include/stdint.h index e76339ebe..d1197f66c 100644 --- a/newlib/libc/sys/linux/include/stdint.h +++ b/newlib/libc/sys/linux/include/stdint.h @@ -14,6 +14,8 @@ #ifndef _STDINT_H #define _STDINT_H +#include <sys/types.h> + #ifdef __cplusplus extern "C" { #endif @@ -122,14 +124,25 @@ typedef uint64_t uint_least32_t; #endif #endif -#if __have_longlong64 -typedef signed long long intmax_t; -typedef unsigned long long uintmax_t; +/* Greatest-width integer types */ +/* Modern GCCs provide __INTMAX_TYPE__ */ +#if defined(__INTMAX_TYPE__) + typedef __INTMAX_TYPE__ intmax_t; +#elif __have_longlong64 + typedef signed long long intmax_t; #else -typedef signed long intmax_t; -typedef unsigned long uintmax_t; + typedef signed long intmax_t; #endif +/* Modern GCCs provide __UINTMAX_TYPE__ */ +#if defined(__UINTMAX_TYPE__) + typedef __UINTMAX_TYPE__ uintmax_t; +#elif __have_longlong64 + typedef unsigned long long uintmax_t; +#else + typedef unsigned long uintmax_t; +#endif + /* Limits of Specified-Width Integer Types */ #if __int8_t_defined |