[Zlib-devel] #elif is not portable on pre-ANSI compilers

Mark Adler mark.adler at quest.jpl.nasa.gov
Wed Apr 16 16:25:02 EDT 2003


On Wednesday, April 16, 2003, at 12:51  PM, Cosmin Truta wrote:
> My understanding is that the code works if u4 holds _at_least_ 32 
> bits, and not only if it holds _exactly_ 32 bits.

No, u4 has to be exactly 32 bits.  A u4 * pointer is used which must 
increment four bytes at a time.

Anyway, you're right--#elif won't necessarily work, even inside an 
#ifdef __STDC__.  I'll get rid of them.

mark





More information about the Zlib-devel mailing list