diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2022-03-31 16:17:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-31 16:17:35 +0200 |
| commit | fda87d4a89f83c587dd31aa37e1d662d367b1469 (patch) | |
| tree | e51bfa32dad01cb951dd12ce9e1bb0c6d72baa63 /thirdparty/zlib/zutil.h | |
| parent | b0df742cbe1c81feeb3b5e4a95cecbfabb2fe8f8 (diff) | |
| parent | 420d0d50bcdc47c793157c2f1e143136eafa6500 (diff) | |
Merge pull request #59735 from akien-mga/zlib-1.2.12
Diffstat (limited to 'thirdparty/zlib/zutil.h')
| -rw-r--r-- | thirdparty/zlib/zutil.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/thirdparty/zlib/zutil.h b/thirdparty/zlib/zutil.h index b079ea6a80..d9a20ae1bf 100644 --- a/thirdparty/zlib/zutil.h +++ b/thirdparty/zlib/zutil.h @@ -1,5 +1,5 @@ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler + * Copyright (C) 1995-2022 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -29,10 +29,6 @@ # include <stdlib.h> #endif -#ifdef Z_SOLO - typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ -#endif - #ifndef local # define local static #endif @@ -46,6 +42,17 @@ typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; +#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC) +# include <limits.h> +# if (ULONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long +# elif (ULLONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long long +# elif (UINT_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned +# endif +#endif + extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ @@ -170,10 +177,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ -# ifndef _PTRDIFF_T_DEFINED - typedef int ptrdiff_t; -# define _PTRDIFF_T_DEFINED -# endif # else # define fdopen(fd,type) _fdopen(fd,type) # endif |