Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-25 08:13:49 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-10-25 17:24:05 +0300
commitb1f321538097ee4fac334acf7794d502d6d371fa (patch)
tree748868c3502b50a2379d983a9f0b70b17909a110 /newlib/libc/include/sys
parent4e91600796e9c347d8eb84bf37da7fb20f8503d2 (diff)
Provide __intmax_t and __uintmax_t
Provide __intmax_t and __uintmax_t via <machine/_default_types.h> and define intmax_t and uintmax_t in <sys/_stdint.h> for FreeBSD compatibility. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r--newlib/libc/include/sys/_intsup.h14
-rw-r--r--newlib/libc/include/sys/_stdint.h10
2 files changed, 10 insertions, 14 deletions
diff --git a/newlib/libc/include/sys/_intsup.h b/newlib/libc/include/sys/_intsup.h
index b979d5c4d..88d7400d8 100644
--- a/newlib/libc/include/sys/_intsup.h
+++ b/newlib/libc/include/sys/_intsup.h
@@ -19,20 +19,6 @@
#include <limits.h>
#endif
-/* Check if "long long" is 64bit wide */
-/* Modern GCCs provide __LONG_LONG_MAX__, SUSv3 wants LLONG_MAX */
-#if ( defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ > 0x7fffffff) ) \
- || ( defined(LLONG_MAX) && (LLONG_MAX > 0x7fffffff) )
-#define __have_longlong64 1
-#endif
-
-/* Check if "long" is 64bit or 32bit wide */
-#if __STDINT_EXP(LONG_MAX) > 0x7fffffff
-#define __have_long64 1
-#elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__)
-#define __have_long32 1
-#endif
-
/* Determine how intptr_t and intN_t fastN_t and leastN_t are defined by gcc
for this target. This is used to determine the correct printf() constant in
inttypes.h and other constants in stdint.h.
diff --git a/newlib/libc/include/sys/_stdint.h b/newlib/libc/include/sys/_stdint.h
index 93746b88f..21a14d3ea 100644
--- a/newlib/libc/include/sys/_stdint.h
+++ b/newlib/libc/include/sys/_stdint.h
@@ -63,6 +63,16 @@ typedef __uint64_t uint64_t ;
#define __int64_t_defined 1
#endif /* ___int64_t_defined */
+#ifndef _INTMAX_T_DECLARED
+typedef __intmax_t intmax_t;
+#define _INTMAX_T_DECLARED
+#endif
+
+#ifndef _UINTMAX_T_DECLARED
+typedef __uintmax_t uintmax_t;
+#define _UINTMAX_T_DECLARED
+#endif
+
#ifndef _INTPTR_T_DECLARED
typedef __intptr_t intptr_t;
#define _INTPTR_T_DECLARED