aboutsummaryrefslogtreecommitdiff
path: root/lib/zlib/zutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zlib/zutil.h')
-rw-r--r--lib/zlib/zutil.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/zlib/zutil.h b/lib/zlib/zutil.h
index a5856f8..86b5f49 100644
--- a/lib/zlib/zutil.h
+++ b/lib/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
*/
@@ -13,11 +13,7 @@
#ifndef ZUTIL_H
#define ZUTIL_H
-/*
- XXX: Not original zlib source code. The definition of ZLIB_INTRENAL
- was changed by David Oberhollenzer for use in in libsquashfs.
- */
-#if (defined(__GNUC__) || defined(__clang__)) && !defined(_WIN32)
+#ifdef HAVE_HIDDEN
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
@@ -33,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
@@ -50,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
+
/*
XXX: Not original zlib source code. The visibility of z_errmsg was changed
to internal by David Oberhollenzer for use in in libsquashfs.
@@ -178,10 +181,6 @@ extern ZLIB_INTERNAL z_const char * const z_errmsg[10]; /* indexed by 2-zlib_err
#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