aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-25 16:26:02 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-25 16:26:02 +0100
commitadfa96375adb65a8c0d4bb7f6e186c63b8a123a7 (patch)
tree7f01089981bd9f97879e04576c2b304c7062020a /stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch
parent78c9b2a64b38ee72cc4d3ea9e93a1a5d224ed822 (diff)
downloadxen-adfa96375adb65a8c0d4bb7f6e186c63b8a123a7.tar.gz
xen-adfa96375adb65a8c0d4bb7f6e186c63b8a123a7.tar.bz2
xen-adfa96375adb65a8c0d4bb7f6e186c63b8a123a7.zip
stubdom: Backport fix for SIZE_MAX from newlib 1.17.0
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch')
-rw-r--r--stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch b/stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch
new file mode 100644
index 0000000000..1054a07ddd
--- /dev/null
+++ b/stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch
@@ -0,0 +1,16 @@
+--- newlib-1.16.0/newlib/libc/include/stdint.h.orig 2006-08-17 00:39:43.000000000 +0300
++++ newlib-1.16.0/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)