mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
stubdom: Backport fix for SIZE_MAX from newlib 1.17.0
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
78c9b2a64b
commit
adfa96375a
2 files changed
+17
No files matched your search
@@ -101,6 +101,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
|
|||||||
tar xzf $<
|
tar xzf $<
|
||||||
patch -d $@ -p0 < newlib.patch
|
patch -d $@ -p0 < newlib.patch
|
||||||
patch -d $@ -p0 < newlib-chk.patch
|
patch -d $@ -p0 < newlib-chk.patch
|
||||||
|
patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
|
NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
|
||||||
|
|||||||
@@ -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)
|
||||||