summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/gzip/ftgzip.c
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2021-06-25 22:34:30 +0200
committerLiang Qi <liang.qi@qt.io>2021-08-16 17:26:29 +0000
commitcfa631e0fb5d78aac80cb580eb092fafa1cd9a8f (patch)
tree1484d99daec3f6d405f30f7aa933ebcc32aa4187 /src/3rdparty/freetype/src/gzip/ftgzip.c
parentd4015a21a4b7bfc1fb982ecfae1b25d1b21a5005 (diff)
Update bundled Freetype to 2.10.4
Removed everything, imported with help of import_from_tarball.sh script, and then added a pre-generated builds/unix/ftconfig.h This also amends 58f56950848bae9c90da3873090c7698e0128b12 because it is not a clean update, some old files are still there. Also redo the fix for wasm like 30f4ca4e4fbc1d8cf86808dbeb00ec3c046f6c1c. Fixes: QTBUG-82480 Pick-to: 6.2 Change-Id: I45ee3230299908ca0372e035636dd64b6c549a27 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/src/gzip/ftgzip.c')
-rw-r--r--src/3rdparty/freetype/src/gzip/ftgzip.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/3rdparty/freetype/src/gzip/ftgzip.c b/src/3rdparty/freetype/src/gzip/ftgzip.c
index 5e78bc6f8d..de7d0fdd5b 100644
--- a/src/3rdparty/freetype/src/gzip/ftgzip.c
+++ b/src/3rdparty/freetype/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
* parse compressed PCF fonts, as found with many X11 server
* distributions.
*
- * Copyright (C) 2002-2019 by
+ * Copyright (C) 2002-2020 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,15 +20,14 @@
*/
-#include <ft2build.h>
-#include FT_INTERNAL_MEMORY_H
-#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_GZIP_H
+#include <freetype/internal/ftmemory.h>
+#include <freetype/internal/ftstream.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftgzip.h>
#include FT_CONFIG_STANDARD_LIBRARY_H
-#include FT_MODULE_ERRORS_H
+#include <freetype/ftmoderr.h>
#undef FTERRORS_H_
@@ -36,7 +35,7 @@
#define FT_ERR_PREFIX Gzip_Err_
#define FT_ERR_BASE FT_Mod_Err_Gzip
-#include FT_ERRORS_H
+#include <freetype/fterrors.h>
#ifdef FT_CONFIG_OPTION_USE_ZLIB
@@ -746,7 +745,17 @@
stream.zfree = (free_func) ft_gzip_free;
stream.opaque = memory;
+ /* This is a temporary fix and will be removed once the internal
+ * copy of zlib is updated to the newest version. The `|32' flag
+ * is only supported in the new versions of zlib to enable gzip
+ * encoded header.
+ */
+#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
err = inflateInit2( &stream, MAX_WBITS|32 );
+#else
+ err = inflateInit2( &stream, MAX_WBITS );
+#endif
+
if ( err != Z_OK )
return FT_THROW( Invalid_Argument );