[zlib] Don't typedef `ptrdiff_t`. While using zlib in 'solo' mode (via the `Z_SOLO` macro), we actually include some standard header files, making the typedef fail on systems where the native `ptrdiff_t` type differs. Fixes #1124. * src/zlib/zutil.h: Comment out definition; it doesn't work on Windows. * src/zlib/patches/freetype-zlib.diff: Updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/src/gzip/patches/freetype-zlib.diff b/src/gzip/patches/freetype-zlib.diff
index 43fb5d6..90dd6c8 100644
--- a/src/gzip/patches/freetype-zlib.diff
+++ b/src/gzip/patches/freetype-zlib.diff
@@ -350,10 +350,20 @@ index f09cdaf1e..1807c0645 100644
#ifdef __cplusplus
}
diff --git b/src/gzip/zutil.h a/src/gzip/zutil.h
-index b079ea6a8..a38573878 100644
+index b079ea6a8..2d734a835 100644
--- b/src/gzip/zutil.h
+++ a/src/gzip/zutil.h
-@@ -185,6 +185,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+@@ -30,7 +30,9 @@
+ #endif
+
+ #ifdef Z_SOLO
++# ifndef Z_FREETYPE
+ typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
++# endif
+ #endif
+
+ #ifndef local
+@@ -185,6 +187,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#pragma warn -8066
#endif
@@ -362,7 +372,7 @@ index b079ea6a8..a38573878 100644
/* provide prototypes for these when building zlib without LFS */
#if !defined(_WIN32) && \
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-@@ -192,6 +194,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+@@ -192,6 +196,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
#endif
@@ -371,7 +381,7 @@ index b079ea6a8..a38573878 100644
/* common defaults */
#ifndef OS_CODE
-@@ -223,9 +227,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
+@@ -223,9 +229,9 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemcmp _fmemcmp
# define zmemzero(dest, len) _fmemset(dest, 0, len)
# else
diff --git a/src/gzip/zutil.h b/src/gzip/zutil.h
index a385738..2d734a8 100644
--- a/src/gzip/zutil.h
+++ b/src/gzip/zutil.h
@@ -30,7 +30,9 @@
#endif
#ifdef Z_SOLO
+# ifndef Z_FREETYPE
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
+# endif
#endif
#ifndef local