[Zlib-devel] zlib short macro names

Mark Adler madler at madler.net
Sun Nov 13 16:30:25 EST 2011


Mike,

I have changed ON to Z_ARG.

While it was probably a bad idea to use a macro named "OF" back in the Late Pleistocene era, I think we're stuck with it now.  Here is an excerpt from a thread discussing the topic:

"Renaming OF breaks numerous packages which depend on this.  I have 12 build
failures due to this change (dev-lang/R, 8 different games, media-video/vlc,
sci-libs/gdal).  If a package uses zlib, it should be aware of the definitions,
so the package which depends on zlib and does not deal with this problem is the
one that is broken (e.g. www-client/lynx)."

Mark


On Sep 16, 2011, at 2:27 PM, Mike Frysinger wrote:
> zlib sets up a few helpers for compatibility with older compilers like "OF" 
> and "ON".  this breaks packages that utilize "OFF" and "ON" already.  while 
> coding style is debatable here with these projects, zlib should be better at 
> not polluting imo.
> 
> rather than using "ON()" and "OF()", how about "_Z_ON()" and "_Z_OF()" ?  the 
> zlib header has already claimed the Z_xxx name space, so this should naturally 
> line up.
> -mike
> _______________________________________________
> 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