]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Drop dead glibc feature-macro juggling from gzguts.h
authorNathan Moin Vaziri <nathan@nathanm.com>
Fri, 17 Apr 2026 06:58:18 +0000 (23:58 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 26 May 2026 15:11:31 +0000 (17:11 +0200)
_LARGEFILE_SOURCE enables fseeko/ftello, which zlib-ng never calls
(gzlib.c uses lseek/lseek64/_lseeki64 directly). The _FILE_OFFSET_BITS
and _TIME_BITS undefs were defensive against a consumer-provided
-D_FILE_OFFSET_BITS=64 leaking into library internals, but they sat
after zbuild.h had already included <stdio.h> so they never affected
system-header sizing. The zlib.h gzopen->gzopen64 remap they were
guarding against is already blocked by the Z_INTERNAL gate for
library builds.

gzguts.h

index 67dc280df7b83d932ed2d27f8efd879051369a24..4064adda63b80cd245fced7ec5c6699751fe5b7b 100644 (file)
--- a/gzguts.h
+++ b/gzguts.h
@@ -5,14 +5,6 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
-#ifdef _LARGEFILE64_SOURCE
-#  ifndef _LARGEFILE_SOURCE
-#    define _LARGEFILE_SOURCE 1
-#  endif
-#  undef _FILE_OFFSET_BITS
-#  undef _TIME_BITS
-#endif
-
 #if defined(HAVE_VISIBILITY_INTERNAL)
 #  define Z_INTERNAL __attribute__((visibility ("internal")))
 #elif defined(HAVE_VISIBILITY_HIDDEN)