Make z_size_t unsigned long for non-standard C.

Also declare z_size_t when compiling solo.
This commit is contained in:
Mark Adler 2016-12-31 16:41:36 -08:00
parent cca27e95cf
commit 61b91f27f8
3 changed files with 21 additions and 9 deletions

12
zconf.h
View File

@ -229,13 +229,17 @@
# define z_const # define z_const
#endif #endif
#ifndef Z_SOLO #ifdef Z_SOLO
# define z_longlong long long typedef unsigned long z_size_t;
# ifdef NO_SIZE_T
typedef unsigned NO_SIZE_T z_size_t;
#else #else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h> # include <stddef.h>
typedef size_t z_size_t; typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif # endif
# undef z_longlong # undef z_longlong
#endif #endif

View File

@ -231,13 +231,17 @@
# define z_const # define z_const
#endif #endif
#ifndef Z_SOLO #ifdef Z_SOLO
# define z_longlong long long typedef unsigned long z_size_t;
# ifdef NO_SIZE_T
typedef unsigned NO_SIZE_T z_size_t;
#else #else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h> # include <stddef.h>
typedef size_t z_size_t; typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif # endif
# undef z_longlong # undef z_longlong
#endif #endif

View File

@ -229,13 +229,17 @@
# define z_const # define z_const
#endif #endif
#ifndef Z_SOLO #ifdef Z_SOLO
# define z_longlong long long typedef unsigned long z_size_t;
# ifdef NO_SIZE_T
typedef unsigned NO_SIZE_T z_size_t;
#else #else
# define z_longlong long long
# if defined(NO_SIZE_T)
typedef unsigned NO_SIZE_T z_size_t;
# elif defined(STDC)
# include <stddef.h> # include <stddef.h>
typedef size_t z_size_t; typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif # endif
# undef z_longlong # undef z_longlong
#endif #endif