summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2015-05-06 16:24:21 +0200
committerRemi Collet <remi@php.net>2015-05-06 16:24:21 +0200
commit31f95eaefbfed9f03346d046621cfbdb3cc68268 (patch)
tree1432bb7fc537d62fa2fd3243c0df8a431d239041
parent9f2ce6b6853787f4a956140a6e71fac957fcdd13 (diff)
downloadphp-git-31f95eaefbfed9f03346d046621cfbdb3cc68268.tar.gz
try to fix build when LONG_MAX not defined
-rw-r--r--ext/zip/lib/zipint.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/zip/lib/zipint.h b/ext/zip/lib/zipint.h
index 40f43af09c..1296025559 100644
--- a/ext/zip/lib/zipint.h
+++ b/ext/zip/lib/zipint.h
@@ -129,9 +129,12 @@ int _zip_mkstemp(char *);
#if defined(HAVE_FTELLO) && defined(HAVE_FSEEKO)
#define ZIP_FSEEK_MAX ZIP_OFF_MAX
#define ZIP_FSEEK_MIN ZIP_OFF_MIN
+#elif SIZEOF_LONG >= 8
+#define ZIP_FSEEK_MAX (zip_int64_t)ZIP_INT64_MAX
+#define ZIP_FSEEK_MIN (zip_int64_t)ZIP_INT64_MIN
#else
-#define ZIP_FSEEK_MAX LONG_MAX
-#define ZIP_FSEEK_MIN LONG_MIN
+#define ZIP_FSEEK_MAX ZIP_INT32_MAX
+#define ZIP_FSEEK_MIN ZIP_INT32_MIN
#endif
#ifndef SIZE_MAX