From 61b91f27f87f03d67ee5ecfa5fc66b16dd5e3019 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 31 Dec 2016 16:41:36 -0800 Subject: [PATCH] Make z_size_t unsigned long for non-standard C. Also declare z_size_t when compiling solo. --- zconf.h | 10 +++++++--- zconf.h.cmakein | 10 +++++++--- zconf.h.in | 10 +++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/zconf.h b/zconf.h index dc7209a..ca1eb81 100644 --- a/zconf.h +++ b/zconf.h @@ -229,13 +229,17 @@ # define z_const #endif -#ifndef Z_SOLO +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else # define z_longlong long long -# ifdef NO_SIZE_T +# if defined(NO_SIZE_T) typedef unsigned NO_SIZE_T z_size_t; -# else +# elif defined(STDC) # include typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; # endif # undef z_longlong #endif diff --git a/zconf.h.cmakein b/zconf.h.cmakein index 31619f3..27a220b 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -231,13 +231,17 @@ # define z_const #endif -#ifndef Z_SOLO +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else # define z_longlong long long -# ifdef NO_SIZE_T +# if defined(NO_SIZE_T) typedef unsigned NO_SIZE_T z_size_t; -# else +# elif defined(STDC) # include typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; # endif # undef z_longlong #endif diff --git a/zconf.h.in b/zconf.h.in index dc7209a..ca1eb81 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -229,13 +229,17 @@ # define z_const #endif -#ifndef Z_SOLO +#ifdef Z_SOLO + typedef unsigned long z_size_t; +#else # define z_longlong long long -# ifdef NO_SIZE_T +# if defined(NO_SIZE_T) typedef unsigned NO_SIZE_T z_size_t; -# else +# elif defined(STDC) # include typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; # endif # undef z_longlong #endif