debuggers.hg

changeset 20161:49bfec374baf

stubdom: Backport fix for SIZE_MAX from newlib 1.17.0

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Aug 25 16:26:02 2009 +0100 (2009-08-25)
parents 8faef78ea759
children 71389988f5d4
files stubdom/Makefile stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch
line diff
     1.1 --- a/stubdom/Makefile	Tue Aug 25 15:36:37 2009 +0100
     1.2 +++ b/stubdom/Makefile	Tue Aug 25 16:26:02 2009 +0100
     1.3 @@ -101,6 +101,7 @@ newlib-$(NEWLIB_VERSION): newlib-$(NEWLI
     1.4  	tar xzf $<
     1.5  	patch -d $@ -p0 < newlib.patch
     1.6  	patch -d $@ -p0 < newlib-chk.patch
     1.7 +	patch -d $@ -p1 < newlib-stdint-size_max-fix-from-1.17.0.patch
     1.8  	touch $@
     1.9  
    1.10  NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch	Tue Aug 25 16:26:02 2009 +0100
     2.3 @@ -0,0 +1,16 @@
     2.4 +--- newlib-1.16.0/newlib/libc/include/stdint.h.orig	2006-08-17 00:39:43.000000000 +0300
     2.5 ++++ newlib-1.16.0/newlib/libc/include/stdint.h	2009-08-25 17:33:23.000000000 +0300
     2.6 +@@ -348,8 +348,11 @@
     2.7 + #endif
     2.8 + 
     2.9 + /* This must match size_t in stddef.h, currently long unsigned int */
    2.10 +-#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L)
    2.11 +-#define SIZE_MAX __STDINT_EXP(LONG_MAX)
    2.12 ++#ifdef __SIZE_MAX__
    2.13 ++#define SIZE_MAX __SIZE_MAX__
    2.14 ++#else
    2.15 ++#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)
    2.16 ++#endif
    2.17 + 
    2.18 + /* This must match sig_atomic_t in <signal.h> (currently int) */
    2.19 + #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)