summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-virtualization/recipes-extended/xen/files/newlib-stdint-size_max-fix-from-1.17.0.patch
blob: 3610d646d2e88696e812a31683cd83a2ff0ebe7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/newlib/libc/include/stdint.h.orig	2006-08-17 00:39:43.000000000 +0300
+++ b/newlib/libc/include/stdint.h	2009-08-25 17:33:23.000000000 +0300
@@ -348,8 +348,11 @@
 #endif
 
 /* This must match size_t in stddef.h, currently long unsigned int */
-#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
-#define SIZE_MAX __STDINT_EXP(LONG_MAX)
+#ifdef __SIZE_MAX__
+#define SIZE_MAX __SIZE_MAX__
+#else
+#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
+#endif
 
 /* This must match sig_atomic_t in <signal.h> (currently int) */
 #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
OpenPOWER on IntegriCloud