]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix z_size_t definition:
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sun, 14 May 2023 20:02:25 +0000 (22:02 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Tue, 16 May 2023 08:28:28 +0000 (10:28 +0200)
- Zlib Compat: Move definition of z_size_t to zconf.h, so it is exported to applications.
               Always defined as size_t to follow zlib 1.2.13 behavior with STDC compilers.
- Zlib-NG: Keeps internal definition of z_size_t in zbuild.h

zbuild.h
zconf.h.in

index 27f784a99f152fe866880e799283d32ca8e95a0a..525a34d8d8452200aec74af90a7b5623fc8f09f5 100644 (file)
--- a/zbuild.h
+++ b/zbuild.h
 #  define PREFIX3(x) z_ ## x
 #  define PREFIX4(x) x ## 64
 #  define zVersion zlibVersion
-#  if defined(_WIN64)
-#    define z_size_t unsigned __int64
-#  else
-#    define z_size_t unsigned long
-#  endif
 #else
 #  define PREFIX(x) zng_ ## x
 #  define PREFIX2(x) ZLIBNG_ ## x
index 765e9c4e47308a6e2cf6fa340bbf9e5e1a1ec946..18c405e8f7032a4bf3fa3079d5fe82a5ed943a64 100644 (file)
@@ -25,6 +25,8 @@
 #  define z_const
 #endif
 
+typedef size_t z_size_t;
+
 /* Maximum value for memLevel in deflateInit2 */
 #ifndef MAX_MEM_LEVEL
 #  define MAX_MEM_LEVEL 9