From 3f8c768745e85d0e63ba306581710c6dc9db0d65 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 4 Dec 2016 16:50:49 -0800 Subject: [PATCH] Fix compile option for when z_size_t needs to be a long long. --- configure | 2 +- zconf.h | 2 ++ zconf.h.cmakein | 2 ++ zconf.h.in | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure b/configure index f60585b..c4fee2e 100755 --- a/configure +++ b/configure @@ -491,7 +491,7 @@ EOF int main(void) { if (sizeof(void *) <= sizeof(int)) puts("int"); else if (sizeof(void *) <= sizeof(long)) puts("long"); - else puts("long long"); + else puts("z_longlong"); return 0; } EOF diff --git a/zconf.h b/zconf.h index 2c22d32..ca12b79 100644 --- a/zconf.h +++ b/zconf.h @@ -225,6 +225,7 @@ #endif #ifndef Z_SOLO +# define z_longlong long long # ifdef NO_SIZE_T typedef unsigned NO_SIZE_T z_size_t; # else @@ -237,6 +238,7 @@ # include typedef ssize_t z_ssize_t; # endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ diff --git a/zconf.h.cmakein b/zconf.h.cmakein index 662fc3d..efd91f7 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -227,6 +227,7 @@ #endif #ifndef Z_SOLO +# define z_longlong long long # ifdef NO_SIZE_T typedef unsigned NO_SIZE_T z_size_t; # else @@ -239,6 +240,7 @@ # include typedef ssize_t z_ssize_t; # endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */ diff --git a/zconf.h.in b/zconf.h.in index 2c22d32..ca12b79 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -225,6 +225,7 @@ #endif #ifndef Z_SOLO +# define z_longlong long long # ifdef NO_SIZE_T typedef unsigned NO_SIZE_T z_size_t; # else @@ -237,6 +238,7 @@ # include typedef ssize_t z_ssize_t; # endif +# undef z_longlong #endif /* Maximum value for memLevel in deflateInit2 */