aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-09-27 11:48:54 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-09-27 11:48:54 +0300
commitdb9119b9181b307e7ac5d2bae82444d04b902b59 (patch)
treee03d515a787180cef07ee1018d3200005eca75c4 /src
parentFix an error in OpenVMS-specific code. (diff)
downloadxz-db9119b9181b307e7ac5d2bae82444d04b902b59.tar.xz
Work around a bug in Interix header files.
Thanks to Markus Duft for the patch.
Diffstat (limited to 'src')
-rw-r--r--src/common/sysdefs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index aa8ddcc2..f89239a0 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -89,6 +89,12 @@
# define UINT64_MAX UINT64_C(18446744073709551615)
#endif
+// Interix has broken header files, which typedef size_t to unsigned long,
+// but a few lines later define SIZE_MAX to INT32_MAX.
+#ifdef __INTERIX
+# undef SIZE_MAX
+#endif
+
// The code currently assumes that size_t is either 32-bit or 64-bit.
#ifndef SIZE_MAX
# if SIZEOF_SIZE_T == 4