On Sat, Apr 11, 2009 at 07:17:54PM +0100, Dave Korn wrote: >Christopher Faylor wrote: >> On Sat, Apr 11, 2009 at 10:07:36AM +0200, Corinna Vinschen wrote: >>> On Apr 11 04:51, Dave Korn wrote: >>>> Corinna Vinschen wrote: >>>> >>>>> Good point, I guess. So, if we all agree on that, I'd suggest to >>>>> change Dave's patch to the one below. >>>> Two hunks went astray in the adjustment, the fixes for INTPTR_Mxx and >>>> SIZE_MAX still apply because we didn't change their types. >>>> >>>> Also, Joseph just introduced a new testcase in GCC SVN, and it shows up a >>>> problem with our definition of WINT_MAX. >>> What problem exactly? UINT_MAX not defined? >>> >>>> * include/stdint.h (INTPTR_MIN, INTPTR_MAX): Add 'L' suffix. >>>> (WINT_MAX): Add 'U' suffix. >>> Applied. >> >> These are now different than linux. Didn't we want to make them the same? > > If linux doesn't have them matching the types they define, the linux headers >are going to need patching upstream as well. We have > >typedef long intptr_t; > >therefore the constants must be long as well. What does Linux have?
From: http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/libc/sysdeps/generic/stdint.h?rev=1.11&cvsroot=glibc /* Types for `void *' pointers. */ #if __WORDSIZE == 64 # ifndef __intptr_t_defined typedef long int intptr_t; # define __intptr_t_defined # endif typedef unsigned long int uintptr_t; #else # ifndef __intptr_t_defined typedef int intptr_t; # define __intptr_t_defined # endif typedef unsigned int uintptr_t; #endif So the answer is "int". cgf
