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

10
zconf.h
View File

@ -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 <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif

View File

@ -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 <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif

View File

@ -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 <stddef.h>
typedef size_t z_size_t;
# else
typedef unsigned long z_size_t;
# endif
# undef z_longlong
#endif