[Zlib-devel] zlib short macro names
Cosmin Truta
cosmin at cs.toronto.edu
Sat Sep 17 03:21:54 EDT 2011
On Fri, 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.
Are these still necessary?
> 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.
Z_OF and Z_ON are ok, but _Z_OF and _Z_ON aren't.
All identifiers that begin with an underscore and either an uppercase
letter or another underscore are reserved in C and C++.
Sincerely,
Cosmin
More information about the Zlib-devel
mailing list