[Zlib-devel] [PATCH] Avoid testing _LARGEFILE_64_SOURCE and _FILE_OFFSET_BITS directly

Mark Brown broonie at sirena.org.uk
Fri Mar 26 16:06:22 EDT 2010


On Fri, Mar 26, 2010 at 12:59:44PM -0700, Xin LI wrote:
> On Fri, Mar 26, 2010 at 12:32 PM, Mark Brown <broonie at sirena.org.uk> wrote:

> > Your MUA appears to have encoded this as a binary file which isn't
> > helpful for quoting - you might want to look at your MUA configuration.
> > Anyway...

> I have put a copy of the patch here for your convenience:

Sure, I viewed the attachment - the point is that it can't be
quote-replied so easily.

> > _FILE_OFFSET_BITS is not defined by the platform. ??This is something
> > that can be defined during compilation to force off_t to be whatever the
> > value is, boiling down to a noop if off_t is 64 bit anyway.

> Or perhaps during zlib's ./configure?  I think once zlib binary has
> been built, the zlib.h (zconf.h actually) installed together with it
> should be somewhat "fixed configuration" instead of depending system
> headers or arbitrary user-defined macros.

Sadly they're not intended to be fixed at system build time, the
intended use is dynamic at application compile time.

> Note that _FILE_OFFSET_BITS nor _LARGEFILE_64_SOURCE are part of LFS
> and is not supposed to appear on any operating systems other than
> Linux, thus, portable programs should not depend on these macros
> unconditionally IMHO.

They're not Linux specific, they're also supported on some other
operating systems that have done the same transition - Solaris is one
IIRC.  I'm pretty sure they come from SuS originally but I'd have to go
check.




More information about the Zlib-devel mailing list