summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-02-13 08:26:27 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-02-13 08:26:27 +0000
commit4513d06d5277273e83b1f4e2efc5fedccd02ebb2 (patch)
tree4716cbbc3b8ed75ade2d507a36356ea44684f24a /lib
parent573ae1b51658417be60a4b0f6e694d6a6e1f2a6d (diff)
Pull in z_off64_t handling from upstream
Since we don't define Z_LARGE64, we continue to define z_off64_t to z_off_t and all the other changes are no-ops for OpenBSD. ok kettenis millert
Diffstat (limited to 'lib')
-rw-r--r--lib/libz/zconf.h10
-rw-r--r--lib/libz/zlib.h6
-rw-r--r--lib/libz/zutil.h9
3 files changed, 12 insertions, 13 deletions
diff --git a/lib/libz/zconf.h b/lib/libz/zconf.h
index 30cb9a7b608..0ebaabed7a6 100644
--- a/lib/libz/zconf.h
+++ b/lib/libz/zconf.h
@@ -509,12 +509,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/lib/libz/zlib.h b/lib/libz/zlib.h
index 6fed1b3bfb7..592d453f5fc 100644
--- a/lib/libz/zlib.h
+++ b/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/lib/libz/zutil.h b/lib/libz/zutil.h
index 11b93ebdd79..3b186ef9efc 100644
--- a/lib/libz/zutil.h
+++ b/lib/libz/zutil.h
@@ -170,11 +170,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 */