Don't redefine INT32_MAX

This commit is contained in:
Bill Fenner 2002-04-09 06:10:54 +00:00
parent 8c457db7ca
commit b14f5cee7c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=57480
2 changed files with 34 additions and 0 deletions

View File

@ -9,3 +9,20 @@
#undef HAVE_MATHERR
#undef HAVE_MKFIFO
#undef HAVE_REMOVE
@@ -257,12 +257,16 @@
#if INT_MAX == 2147483647
typedef int int32;
typedef unsigned unsigned32;
+# ifndef INT32_MAX
# define INT32_MAX INT_MAX
+# endif
#else
# if LONG_MAX == 2147483647
typedef long int int32;
typedef unsigned long unsigned32;
+# ifndef INT32_MAX
# define INT32_MAX LONG_MAX
+# endif
# else
# error I cannot figure out how to express a 32-bit integer on your machine.
# endif

View File

@ -9,3 +9,20 @@
#undef HAVE_MATHERR
#undef HAVE_MKFIFO
#undef HAVE_REMOVE
@@ -257,12 +257,16 @@
#if INT_MAX == 2147483647
typedef int int32;
typedef unsigned unsigned32;
+# ifndef INT32_MAX
# define INT32_MAX INT_MAX
+# endif
#else
# if LONG_MAX == 2147483647
typedef long int int32;
typedef unsigned long unsigned32;
+# ifndef INT32_MAX
# define INT32_MAX LONG_MAX
+# endif
# else
# error I cannot figure out how to express a 32-bit integer on your machine.
# endif