summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/patches
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-03-23 09:18:55 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-03-23 09:18:55 (GMT)
commite5fcad302d86d316390c6b0f62759a067313e8a9 (patch)
treec2afbf6f1066b6ce261f14341cf6d310e5595bc1 /src/3rdparty/patches
downloadQt-e5fcad302d86d316390c6b0f62759a067313e8a9.zip
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.gz
Qt-e5fcad302d86d316390c6b0f62759a067313e8a9.tar.bz2
Long live Qt 4.5!
Diffstat (limited to 'src/3rdparty/patches')
-rw-r--r--src/3rdparty/patches/freetype-2.3.5-config.patch265
-rw-r--r--src/3rdparty/patches/freetype-2.3.6-ascii.patch174
-rw-r--r--src/3rdparty/patches/libjpeg-6b-config.patch50
-rw-r--r--src/3rdparty/patches/libmng-1.0.10-endless-loop.patch65
-rw-r--r--src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch17
-rw-r--r--src/3rdparty/patches/libtiff-3.8.2-config.patch374
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-config.patch38
-rw-r--r--src/3rdparty/patches/sqlite-3.5.6-wince.patch19
-rw-r--r--src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch433
9 files changed, 1435 insertions, 0 deletions
diff --git a/src/3rdparty/patches/freetype-2.3.5-config.patch b/src/3rdparty/patches/freetype-2.3.5-config.patch
new file mode 100644
index 0000000..2653467
--- /dev/null
+++ b/src/3rdparty/patches/freetype-2.3.5-config.patch
@@ -0,0 +1,265 @@
+--- builds/unix/ftconfig.h 1970-01-01 01:00:00.000000000 +0100
++++ builds/unix/ftconfig.h 2007-07-15 00:00:00.000000000 +0200
+@@ -0,0 +1,262 @@
++/* ftconfig.h. Generated by configure. */
++/***************************************************************************/
++/* */
++/* ftconfig.in */
++/* */
++/* UNIX-specific configuration file (specification only). */
++/* */
++/* Copyright 1996-2000, 2002 by */
++/* David Turner, Robert Wilhelm, and Werner Lemberg. */
++/* */
++/* This file is part of the FreeType project, and may only be used, */
++/* modified, and distributed under the terms of the FreeType project */
++/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
++/* this file you indicate that you have read the license and */
++/* understand and accept it fully. */
++/* */
++/***************************************************************************/
++
++
++ /*************************************************************************/
++ /* */
++ /* This header file contains a number of macro definitions that are used */
++ /* by the rest of the engine. Most of the macros here are automatically */
++ /* determined at compile time, and you should not need to change it to */
++ /* port FreeType, except to compile the library with a non-ANSI */
++ /* compiler. */
++ /* */
++ /* Note however that if some specific modifications are needed, we */
++ /* advise you to place a modified copy in your build directory. */
++ /* */
++ /* The build directory is usually `freetype/builds/<system>', and */
++ /* contains system-specific files that are always included first when */
++ /* building the library. */
++ /* */
++ /*************************************************************************/
++
++
++#ifndef __FTCONFIG_H__
++#define __FTCONFIG_H__
++
++#include <ft2build.h>
++#include FT_CONFIG_OPTIONS_H
++#include FT_CONFIG_STANDARD_LIBRARY_H
++
++
++FT_BEGIN_HEADER
++
++
++ /*************************************************************************/
++ /* */
++ /* PLATFORM-SPECIFIC CONFIGURATION MACROS */
++ /* */
++ /* These macros can be toggled to suit a specific system. The current */
++ /* ones are defaults used to compile FreeType in an ANSI C environment */
++ /* (16bit compilers are also supported). Copy this file to your own */
++ /* `freetype/builds/<system>' directory, and edit it to port the engine. */
++ /* */
++ /*************************************************************************/
++
++
++#define HAVE_UNISTD_H 1
++#define HAVE_FCNTL_H 1
++
++#define SIZEOF_INT 4
++#define SIZEOF_LONG 4
++
++#define FT_SIZEOF_INT SIZEOF_INT
++#define FT_SIZEOF_LONG SIZEOF_LONG
++
++
++ /* Preferred alignment of data */
++#define FT_ALIGNMENT 8
++
++
++ /* FT_UNUSED is a macro used to indicate that a given parameter is not */
++ /* used -- this is only used to get rid of unpleasant compiler warnings */
++#ifndef FT_UNUSED
++#define FT_UNUSED( arg ) ( (arg) = (arg) )
++#endif
++
++
++ /*************************************************************************/
++ /* */
++ /* AUTOMATIC CONFIGURATION MACROS */
++ /* */
++ /* These macros are computed from the ones defined above. Don't touch */
++ /* their definition, unless you know precisely what you are doing. No */
++ /* porter should need to mess with them. */
++ /* */
++ /*************************************************************************/
++
++
++ /*************************************************************************/
++ /* */
++ /* IntN types */
++ /* */
++ /* Used to guarantee the size of some specific integers. */
++ /* */
++ typedef signed short FT_Int16;
++ typedef unsigned short FT_UInt16;
++
++#if FT_SIZEOF_INT == 4
++
++ typedef signed int FT_Int32;
++ typedef unsigned int FT_UInt32;
++
++#elif FT_SIZEOF_LONG == 4
++
++ typedef signed long FT_Int32;
++ typedef unsigned long FT_UInt32;
++
++#else
++#error "no 32bit type found -- please check your configuration files"
++#endif
++
++#if FT_SIZEOF_LONG == 8
++
++ /* FT_LONG64 must be defined if a 64-bit type is available */
++#define FT_LONG64
++#define FT_INT64 long
++
++#else
++
++ /*************************************************************************/
++ /* */
++ /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
++ /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
++ /* `ftoption.h'. */
++ /* */
++ /* Note that this will produce many -ansi warnings during library */
++ /* compilation, and that in many cases, the generated code will be */
++ /* neither smaller nor faster! */
++ /* */
++#ifdef FTCALC_USE_LONG_LONG
++
++#define FT_LONG64
++#define FT_INT64 long long
++
++#endif /* FTCALC_USE_LONG_LONG */
++#endif /* FT_SIZEOF_LONG == 8 */
++
++
++#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
++
++#define FT_LOCAL( x ) static x
++#define FT_LOCAL_DEF( x ) static x
++
++#else
++
++#ifdef __cplusplus
++#define FT_LOCAL( x ) extern "C" x
++#define FT_LOCAL_DEF( x ) extern "C" x
++#else
++#define FT_LOCAL( x ) extern x
++#define FT_LOCAL_DEF( x ) extern x
++#endif
++
++#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
++
++
++#ifndef FT_BASE
++
++#ifdef __cplusplus
++#define FT_BASE( x ) extern "C" x
++#else
++#define FT_BASE( x ) extern x
++#endif
++
++#endif /* !FT_BASE */
++
++
++#ifndef FT_BASE_DEF
++
++#ifdef __cplusplus
++#define FT_BASE_DEF( x ) extern "C" x
++#else
++#define FT_BASE_DEF( x ) extern x
++#endif
++
++#endif /* !FT_BASE_DEF */
++
++
++#ifndef FT_EXPORT
++
++#ifdef __cplusplus
++#define FT_EXPORT( x ) extern "C" x
++#else
++#define FT_EXPORT( x ) extern x
++#endif
++
++#endif /* !FT_EXPORT */
++
++
++#ifndef FT_EXPORT_DEF
++
++#ifdef __cplusplus
++#define FT_EXPORT_DEF( x ) extern "C" x
++#else
++#define FT_EXPORT_DEF( x ) extern x
++#endif
++
++#endif /* !FT_EXPORT_DEF */
++
++
++#ifndef FT_EXPORT_VAR
++
++#ifdef __cplusplus
++#define FT_EXPORT_VAR( x ) extern "C" x
++#else
++#define FT_EXPORT_VAR( x ) extern x
++#endif
++
++#endif /* !FT_EXPORT_VAR */
++
++ /* The following macros are needed to compile the library with a */
++ /* C++ compiler and with 16bit compilers. */
++ /* */
++
++ /* This is special. Within C++, you must specify `extern "C"' for */
++ /* functions which are used via function pointers, and you also */
++ /* must do that for structures which contain function pointers to */
++ /* assure C linkage -- it's not possible to have (local) anonymous */
++ /* functions which are accessed by (global) function pointers. */
++ /* */
++ /* */
++ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
++ /* */
++ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
++ /* contains pointers to callback functions. */
++ /* */
++ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
++ /* that contains pointers to callback functions. */
++ /* */
++ /* */
++ /* Some 16bit compilers have to redefine these macros to insert */
++ /* the infamous `_cdecl' or `__fastcall' declarations. */
++ /* */
++#ifndef FT_CALLBACK_DEF
++#ifdef __cplusplus
++#define FT_CALLBACK_DEF( x ) extern "C" x
++#else
++#define FT_CALLBACK_DEF( x ) static x
++#endif
++#endif /* FT_CALLBACK_DEF */
++
++#ifndef FT_CALLBACK_TABLE
++#ifdef __cplusplus
++#define FT_CALLBACK_TABLE extern "C"
++#define FT_CALLBACK_TABLE_DEF extern "C"
++#else
++#define FT_CALLBACK_TABLE extern
++#define FT_CALLBACK_TABLE_DEF /* nothing */
++#endif
++#endif /* FT_CALLBACK_TABLE */
++
++
++FT_END_HEADER
++
++#endif /* __FTCONFIG_H__ */
++
++
++/* END */
diff --git a/src/3rdparty/patches/freetype-2.3.6-ascii.patch b/src/3rdparty/patches/freetype-2.3.6-ascii.patch
new file mode 100644
index 0000000..cc46296
--- /dev/null
+++ b/src/3rdparty/patches/freetype-2.3.6-ascii.patch
@@ -0,0 +1,174 @@
+--- include/freetype/ftbbox.h.orig 2007-10-20 15:27:57.000000000 +0200
++++ include/freetype/ftbbox.h 2008-06-15 00:00:00.000000000 +0200
+@@ -61,7 +61,7 @@
+ /* Computes the exact bounding box of an outline. This is slower */
+ /* than computing the control box. However, it uses an advanced */
+ /* algorithm which returns _very_ quickly when the two boxes */
+- /* coincide. Otherwise, the outline Bézier arcs are traversed to */
++ /* coincide. Otherwise, the outline Bezier arcs are traversed to */
+ /* extract their extrema. */
+ /* */
+ /* <Input> */
+--- include/freetype/ftglyph.h.orig 2008-04-13 23:58:59.000000000 +0200
++++ include/freetype/ftglyph.h 2008-06-15 00:00:00.000000000 +0200
+@@ -354,10 +354,10 @@
+ /* */
+ /* <Description> */
+ /* Return a glyph's `control box'. The control box encloses all the */
+- /* outline's points, including Bézier control points. Though it */
++ /* outline's points, including Bezier control points. Though it */
+ /* coincides with the exact bounding box for most glyphs, it can be */
+ /* slightly larger in some situations (like when rotating an outline */
+- /* which contains Bézier outside arcs). */
++ /* which contains Bezier outside arcs). */
+ /* */
+ /* Computing the control box is very fast, while getting the bounding */
+ /* box can take much more time as it needs to walk over all segments */
+--- include/freetype/ftimage.h.orig 2008-05-31 08:46:38.000000000 +0200
++++ include/freetype/ftimage.h 2008-06-15 00:00:00.000000000 +0200
+@@ -318,11 +318,11 @@
+ /* */
+ /* tags :: A pointer to an array of `n_points' chars, giving */
+ /* each outline point's type. If bit 0 is unset, the */
+- /* point is `off' the curve, i.e., a Bézier control */
++ /* point is `off' the curve, i.e., a Bezier control */
+ /* point, while it is `on' when set. */
+ /* */
+ /* Bit 1 is meaningful for `off' points only. If set, */
+- /* it indicates a third-order Bézier arc control point; */
++ /* it indicates a third-order Bezier arc control point; */
+ /* and a second-order control point if unset. */
+ /* */
+ /* contours :: An array of `n_contours' shorts, giving the end */
+@@ -528,7 +528,7 @@
+ /* A function pointer type use to describe the signature of a `conic */
+ /* to' function during outline walking/decomposition. */
+ /* */
+- /* A `conic to' is emitted to indicate a second-order Bézier arc in */
++ /* A `conic to' is emitted to indicate a second-order Bezier arc in */
+ /* the outline. */
+ /* */
+ /* <Input> */
+@@ -560,12 +560,12 @@
+ /* A function pointer type used to describe the signature of a `cubic */
+ /* to' function during outline walking/decomposition. */
+ /* */
+- /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
++ /* A `cubic to' is emitted to indicate a third-order Bezier arc. */
+ /* */
+ /* <Input> */
+- /* control1 :: A pointer to the first Bézier control point. */
++ /* control1 :: A pointer to the first Bezier control point. */
+ /* */
+- /* control2 :: A pointer to the second Bézier control point. */
++ /* control2 :: A pointer to the second Bezier control point. */
+ /* */
+ /* to :: A pointer to the target end point. */
+ /* */
+@@ -591,7 +591,7 @@
+ /* */
+ /* <Description> */
+ /* A structure to hold various function pointers used during outline */
+- /* decomposition in order to emit segments, conic, and cubic Béziers, */
++ /* decomposition in order to emit segments, conic, and cubic Beziers, */
+ /* as well as `move to' and `close to' operations. */
+ /* */
+ /* <Fields> */
+@@ -599,9 +599,9 @@
+ /* */
+ /* line_to :: The segment emitter. */
+ /* */
+- /* conic_to :: The second-order Bézier arc emitter. */
++ /* conic_to :: The second-order Bezier arc emitter. */
+ /* */
+- /* cubic_to :: The third-order Bézier arc emitter. */
++ /* cubic_to :: The third-order Bezier arc emitter. */
+ /* */
+ /* shift :: The shift that is applied to coordinates before they */
+ /* are sent to the emitter. */
+@@ -698,7 +698,7 @@
+ /* */
+ /* FT_GLYPH_FORMAT_OUTLINE :: */
+ /* The glyph image is a vectorial outline made of line segments */
+- /* and Bézier arcs; it can be described as an @FT_Outline; you */
++ /* and Bezier arcs; it can be described as an @FT_Outline; you */
+ /* generally want to access the `outline' field of the */
+ /* @FT_GlyphSlotRec structure to read it. */
+ /* */
+--- include/freetype/ftoutln.h.orig 2008-05-29 00:05:07.000000000 +0200
++++ include/freetype/ftoutln.h 2008-06-15 00:00:00.000000000 +0200
+@@ -85,7 +85,7 @@
+ /* */
+ /* <Description> */
+ /* Walks over an outline's structure to decompose it into individual */
+- /* segments and Bézier arcs. This function is also able to emit */
++ /* segments and Bezier arcs. This function is also able to emit */
+ /* `move to' and `close to' operations to indicate the start and end */
+ /* of new contours in the outline. */
+ /* */
+@@ -213,10 +213,10 @@
+ /* */
+ /* <Description> */
+ /* Returns an outline's `control box'. The control box encloses all */
+- /* the outline's points, including Bézier control points. Though it */
++ /* the outline's points, including Bezier control points. Though it */
+ /* coincides with the exact bounding box for most glyphs, it can be */
+ /* slightly larger in some situations (like when rotating an outline */
+- /* which contains Bézier outside arcs). */
++ /* which contains Bezier outside arcs). */
+ /* */
+ /* Computing the control box is very fast, while getting the bounding */
+ /* box can take much more time as it needs to walk over all segments */
+--- include/freetype/ftstroke.h.orig 2008-05-29 00:06:54.000000000 +0200
++++ include/freetype/ftstroke.h 2008-06-15 00:00:00.000000000 +0200
+@@ -407,7 +407,7 @@
+ * FT_Stroker_ConicTo
+ *
+ * @description:
+- * `Draw' a single quadratic Bézier in the stroker's current sub-path,
++ * `Draw' a single quadratic Bezier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+@@ -415,7 +415,7 @@
+ * The target stroker handle.
+ *
+ * control ::
+- * A pointer to a Bézier control point.
++ * A pointer to a Bezier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+@@ -439,7 +439,7 @@
+ * FT_Stroker_CubicTo
+ *
+ * @description:
+- * `Draw' a single cubic Bézier in the stroker's current sub-path,
++ * `Draw' a single cubic Bezier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+@@ -447,10 +447,10 @@
+ * The target stroker handle.
+ *
+ * control1 ::
+- * A pointer to the first Bézier control point.
++ * A pointer to the first Bezier control point.
+ *
+ * control2 ::
+- * A pointer to second Bézier control point.
++ * A pointer to second Bezier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+--- include/freetype/ftwinfnt.h.orig 2008-05-28 23:27:19.000000000 +0200
++++ include/freetype/ftwinfnt.h 2008-06-15 00:00:00.000000000 +0200
+@@ -77,7 +77,7 @@
+ * Mac Roman encoding.
+ *
+ * FT_WinFNT_ID_OEM ::
+- * From Michael Pöttgen <michael@poettgen.de>:
++ * From Michael Poettgen <michael@poettgen.de>:
+ *
+ * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
+ * is used for the charset of vector fonts, like `modern.fon',
diff --git a/src/3rdparty/patches/libjpeg-6b-config.patch b/src/3rdparty/patches/libjpeg-6b-config.patch
new file mode 100644
index 0000000..3012b8f
--- /dev/null
+++ b/src/3rdparty/patches/libjpeg-6b-config.patch
@@ -0,0 +1,50 @@
+--- jconfig.h.orig 1970-01-01 01:00:00.000000000 +0100
++++ jconfig.h 2006-06-15 00:00:00.000000000 +0200
+@@ -0,0 +1,47 @@
++/* jconfig.vc --- jconfig.h for Microsoft Visual C++ on Windows 95 or NT. */
++/* see jconfig.doc for explanations */
++
++#define HAVE_PROTOTYPES
++#define HAVE_UNSIGNED_CHAR
++#define HAVE_UNSIGNED_SHORT
++/* #define void char */
++/* #define const */
++#undef CHAR_IS_UNSIGNED
++#define HAVE_STDDEF_H
++#define HAVE_STDLIB_H
++#undef NEED_BSD_STRINGS
++#undef NEED_SYS_TYPES_H
++#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */
++#undef NEED_SHORT_EXTERNAL_NAMES
++#undef INCOMPLETE_TYPES_BROKEN
++
++#if defined(_WIN32)
++/* Define "boolean" as unsigned char, not int, per Windows custom */
++#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
++typedef unsigned char boolean;
++#endif
++#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
++#endif
++
++
++#ifdef JPEG_INTERNALS
++
++#undef RIGHT_SHIFT_IS_UNSIGNED
++
++#endif /* JPEG_INTERNALS */
++
++#ifdef JPEG_CJPEG_DJPEG
++
++#define BMP_SUPPORTED /* BMP image file format */
++#define GIF_SUPPORTED /* GIF image file format */
++#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
++#undef RLE_SUPPORTED /* Utah RLE image file format */
++#define TARGA_SUPPORTED /* Targa image file format */
++
++#define TWO_FILE_COMMANDLINE /* optional */
++#define USE_SETMODE /* Microsoft has setmode() */
++#undef NEED_SIGNAL_CATCHER
++#undef DONT_USE_B_MODE
++#undef PROGRESS_REPORT /* optional */
++
++#endif /* JPEG_CJPEG_DJPEG */
diff --git a/src/3rdparty/patches/libmng-1.0.10-endless-loop.patch b/src/3rdparty/patches/libmng-1.0.10-endless-loop.patch
new file mode 100644
index 0000000..31f0474
--- /dev/null
+++ b/src/3rdparty/patches/libmng-1.0.10-endless-loop.patch
@@ -0,0 +1,65 @@
+--- libmng_data.h.orig 2007-04-20 10:41:58.000000000 +0200
++++ libmng_data.h 2007-07-14 00:00:00.000000000 +0200
+@@ -658,6 +658,9 @@
+ mng_int32 iFrameclipb;
+
+ mng_uint32 iNextdelay; /* delay *after* next image */
++
++ mng_bool bForcedelay;
++ mng_uint32 iAccumdelay;
+ #endif
+
+ #ifndef MNG_SKIPCHUNK_SHOW
+--- libmng_display.c.orig 2007-04-20 10:41:58.000000000 +0200
++++ libmng_display.c 2007-07-14 00:00:00.000000000 +0200
+@@ -384,8 +384,9 @@
+
+ {
+ #ifndef MNG_SKIPCHUNK_FRAM
+- if (pData->iFramedelay > 0) /* real delay ? */
++ if (pData->iFramedelay > 0 || pData->bForcedelay) /* real delay ? */
+ { /* let the app refresh first ? */
++ pData->bForcedelay = MNG_FALSE;
+ if ((pData->bRunning) && (!pData->bSkipping) &&
+ (pData->iUpdatetop < pData->iUpdatebottom) && (pData->iUpdateleft < pData->iUpdateright))
+ if (!pData->fRefresh (((mng_handle)pData),
+@@ -455,6 +456,7 @@
+ pData->iFrametime = pData->iFrametime + iWaitfor;
+ /* setup for next delay */
+ pData->iFramedelay = pData->iNextdelay;
++ pData->iAccumdelay += pData->iFramedelay;
+ #endif
+ }
+
+@@ -3340,6 +3342,9 @@
+ MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_MEND, MNG_LC_START);
+ #endif
+
++ pData->bForcedelay = pData->iAccumdelay ? MNG_FALSE : MNG_TRUE;
++ pData->iAccumdelay = 0;
++
+ #ifdef MNG_SUPPORT_DYNAMICMNG
+ if (pData->bStopafterseek) /* need to stop after this ? */
+ {
+--- libmng_hlapi.c.orig 2007-07-06 18:23:04.000000000 +0200
++++ libmng_hlapi.c 2007-07-14 00:00:00.000000000 +0200
+@@ -446,6 +446,9 @@
+ pData->iFrameclipb = 0;
+
+ pData->iNextdelay = 1;
++
++ pData->bForcedelay = MNG_FALSE;
++ pData->iAccumdelay = 0;
+ #endif
+
+ #ifndef MNG_SKIPCHUNK_SHOW
+@@ -1737,6 +1740,9 @@
+ pData->iFrameclipb = 0;
+
+ pData->iNextdelay = 1;
++
++ pData->bForcedelay = MNG_FALSE;
++ pData->iAccumdelay = 0;
+ #endif
+
+ #ifndef MNG_SKIPCHUNK_SHOW
diff --git a/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch b/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch
new file mode 100644
index 0000000..a374cbf
--- /dev/null
+++ b/src/3rdparty/patches/libpng-1.2.20-elf-visibility.patch
@@ -0,0 +1,17 @@
+--- pngconf.h.orig 2007-09-08 05:22:56.000000000 +0200
++++ pngconf.h 2007-09-09 00:00:00.000000000 +0200
+@@ -1375,6 +1375,14 @@
+ # if 0 /* ... other platforms, with other meanings */
+ # endif
+ # endif
++
++# if !defined(PNG_IMPEXP)
++# include <qconfig.h>
++# if defined(QT_VISIBILITY_AVAILABLE)
++# define PNG_IMPEXP __attribute__((visibility("default")))
++# endif
++# endif
++
+ #endif
+
+ #ifndef PNGAPI
diff --git a/src/3rdparty/patches/libtiff-3.8.2-config.patch b/src/3rdparty/patches/libtiff-3.8.2-config.patch
new file mode 100644
index 0000000..44230ea
--- /dev/null
+++ b/src/3rdparty/patches/libtiff-3.8.2-config.patch
@@ -0,0 +1,374 @@
+--- libtiff/tif_config.h 1970-01-01 01:00:00.000000000 +0100
++++ libtiff/tif_config.h 2008-05-25 00:00:00.000000000 +0200
+@@ -0,0 +1,296 @@
++/*
++ Configuration defines by Trolltech.
++*/
++
++#include <qglobal.h>
++#if defined(Q_OS_WINCE)
++# include <qfunctions_wince.h>
++#endif
++
++/* Support CCITT Group 3 & 4 algorithms */
++#define CCITT_SUPPORT 1
++
++/* Pick up YCbCr subsampling info from the JPEG data stream to support files
++ lacking the tag (default enabled). */
++#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
++
++/* Support C++ stream API (requires C++ compiler) */
++/* #undef CXX_SUPPORT */
++
++/* Treat extra sample as alpha (default enabled). The RGBA interface will
++ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
++ packages produce RGBA files but don't mark the alpha properly. */
++#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
++
++/* Use the Apple OpenGL framework. */
++/* #undef HAVE_APPLE_OPENGL_FRAMEWORK */
++
++/* Define to 1 if you have the <assert.h> header file. */
++#define HAVE_ASSERT_H 1
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++/* #undef HAVE_DLFCN_H */
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#if !defined(Q_OS_WINCE)
++#define HAVE_FCNTL_H 1
++#endif
++
++/* Define to 1 if you have the `floor' function. */
++/* #undef HAVE_FLOOR */
++
++/* Define to 1 if you have the `getopt' function. */
++/* #undef HAVE_GETOPT */
++
++/* Define as 0 or 1 according to the floating point format suported by the
++ machine */
++#define HAVE_IEEEFP 1
++
++/* Define to 1 if the system has the type `int16'. */
++/* #undef HAVE_INT16 */
++#ifdef Q_OS_AIX
++#define HAVE_INT16 1
++#endif
++
++/* Define to 1 if the system has the type `int32'. */
++/* #undef HAVE_INT32 */
++#ifdef Q_OS_AIX
++#define HAVE_INT32 1
++#endif
++
++/* Define to 1 if the system has the type `int8'. */
++/* #undef HAVE_INT8 */
++#ifdef Q_OS_AIX
++#define HAVE_INT8 1
++#endif
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++/* #undef HAVE_INTTYPES_H */
++
++/* Define to 1 if you have the `isascii' function. */
++/* #undef HAVE_ISASCII */
++
++/* Define to 1 if you have the `lfind' function. */
++/* #undef HAVE_LFIND */
++
++/* Define to 1 if you have the `c' library (-lc). */
++/* #undef HAVE_LIBC */
++
++/* Define to 1 if you have the `m' library (-lm). */
++/* #undef HAVE_LIBM */
++
++/* Define to 1 if you have the <limits.h> header file. */
++/* #undef HAVE_LIMITS_H */
++
++/* Define to 1 if you have the <malloc.h> header file. */
++/* #undef HAVE_MALLOC_H */
++
++/* Define to 1 if you have the `memmove' function. */
++/* #undef HAVE_MEMMOVE */
++
++/* Define to 1 if you have the <memory.h> header file. */
++/* #undef HAVE_MEMORY_H */
++
++/* Define to 1 if you have the `memset' function. */
++/* #undef HAVE_MEMSET */
++
++/* Define to 1 if you have the `mmap' function. */
++/* #undef HAVE_MMAP */
++
++/* Define to 1 if you have the `pow' function. */
++/* #undef HAVE_POW */
++
++/* Define if you have POSIX threads libraries and header files. */
++/* #undef HAVE_PTHREAD */
++
++/* Define to 1 if you have the <search.h> header file. */
++#if !defined(Q_OS_WINCE)
++#define HAVE_SEARCH_H 1
++#endif
++
++/* Define to 1 if you have the `sqrt' function. */
++/* #undef HAVE_SQRT */
++
++/* Define to 1 if you have the <stdint.h> header file. */
++/* #undef HAVE_STDINT_H */
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++/* #undef HAVE_STDLIB_H */
++
++/* Define to 1 if you have the `strcasecmp' function. */
++/* #undef HAVE_STRCASECMP */
++
++/* Define to 1 if you have the `strchr' function. */
++/* #undef HAVE_STRCHR */
++
++/* Define to 1 if you have the <strings.h> header file. */
++/* #undef HAVE_STRINGS_H */
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strrchr' function. */
++/* #undef HAVE_STRRCHR */
++
++/* Define to 1 if you have the `strstr' function. */
++/* #undef HAVE_STRSTR */
++
++/* Define to 1 if you have the `strtol' function. */
++/* #undef HAVE_STRTOL */
++
++/* Define to 1 if you have the `strtoul' function. */
++/* #undef HAVE_STRTOUL */
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++/* #undef HAVE_SYS_STAT_H */
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++/* #undef HAVE_SYS_TIME_H */
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the <windows.h> header file. */
++/* #undef HAVE_WINDOWS_H */
++#ifdef Q_OS_WIN
++#define TIF_PLATFORM_CONSOLE
++#endif
++
++/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
++ (Intel) */
++#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
++#define HOST_BIGENDIAN 1
++#else
++#define HOST_BIGENDIAN 0
++#endif
++
++/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
++#define HOST_FILLORDER FILLORDER_LSB2MSB
++
++/* Support JPEG compression (requires IJG JPEG library) */
++/* #undef JPEG_SUPPORT */
++
++/* Support LogLuv high dynamic range encoding */
++#define LOGLUV_SUPPORT 1
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++ */
++/* #undef LT_OBJDIR */
++
++/* Support LZW algorithm */
++#define LZW_SUPPORT 1
++
++/* Support Microsoft Document Imaging format */
++#define MDI_SUPPORT 1
++
++/* Support NeXT 2-bit RLE algorithm */
++#define NEXT_SUPPORT 1
++
++/* Define to 1 if your C compiler doesn't accept -c and -o together. */
++/* #undef NO_MINUS_C_MINUS_O */
++
++/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
++ fails with unpatched IJG JPEG library) */
++/* #undef OJPEG_SUPPORT */
++
++/* Name of package */
++/* #undef PACKAGE */
++
++/* Define to the address where bug reports for this package should be sent. */
++/* #undef PACKAGE_BUGREPORT */
++
++/* Define to the full name of this package. */
++/* #undef PACKAGE_NAME */
++
++/* Define to the full name and version of this package. */
++/* #undef PACKAGE_STRING */
++
++/* Define to the one symbol short name of this package. */
++/* #undef PACKAGE_TARNAME */
++
++/* Define to the version of this package. */
++/* #undef PACKAGE_VERSION */
++
++/* Support Macintosh PackBits algorithm */
++#define PACKBITS_SUPPORT 1
++
++/* Support Pixar log-format algorithm (requires Zlib) */
++#define PIXARLOG_SUPPORT 1
++
++/* Define to necessary symbol if this constant uses a non-standard name on
++ your system. */
++/* #undef PTHREAD_CREATE_JOINABLE */
++
++/* The size of a `int', as computed by sizeof. */
++#define SIZEOF_INT 4
++
++/* The size of a `long', as computed by sizeof. */
++#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64)
++#define SIZEOF_LONG 8
++#else
++#define SIZEOF_LONG 4
++#endif
++
++/* Define to 1 if you have the ANSI C header files. */
++/* #undef STDC_HEADERS */
++
++/* Support strip chopping (whether or not to convert single-strip uncompressed
++ images to mutiple strips of specified size to reduce memory usage) */
++#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
++
++/* Default size of the strip in bytes (when strip chopping enabled) */
++/* #undef STRIP_SIZE_DEFAULT */
++
++/* Enable SubIFD tag (330) support */
++#define SUBIFD_SUPPORT 1
++
++/* Support ThunderScan 4-bit RLE algorithm */
++#define THUNDER_SUPPORT 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++/* #undef TIME_WITH_SYS_TIME */
++
++/* Define to 1 if your <sys/time.h> declares `struct tm'. */
++/* #undef TM_IN_SYS_TIME */
++
++/* Version number of package */
++/* #undef VERSION */
++
++/* Define to 1 if your processor stores words with the most significant byte
++ first (like Motorola and SPARC, unlike Intel and VAX). */
++#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
++#define WORDS_BIGENDIAN 1
++#else
++/* #undef WORDS_BIGENDIAN */
++#endif
++
++/* Define to 1 if the X Window System is missing or not being used. */
++/* #undef X_DISPLAY_MISSING */
++
++/* Support Deflate compression */
++#define ZIP_SUPPORT 1
++
++/* Number of bits in a file offset, on hosts where this is settable. */
++/* #undef _FILE_OFFSET_BITS */
++
++/* Define for large files, on AIX-style hosts. */
++/* #undef _LARGE_FILES */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++ calls it, or to nothing if 'inline' is not supported under any name. */
++#ifndef __cplusplus
++#undef inline
++#define inline
++#endif
++
++/* Define to `long' if <sys/types.h> does not define. */
++/* #undef off_t */
++
++/* Define to `unsigned' if <sys/types.h> does not define. */
++/* #undef size_t */
+--- libtiff/tiffconf.h 2006-03-23 15:55:22.000000000 +0100
++++ libtiff/tiffconf.h 2008-05-25 00:00:00.000000000 +0200
+@@ -1,6 +1,5 @@
+-/* libtiff/tiffconf.h. Generated by configure. */
+ /*
+- Configuration defines for installed libtiff.
++ Configuration defines by Trolltech.
+ This file maintained for backward compatibility. Do not use definitions
+ from this file in your programs.
+ */
+@@ -8,6 +7,8 @@
+ #ifndef _TIFFCONF_
+ #define _TIFFCONF_
+
++#include <qglobal.h>
++
+ /* Define to 1 if the system has the type `int16'. */
+ /* #undef HAVE_INT16 */
+
+@@ -21,7 +22,11 @@
+ #define SIZEOF_INT 4
+
+ /* The size of a `long', as computed by sizeof. */
++#if (QT_POINTER_SIZE == 8) && !defined(Q_OS_WIN64)
++#define SIZEOF_LONG 8
++#else
+ #define SIZEOF_LONG 4
++#endif
+
+ /* Compatibility stuff. */
+
+@@ -34,13 +39,17 @@
+
+ /* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
+ (Intel) */
++#if (Q_BYTE_ORDER == Q_BIG_ENDIAN)
++#define HOST_BIGENDIAN 1
++#else
+ #define HOST_BIGENDIAN 0
++#endif
+
+ /* Support CCITT Group 3 & 4 algorithms */
+ #define CCITT_SUPPORT 1
+
+ /* Support JPEG compression (requires IJG JPEG library) */
+-#define JPEG_SUPPORT 1
++/* #undef JPEG_SUPPORT */
+
+ /* Support LogLuv high dynamic range encoding */
+ #define LOGLUV_SUPPORT 1
+--- libtiff/tiffiop.h 2006-03-21 17:42:50.000000000 +0100
++++ libtiff/tiffiop.h 2008-05-25 00:00:00.000000000 +0200
+@@ -37,7 +37,12 @@
+ #endif
+
+ #ifdef HAVE_SYS_TYPES_H
++#if !defined(Q_OS_WINCE)
+ # include <sys/types.h>
++#else
++# include <windows.h>
++# include <types.h>
++#endif
+ #endif
+
+ #ifdef HAVE_STRING_H
+--- libtiff/tif_win32.c 2006-02-07 14:51:03.000000000 +0100
++++ libtiff/tif_win32.c 2008-05-25 00:00:00.000000000 +0200
+@@ -29,6 +29,7 @@
+ * Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA
+ */
+ #include "tiffiop.h"
++#include <windows.h>
+
+ static tsize_t
+ _tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
diff --git a/src/3rdparty/patches/sqlite-3.5.6-config.patch b/src/3rdparty/patches/sqlite-3.5.6-config.patch
new file mode 100644
index 0000000..cf158ea
--- /dev/null
+++ b/src/3rdparty/patches/sqlite-3.5.6-config.patch
@@ -0,0 +1,38 @@
+--- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100
++++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100
+@@ -16823,6 +16823,8 @@
+ */
+ #if OS_UNIX /* This file is used on unix only */
+
++#include <qconfig.h>
++
+ /* #define SQLITE_ENABLE_LOCKING_STYLE 0 */
+
+ /*
+@@ -16865,7 +16867,7 @@
+ ** If we are to be thread-safe, include the pthreads header and define
+ ** the SQLITE_UNIX_THREADS macro.
+ */
+-#if SQLITE_THREADSAFE
++#ifndef QT_NO_THREAD
+ # define SQLITE_UNIX_THREADS 1
+ #endif
+
+@@ -19739,6 +19741,8 @@
+ ** desktops but not so well in embedded systems.
+ */
+
++#include <qconfig.h>
++
+ #include <winbase.h>
+
+ #ifdef __CYGWIN__
+@@ -19748,7 +19752,7 @@
+ /*
+ ** Macros used to determine whether or not to use threads.
+ */
+-#if defined(THREADSAFE) && THREADSAFE
++#ifndef QT_NO_THREAD
+ # define SQLITE_W32_THREADS 1
+ #endif
+
diff --git a/src/3rdparty/patches/sqlite-3.5.6-wince.patch b/src/3rdparty/patches/sqlite-3.5.6-wince.patch
new file mode 100644
index 0000000..02965f8
--- /dev/null
+++ b/src/3rdparty/patches/sqlite-3.5.6-wince.patch
@@ -0,0 +1,19 @@
+--- sqlite3.c.orig 2008-02-06 16:03:28.000000000 +0100
++++ sqlite3.c 2008-02-13 00:00:00.000000000 +0100
+@@ -8837,6 +8837,16 @@
+ }
+
+ /*
++** Windows CE does not declare the localtime
++** function as it is not defined anywhere.
++** Anyway we need the forward-declaration to be
++** able to define it later on.
++*/
++#if defined(_WIN32_WCE) && (_WIN32_WCE >= 0x600)
++struct tm *__cdecl localtime(const time_t *t);
++#endif
++
++/*
+ ** Compute the difference (in days) between localtime and UTC (a.k.a. GMT)
+ ** for the time value p where p is in UTC.
+ */
diff --git a/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch b/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch
new file mode 100644
index 0000000..83899ad
--- /dev/null
+++ b/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch
@@ -0,0 +1,433 @@
+--- compress.c.orig 2003-07-07 07:37:56.000000000 +0200
++++ compress.c 2006-06-16 00:00:00.000000000 +0200
+@@ -59,7 +59,7 @@
+
+ /* ===========================================================================
+ */
+-int ZEXPORT compress (dest, destLen, source, sourceLen)
++int Q_ZEXPORT compress (dest, destLen, source, sourceLen)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+--- gzio.c.orig 2005-07-11 22:31:48.000000000 +0200
++++ gzio.c 2006-08-25 00:00:00.000000000 +0200
+@@ -205,7 +205,7 @@
+ /* ===========================================================================
+ Opens a gzip (.gz) file for reading or writing.
+ */
+-gzFile ZEXPORT gzopen (path, mode)
++gzFile Q_ZEXPORT gzopen (path, mode)
+ const char *path;
+ const char *mode;
+ {
+@@ -391,7 +391,7 @@
+ Reads the given number of uncompressed bytes from the compressed file.
+ gzread returns the number of bytes actually read (0 for end of file).
+ */
+-int ZEXPORT gzread (file, buf, len)
++int Q_ZEXPORT gzread (file, buf, len)
+ gzFile file;
+ voidp buf;
+ unsigned len;
+@@ -600,7 +600,7 @@
+ #ifdef STDC
+ #include <stdarg.h>
+
+-int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
++int Q_ZEXPORT gzprintf (gzFile file, const char *format, /* args */ ...)
+ {
+ char buf[Z_PRINTF_BUFSIZE];
+ va_list va;
+@@ -634,7 +634,7 @@
+ }
+ #else /* not ANSI C */
+
+-int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
++int Q_ZEXPORT gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
+ a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
+ gzFile file;
+ const char *format;
+@@ -950,7 +950,7 @@
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state.
+ */
+-int ZEXPORT gzclose (file)
++int Q_ZEXPORT gzclose (file)
+ gzFile file;
+ {
+ gz_stream *s = (gz_stream*)file;
+--- uncompr.c.orig 2003-07-07 07:36:56.000000000 +0200
++++ uncompr.c 2006-06-16 00:00:00.000000000 +0200
+@@ -23,7 +23,7 @@
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted.
+ */
+-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
++int Q_ZEXPORT uncompress (dest, destLen, source, sourceLen)
+ Bytef *dest;
+ uLongf *destLen;
+ const Bytef *source;
+--- zlib.h.orig 2005-07-18 04:26:49.000000000 +0200
++++ zlib.h 2006-08-25 00:00:00.000000000 +0200
+@@ -32,6 +32,7 @@
+ #define ZLIB_H
+
+ #include "zconf.h"
++#include "qconfig.h"
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -40,6 +41,19 @@
+ #define ZLIB_VERSION "1.2.3"
+ #define ZLIB_VERNUM 0x1230
+
++#if defined(QT_VISIBILITY_AVAILABLE)
++# define Q_ZEXPORT __attribute__((visibility("default")))
++#else
++# ifdef QT_MAKEDLL
++# define Q_ZEXPORT __declspec(dllexport)
++# else
++# define Q_ZEXPORT ZEXPORT
++# endif
++#endif
++#ifdef Q_OS_TEMP
++#include <qfunctions_wce.h>
++#endif
++
+ /*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed
+@@ -209,7 +223,7 @@
+
+ /* basic functions */
+
+-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
++ZEXTERN Q_ZEXPORT const char * zlibVersion OF((void));
+ /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is
+ not compatible with the zlib.h header file used by the application.
+@@ -239,7 +253,7 @@
+ */
+
+
+-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
++ZEXTERN int Q_ZEXPORT deflate OF((z_streamp strm, int flush));
+ /*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce some
+@@ -325,7 +339,7 @@
+ */
+
+
+-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
++ZEXTERN int Q_ZEXPORT deflateEnd OF((z_streamp strm));
+ /*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+@@ -360,7 +374,7 @@
+ */
+
+
+-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
++ZEXTERN int Q_ZEXPORT inflate OF((z_streamp strm, int flush));
+ /*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+@@ -459,7 +473,7 @@
+ */
+
+
+-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
++ZEXTERN int Q_ZEXPORT inflateEnd OF((z_streamp strm));
+ /*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any
+@@ -535,7 +549,7 @@
+ not perform any compression: this will be done by deflate().
+ */
+
+-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
++ZEXTERN int Q_ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+ /*
+@@ -574,7 +588,7 @@
+ perform any compression: this will be done by deflate().
+ */
+
+-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
++ZEXTERN int Q_ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+ /*
+ Sets the destination stream as a complete copy of the source stream.
+@@ -592,7 +606,7 @@
+ destination.
+ */
+
+-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
++ZEXTERN int Q_ZEXPORT deflateReset OF((z_streamp strm));
+ /*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state.
+@@ -603,7 +617,7 @@
+ stream state was inconsistent (such as zalloc or state being NULL).
+ */
+
+-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
++ZEXTERN int Q_ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+ /*
+@@ -733,7 +747,7 @@
+ and avail_out are unchanged.)
+ */
+
+-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
++ZEXTERN int Q_ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+ /*
+@@ -755,7 +769,7 @@
+ inflate().
+ */
+
+-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
++ZEXTERN int Q_ZEXPORT inflateSync OF((z_streamp strm));
+ /*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+@@ -786,7 +800,7 @@
+ destination.
+ */
+
+-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
++ZEXTERN int Q_ZEXPORT inflateReset OF((z_streamp strm));
+ /*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state.
+@@ -1006,7 +1020,7 @@
+ utility functions can easily be modified if you need special options.
+ */
+
+-ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
++ZEXTERN int Q_ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+ /*
+ Compresses the source buffer into the destination buffer. sourceLen is
+@@ -1021,7 +1035,7 @@
+ buffer.
+ */
+
+-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
++ZEXTERN int Q_ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+ /*
+@@ -1044,7 +1058,7 @@
+ a compress() or compress2() call to allocate the destination buffer.
+ */
+
+-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
++ZEXTERN int Q_ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+ /*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+@@ -1065,7 +1079,7 @@
+
+ typedef voidp gzFile;
+
+-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
++ZEXTERN gzFile Q_ZEXPORT gzopen OF((const char *path, const char *mode));
+ /*
+ Opens a gzip (.gz) file for reading or writing. The mode parameter
+ is as in fopen ("rb" or "wb") but can also include a compression level
+@@ -1082,7 +1096,7 @@
+ can be checked to distinguish the two cases (if errno is zero, the
+ zlib error is Z_MEM_ERROR). */
+
+-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
++ZEXTERN gzFile Q_ZEXPORT gzdopen OF((int fd, const char *mode));
+ /*
+ gzdopen() associates a gzFile with the file descriptor fd. File
+ descriptors are obtained from calls like open, dup, creat, pipe or
+@@ -1095,7 +1109,7 @@
+ the (de)compression state.
+ */
+
+-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
++ZEXTERN int Q_ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+ /*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+@@ -1103,7 +1117,7 @@
+ opened for writing.
+ */
+
+-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
++ZEXTERN int Q_ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+ /*
+ Reads the given number of uncompressed bytes from the compressed file.
+ If the input file was not in gzip format, gzread copies the given number
+@@ -1111,7 +1125,7 @@
+ gzread returns the number of uncompressed bytes actually read (0 for
+ end of file, -1 for error). */
+
+-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
++ZEXTERN int Q_ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+ /*
+ Writes the given number of uncompressed bytes into the compressed file.
+@@ -1119,7 +1133,7 @@
+ (0 in case of error).
+ */
+
+-ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
++ZEXTERN int Q_ZEXPORT gzprintf OF((gzFile file, const char *format, ...));
+ /*
+ Converts, formats, and writes the args to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+@@ -1132,14 +1146,14 @@
+ because the secure snprintf() or vsnprintf() functions were not available.
+ */
+
+-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
++ZEXTERN int Q_ZEXPORT gzputs OF((gzFile file, const char *s));
+ /*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+ gzputs returns the number of characters written, or -1 in case of error.
+ */
+
+-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
++ZEXTERN Q_ZEXPORT char * gzgets OF((gzFile file, char *buf, int len));
+ /*
+ Reads bytes from the compressed file until len-1 characters are read, or
+ a newline character is read and transferred to buf, or an end-of-file
+@@ -1148,13 +1162,13 @@
+ gzgets returns buf, or Z_NULL in case of error.
+ */
+
+-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
++ZEXTERN int Q_ZEXPORT gzputc OF((gzFile file, int c));
+ /*
+ Writes c, converted to an unsigned char, into the compressed file.
+ gzputc returns the value that was written, or -1 in case of error.
+ */
+
+-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
++ZEXTERN int Q_ZEXPORT gzgetc OF((gzFile file));
+ /*
+ Reads one byte from the compressed file. gzgetc returns this byte
+ or -1 in case of end of file or error.
+@@ -1170,7 +1184,7 @@
+ or gzrewind().
+ */
+
+-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
++ZEXTERN int Q_ZEXPORT gzflush OF((gzFile file, int flush));
+ /*
+ Flushes all pending output into the compressed file. The parameter
+ flush is as in the deflate() function. The return value is the zlib
+@@ -1180,7 +1194,7 @@
+ degrade compression.
+ */
+
+-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
++ZEXTERN z_off_t Q_ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+ /*
+ Sets the starting position for the next gzread or gzwrite on the
+@@ -1198,14 +1212,14 @@
+ would be before the current position.
+ */
+
+-ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
++ZEXTERN int Q_ZEXPORT gzrewind OF((gzFile file));
+ /*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+ */
+
+-ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
++ZEXTERN z_off_t Q_ZEXPORT gztell OF((gzFile file));
+ /*
+ Returns the starting position for the next gzread or gzwrite on the
+ given compressed file. This position represents a number of bytes in the
+@@ -1214,7 +1228,7 @@
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+ */
+
+-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
++ZEXTERN int Q_ZEXPORT gzeof OF((gzFile file));
+ /*
+ Returns 1 when EOF has previously been detected reading the given
+ input stream, otherwise zero.
+@@ -1226,14 +1240,14 @@
+ zero.
+ */
+
+-ZEXTERN int ZEXPORT gzclose OF((gzFile file));
++ZEXTERN int Q_ZEXPORT gzclose OF((gzFile file));
+ /*
+ Flushes all pending output if necessary, closes the compressed file
+ and deallocates all the (de)compression state. The return value is the zlib
+ error number (see function gzerror below).
+ */
+
+-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
++ZEXTERN Q_ZEXPORT const char * gzerror OF((gzFile file, int *errnum));
+ /*
+ Returns the error message for the last error which occurred on the
+ given compressed file. errnum is set to zlib error number. If an
+@@ -1257,7 +1271,7 @@
+ compression library.
+ */
+
+-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
++ZEXTERN uLong Q_ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+ /*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is NULL, this function returns
+@@ -1282,7 +1296,7 @@
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+ */
+
+-ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
++ZEXTERN uLong Q_ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+ /*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is NULL, this function returns the required initial
+@@ -1314,15 +1328,15 @@
+ /* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
++ZEXTERN int Q_ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
++ZEXTERN int Q_ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
++ZEXTERN int Q_ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
++ZEXTERN int Q_ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+@@ -1346,9 +1360,9 @@
+ struct internal_state {int dummy;}; /* hack for buggy compilers */
+ #endif
+
+-ZEXTERN const char * ZEXPORT zError OF((int));
+-ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
+-ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
++ZEXTERN Q_ZEXPORT const char * zError OF((int));
++ZEXTERN int Q_ZEXPORT inflateSyncPoint OF((z_streamp z));
++ZEXTERN Q_ZEXPORT const uLongf * get_crc_table OF((void));
+
+ #ifdef __cplusplus
+ }