From 0eeb9ec115ce14f17b9384ff08dfa208cd0046dd Mon Sep 17 00:00:00 2001 From: Nathan Moin Vaziri Date: Thu, 16 Apr 2026 23:58:18 -0700 Subject: [PATCH] Drop dead glibc feature-macro juggling from gzguts.h _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 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 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gzguts.h b/gzguts.h index 67dc280df..4064adda6 100644 --- 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) -- 2.47.3