[RFC] Reduce namespace pollution on zlib.h

Xin LI delphij at delphij.net
Sat Mar 27 00:26:17 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2010/03/26 17:02, Dag-Erling Smørgrav wrote:
> Xin LI <delphij at delphij.net> writes:
>> The recent zlib import has added some assumption that
>> _LARGEFILE_64_SOURCE is only defined on systems with System V style *64
>> interface.  Moreover, I have added _FILE_OFFSET_BITS = 64 definition
>> into zconf.h so that it would pick up the 64 bit interface properly.
> 
> This is wrong, FreeBSD has native 64-bit stat() etc. and does not need
> _LARGEFILE_WHATEVER.

Yes we do not need that and it just cause compilation errors.

The problem is that some third party software thinks that they need to
define _LARGEFILE64_*, which will break zlib.h on FreeBSD :(

I'm inclined to adopt a solution similar to what Apple (pointed out by
Jkim@) is currently having by disabling the _LARGEFILE64_SOURCE if
__FreeBSD__ is defined.

Cheers,
- -- 
Xin LI <delphij at delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJLrVCbAAoJEATO+BI/yjfBj4AIAMcUAjLIZpNW2sGD0/Z9XLU3
SBevqjvR9iwGANTXOKiB3aofvUygmTfG+8KrxlZTJ51O8vlYgA28eGT0iiDpfoLz
yUtpAN1MIitPp/VtNwHpTpfJcfP+AX060G4MGdxUWCHjoJWhbWMv7OnLbquGdglZ
8bbvQR9EDxm8gM2OT9/b14WOsilYwFBpNlNvxl+Q9d0oWNIi08xWmwvC2aWF7L/6
oTFp2tCKXfi++RCxPU5v+q5SaogKjx1bw612UWvetEhHylcXQpQxqjtyL5WA5IAd
bRYJquOjt3+3mziE0VLlQSQgUSCSYMXls6LqmQSfe3W1sU7wG1rFlZG5BfD/UyM=
=DDry
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list