zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Remove unsetting _FILE_OFFSET_BITS

Open kraj opened this issue 2 years ago • 3 comments

This does not work when enabling 64bit time_t with glibc which is enabled with -D_TIME_BITS=64, since it also needs _FILE_OFFSET_BITS=64 and this does not work when its undefined explicitly

Signed-off-by: Khem Raj [email protected]

kraj avatar Jan 02 '23 18:01 kraj

What is it that does not work? This #undef is internal to the compilation of the gz code of zlib, where that code does not even use the time() function.

madler avatar Jan 17 '24 23:01 madler

@kraj: Can you look with develop branch?

Neustradamus avatar Jan 23 '24 09:01 Neustradamus

What is it that does not work? This #undef is internal to the compilation of the gz code of zlib, where that code does not even use the time() function.

If you set _TIME_BITS=64 globally (as one should do, given it affects ABI) to opt-in to 64-bit time_t with glibc, its headers will abort if they find _FILE_OFFSET_BITS aren't used too.

thesamesam avatar Jan 24 '24 07:01 thesamesam

The code in gzguts.h is:

#  undef _FILE_OFFSET_BITS
#  undef _TIME_BITS

so, no problem.

madler avatar Jan 25 '24 01:01 madler

Right, fixed with a566e156b3fa07b566ddbf6801b517a9dba04fa3.

thesamesam avatar Jan 25 '24 01:01 thesamesam