]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
[Compat] Don't use uint32_t for z_crc_t
authorMika Lindqvist <postmaster@raasu.org>
Sun, 11 Sep 2022 13:15:10 +0000 (16:15 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 26 Sep 2022 18:10:03 +0000 (20:10 +0200)
* We don't include stdint.h as it must be included before stdarg.h and other headers might include stdarg.h before us

See #1342

zconf.h.in

index c82a8ad009b60998a7b418b1fb888066ba9c8dd6..82ee080321068601a521f33bb462a06ef5022b11 100644 (file)
 #  define ZEXPORTVA Z_EXPORTVA
 #endif
 
-/* Fallback for something that includes us. */
+/* Legacy zlib typedefs for backwards compatibility. Don't assume stdint.h is defined. */
 typedef unsigned char Byte;
 typedef Byte Bytef;
 
@@ -127,7 +127,7 @@ typedef void const *voidpc;
 typedef void       *voidpf;
 typedef void       *voidp;
 
-typedef uint32_t z_crc_t;
+typedef unsigned int z_crc_t;
 
 #ifdef HAVE_UNISTD_H    /* may be set to #if 1 by configure/cmake/etc */
 #  define Z_HAVE_UNISTD_H