summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/gzip/ftgzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/gzip/ftgzip.c')
-rw-r--r--src/3rdparty/freetype/src/gzip/ftgzip.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/3rdparty/freetype/src/gzip/ftgzip.c b/src/3rdparty/freetype/src/gzip/ftgzip.c
index 0d6bd34956..6f0c515723 100644
--- a/src/3rdparty/freetype/src/gzip/ftgzip.c
+++ b/src/3rdparty/freetype/src/gzip/ftgzip.c
@@ -40,6 +40,10 @@
#ifdef FT_CONFIG_OPTION_USE_ZLIB
+#ifdef FT_CONFIG_OPTION_PIC
+#error "gzip code does not support PIC yet"
+#endif
+
#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
#include <zlib.h>
@@ -54,7 +58,9 @@
/* original ZLib. */
#define NO_DUMMY_DECL
-#define MY_ZCALLOC
+#ifndef USE_ZLIB_ZCALLOC
+#define MY_ZCALLOC /* prevent all zcalloc() & zfree() in zutils.c */
+#endif
#include "zlib.h"
@@ -117,7 +123,7 @@
}
-#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB
+#if !defined( FT_CONFIG_OPTION_SYSTEM_ZLIB ) && !defined( USE_ZLIB_ZCALLOC )
local voidpf
zcalloc ( voidpf opaque,
@@ -134,7 +140,7 @@
ft_gzip_free( (FT_Memory)opaque, ptr );
}
-#endif /* !SYSTEM_ZLIB */
+#endif /* !SYSTEM_ZLIB && !USE_ZLIB_ZCALLOC */
/***************************************************************************/