From 31f95eaefbfed9f03346d046621cfbdb3cc68268 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 6 May 2015 16:24:21 +0200 Subject: [PATCH] try to fix build when LONG_MAX not defined --- ext/zip/lib/zipint.h | 7 +++++-- 1 file 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 -- 2.40.0