From: Daniel S. Lewart Date: Mon, 6 Sep 1999 21:18:12 +0000 (-0500) Subject: HP-UX 10.20 and gcc 2.8.1 break UINT32_MAX. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=716026f96c8d48603497e3610163f08d8c9aeae6;p=p5sagit%2Fp5-mst-13.2.git HP-UX 10.20 and gcc 2.8.1 break UINT32_MAX. To: perl5-porters@perl.org Subject: [ID 19990906.007] Not OK: perl 5.00561 on PA-RISC1.1 10.20 Message-Id: <199909070218.VAA29232@www.cvm.uiuc.edu> p4raw-id: //depot/cfgperl@4096 --- diff --git a/hints/hpux.sh b/hints/hpux.sh index eb9b685..8b2023a 100644 --- a/hints/hpux.sh +++ b/hints/hpux.sh @@ -192,6 +192,11 @@ case "$ldlibpthname" in '') ldlibpthname=SHLIB_PATH ;; esac +# HP-UX 10.20 and gcc 2.8.1 break UINT32_MAX. +case "$cc" in +*gcc*) ccflags="$ccflags -DUINT32_MAX_BROKEN" ;; +esac + # Date: Fri, 6 Sep 96 23:15:31 CDT # From: "Daniel S. Lewart" # I looked through the gcc.info and found this: diff --git a/perl.h b/perl.h index 5691723..64b349a 100644 --- a/perl.h +++ b/perl.h @@ -1018,7 +1018,11 @@ Free_t Perl_mfree (Malloc_t where); # if defined(INT32_MAX) && LONGSIZE == 4 # define IV_MAX INT32_MAX # define IV_MIN INT32_MIN -# define UV_MAX UINT32_MAX +# ifndef UINT32_MAX_BROKEN /* e.g. HP-UX with gcc messes this up */ +# define UV_MAX UINT32_MAX +# else +# define UV_MAX 4294967295U +# endif # ifndef UINT32_MIN # define UINT32_MIN 0 # endif