summaryrefslogtreecommitdiff
path: root/zconf.h.in
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2013-03-23 22:27:43 -0700
committerMark Adler <madler@alumni.caltech.edu>2013-03-23 22:30:09 -0700
commit03ff48cc67937fbb026a7952c0351615ef9be4e5 (patch)
tree3050209fccaad5c9f29f9495f053f9dacde92d6f /zconf.h.in
parent66fcefbb2fb867f3f941b71140532de8593f29d6 (diff)
downloadzlib-03ff48cc67937fbb026a7952c0351615ef9be4e5.tar.gz
Remove runtime check in configure for four-byte integer type.
That didn't work when cross-compiling. Simply rely on limits.h. If a compiler does not have limits.h, then zconf.h.in should be modified to define Z_U4 as an unsiged four-byte integer type in order for crc32() to be fast. This also simplifies and makes more portable to check for a four- byte type using limits.h.
Diffstat (limited to 'zconf.h.in')
-rw-r--r--zconf.h.in16
1 files changed, 5 insertions, 11 deletions
diff --git a/zconf.h.in b/zconf.h.in
index 95c9ef6..c6ec884 100644
--- a/zconf.h.in
+++ b/zconf.h.in
@@ -390,20 +390,14 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-/* ./configure may #define Z_U4 here */
-
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
# include <limits.h>
-# if (UINT_MAX == 0xffffffffUL)
+# if (UINT_MAX == 4294967295)
# define Z_U4 unsigned
-# else
-# if (ULONG_MAX == 0xffffffffUL)
-# define Z_U4 unsigned long
-# else
-# if (USHRT_MAX == 0xffffffffUL)
-# define Z_U4 unsigned short
-# endif
-# endif
+# elif (ULONG_MAX == 4294967295)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 4294967295)
+# define Z_U4 unsigned short
# endif
#endif