]> git.lizzy.rs Git - zlib.git/commit
Avoid library header include in crc32.c for Z_SOLO.
authorMark Adler <madler@alumni.caltech.edu>
Thu, 2 Feb 2012 07:47:47 +0000 (23:47 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 2 Feb 2012 07:55:29 +0000 (23:55 -0800)
commitf9e4edc99629ae10e3cfd7091a4742e4e4e2dbec
tree096cbe47ab33ee0303add997657f8d891eef9210
parent55b8b5fec16503cb9ce26074f600a1d7b426a0cc
Avoid library header include in crc32.c for Z_SOLO.

crc32.c was #including limits.h in order to find a four-byte integer
type.  It was doing this even if Z_SOLO were defined, violating the
intent of Z_SOLO, which is to include no library headers and require
no library functions.  Now crc32.c obeys the intent of Z_SOLO, but
with the downside that crc32() will be slower than when not compiled
with Z_SOLO.  This can be remedied manually by typedefing u4 to a
known four-byte unsigned integer type, and #defining BYFOUR in
crc32.c.
crc32.c