summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hints/hpux.sh5
-rw-r--r--perl.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/hints/hpux.sh b/hints/hpux.sh
index eb9b6856e7..8b2023aa81 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" <d-lewart@uiuc.edu>
# I looked through the gcc.info and found this:
diff --git a/perl.h b/perl.h
index 5691723b49..64b349ad27 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