[Zlib-devel] zlib 1.2.6.1

jbowler at acm.org jbowler at acm.org
Mon Feb 13 21:44:28 EST 2012


I tried simply commenting out the #include of <stdlib.h>; the code builds just fine and, so far as I can see, it all works too (all libpng tests, which do exercise zlib, pass).  This is Visual Studio 2010 Professional, "x64" and "Win32" builds of libpng against 1.2.6.1 *totally unconfigured* with Z_SOLO defined.  The build only compiles:

1>  adler32.c
1>  compress.c
1>  crc32.c
1>  deflate.c
1>  infback.c
1>  inffast.c
1>  inflate.c
1>  inftrees.c
1>  trees.c
1>  uncompr.c
1>  zutil.c

I guess <stdlib.h> may be adding definitions of _foo, so warnings may result if <stdlib.h> is left out, but warnings are better than errors if Z_SOLO is defined ;-)

Apart from this issue, I've verified 1.2.6.1 against libpng (the "make check" tests) on:

Windows Cygwin, Min/GW+MSYS [this is very different from a raw Min/GW]

Gentoo linux 3.2.1 kernel, AMD64 processor, Gentoo ~x64, ~amd64 (which means I build unstable, but not totally broken, versions of everything.)

I have rebuilt some things as a result of Gentoo updated but not everything (yet); I haven't detected any binary compatibility issues.  I'll run a complete rebuild now to see if anything that I have installed whines.

John Bowler <jbowler at acm.org>


-----Original Message-----
From: zlib-devel-bounces at madler.net [mailto:zlib-devel-bounces at madler.net] On Behalf Of Steve Snyder
Sent: Monday, February 13, 2012 3:05 PM
To: zlib-devel at zlib.net
Subject: Re: [Zlib-devel] zlib 1.2.6.1


On Monday, February 13, 2012 4:46pm, "Maarten Bosmans" <mkbosmans at gmail.com> said:

> - The function __builtin_bswap32 is not defined in byteswap.h, but is 
> a GCC intrinsic
> 
> byteswap.h does define a bswap_32 function, which could be used in 
> another #elif branch, but the current patch does not provide for that.

That reference to file byteswap.h is a relic of the original patch submission, which included a 16-bit byte swap.  There's no __builtin_* for a 16-bit value, so the older bswap_16() was used.

The older bswap_32 still exists but has been deprecated in favor of __builtin_bswap32.  The newer function doesn't disrupt register allocation through inline assembly like the older function does.



_______________________________________________
Zlib-devel mailing list
Zlib-devel at madler.net
http://mail.madler.net/mailman/listinfo/zlib-devel_madler.net





More information about the Zlib-devel mailing list