[Zlib-devel] [PATCH] Check on _LARGEFILE64_SOURCE and friends are too strict

Xin LI delphij at gmail.com
Thu Apr 1 17:11:01 EDT 2010


On Thu, Apr 1, 2010 at 1:51 PM, John Bowler <jbowler at frontiernet.net> wrote:
> I said something which is wrong:
>
> From: John Bowler [mailto:jbowler at frontiernet.net]
>>a defined but empty pp-token is evaluated as "1"
>
> I should have said a definition on the command line, e.g. -D_LARGEFILE64_SOURCE, defines the macro as "1", but if it's explicitly defined as empty:
>
> #define _LARGEFILE64_SOURCE
>
> Something like:
>
> #if _LARGEFILE64_SOURCE
>
> Will generate an error.  We know that doesn't happen, however, because the current contents of zlib.h wouldn't work if _LARGEFILE64_SOURCE was #defined as empty either.

Well, this do happen unfortunately.

For example gpac (http://gpac.sourceforge.net/).  Is there any
standard requiring _LARGEFILE64_SOURCE to be defined as a number?
According to my reading of GNU libc's manual it doesn't seem to be the
case...

Cheers,
-- 
Xin LI <delphij at delphij.net> http://www.delphij.net




More information about the Zlib-devel mailing list