summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-03-25 12:24:04 (GMT)
committeraavit <qt-info@nokia.com>2011-08-02 11:15:29 (GMT)
commitd6ba0e805fd2b17e2e0cbbce32e218551505d91f (patch)
tree4030a7a3834694ae95d2f7a52c6a85209b6c5c7f /src
parent18ac3ece44cf0524430d7658a1e70069121859fc (diff)
downloadQt-d6ba0e805fd2b17e2e0cbbce32e218551505d91f.zip
Qt-d6ba0e805fd2b17e2e0cbbce32e218551505d91f.tar.gz
Qt-d6ba0e805fd2b17e2e0cbbce32e218551505d91f.tar.bz2
Updating libpng: Patches to libpng 1.5.4 for building it in Qt
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libpng/pngconf.h11
-rw-r--r--src/3rdparty/libpng/pngpriv.h12
2 files changed, 18 insertions, 5 deletions
diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h
index 222816e..2a41a29 100644
--- a/src/3rdparty/libpng/pngconf.h
+++ b/src/3rdparty/libpng/pngconf.h
@@ -35,7 +35,7 @@
* because this file defines png_memcpy and so on the base APIs must
* be defined here.
*/
-# ifdef BSD
+# if defined(BSD) && !defined(VXWORKS)
# include <strings.h>
# else
# include <string.h>
@@ -197,7 +197,7 @@
# define PNGCAPI __watcall
# endif
-# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
+# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) || defined(__WINSCW__)
# define PNGCAPI __cdecl
# if PNG_API_RULE == 1
# define PNGAPI __stdcall
@@ -279,6 +279,13 @@
# endif
# endif
+# if !defined(PNG_IMPEXP)
+# include <qconfig.h>
+# if defined(QT_VISIBILITY_AVAILABLE)
+# define PNG_IMPEXP __attribute__((visibility("default")))
+# endif
+# endif
+
# ifndef PNG_IMPEXP
# define PNG_IMPEXP
# endif
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h
index 5b4d212..ca2fb8c 100644
--- a/src/3rdparty/libpng/pngpriv.h
+++ b/src/3rdparty/libpng/pngpriv.h
@@ -25,6 +25,10 @@
#ifndef PNGPRIV_H
#define PNGPRIV_H
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
/* Feature Test Macros. The following are defined here to ensure that correctly
* implemented libraries reveal the APIs libpng needs to build and hide those
* that are not needed and potentially damaging to the compilation.
@@ -206,7 +210,9 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
defined(_WIN32) || defined(__WIN32__)
-# include <windows.h> /* defines _WINDOWS_ macro */
+# if !defined(__SYMBIAN32__)
+# include <windows.h> /* defines _WINDOWS_ macro */
+# endif
#endif
/* Moved here around 1.5.0beta36 from pngconf.h */
@@ -216,7 +222,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
/* Memory model/platform independent fns */
#ifndef PNG_ABORT
-# ifdef _WINDOWS_
+# if defined(_WINDOWS_) || defined(_WIN32_WCE)
# define PNG_ABORT() ExitProcess(0)
# else
# define PNG_ABORT() abort()
@@ -1265,7 +1271,7 @@ PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr,
#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT)
#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK)
#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK)
-
+
/* The actual parser. This can be called repeatedly, it updates
* the index into the string and the state variable (which must
* be initialzed to 0). It returns a result code, as above. There