summaryrefslogtreecommitdiffstats
path: root/compat/zlib/zutil.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-12 12:14:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-12 12:14:05 (GMT)
commit3b49bdb63ed4510bd593c421340766dbefd41343 (patch)
treed6356c327fb1714a5ed6289cdea672713a8f159c /compat/zlib/zutil.h
parentce8fc8dc1e031e8dd27cd9196f299ecb1e21317f (diff)
parent99221129a93de3d513e2e0453098615f4f25dc2d (diff)
downloadtcl-3b49bdb63ed4510bd593c421340766dbefd41343.zip
tcl-3b49bdb63ed4510bd593c421340766dbefd41343.tar.gz
tcl-3b49bdb63ed4510bd593c421340766dbefd41343.tar.bz2
Merge 8.7
Diffstat (limited to 'compat/zlib/zutil.h')
-rw-r--r--compat/zlib/zutil.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/compat/zlib/zutil.h b/compat/zlib/zutil.h
index b079ea6..d9a20ae 100644
--- a/compat/zlib/zutil.h
+++ b/compat/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