summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-02-13 08:26:57 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-02-13 08:26:57 +0000
commitb1282e78621118c0704d43b339f4f597407cc4da (patch)
treebdd002233ccecbfe2e6ac629230bd0df9b451749
parent4513d06d5277273e83b1f4e2efc5fedccd02ebb2 (diff)
zlib: sync with base
-rw-r--r--sys/lib/libz/zconf.h10
-rw-r--r--sys/lib/libz/zlib.h6
-rw-r--r--sys/lib/libz/zutil.h9
3 files changed, 12 insertions, 13 deletions
diff --git a/sys/lib/libz/zconf.h b/sys/lib/libz/zconf.h
index 973c03088c9..b3c057c4f12 100644
--- a/sys/lib/libz/zconf.h
+++ b/sys/lib/libz/zconf.h
@@ -513,12 +513,12 @@ typedef uLong FAR uLongf;
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
+#elif defined(_WIN32) && !defined(__GNUC__)
+# define z_off64_t __int64
+#elif defined(__GO32__)
+# define z_off64_t offset_t
#else
-# if defined(_WIN32) && !defined(__GNUC__)
-# define z_off64_t __int64
-# else
-# define z_off64_t z_off_t
-# endif
+# define z_off64_t z_off_t
#endif
/* MVS linker does not support external names larger than 8 bytes */
diff --git a/sys/lib/libz/zlib.h b/sys/lib/libz/zlib.h
index 2844c3e17b3..493d5202188 100644
--- a/sys/lib/libz/zlib.h
+++ b/sys/lib/libz/zlib.h
@@ -1891,9 +1891,9 @@ ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
- ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
- ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
- ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
# endif
#else
ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
diff --git a/sys/lib/libz/zutil.h b/sys/lib/libz/zutil.h
index 10018086f8a..583354ed14f 100644
--- a/sys/lib/libz/zutil.h
+++ b/sys/lib/libz/zutil.h
@@ -184,11 +184,10 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
/* provide prototypes for these when building zlib without LFS */
-#if !defined(_WIN32) && \
- (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
- ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
- ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
- ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
+#ifndef Z_LARGE64
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
#endif
/* common defaults */