diff options
author | aavit <qt_aavit@ovi.com> | 2012-03-02 09:09:10 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-12 13:51:42 (GMT) |
commit | ed881474111d635bb90d3e08e9fb70c06d19d48b (patch) | |
tree | cd231b241f3e4c2e0901862bf0fffe395a8a8253 /src/3rdparty/libpng/pngpriv.h | |
parent | 597d5f2288354772d9b8d02e8a6445ad7af10586 (diff) | |
download | Qt-ed881474111d635bb90d3e08e9fb70c06d19d48b.zip Qt-ed881474111d635bb90d3e08e9fb70c06d19d48b.tar.gz Qt-ed881474111d635bb90d3e08e9fb70c06d19d48b.tar.bz2 |
Upgrading libpng: Patches to libpng 1.5.10 for Qt usage
This is the collection of those earlier patches to libpng
in Qt that are still relevant, updated as required:
d6ba0e805fd2b17e2e0cbbce32e218551505d91f
91bf025444f13eb269ece6bb430a841638bb32a8
125dae45c5c8e09a58409095f6661ab65ea1e71f
d6947bcbed97889d7d56d400f81eb1691a3f18e1
Change-Id: I06603041b5971ade4742f600dbea4cca98ff95a5
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/3rdparty/libpng/pngpriv.h')
-rw-r--r-- | src/3rdparty/libpng/pngpriv.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h index e76a579..dd8c9b9 100644 --- a/src/3rdparty/libpng/pngpriv.h +++ b/src/3rdparty/libpng/pngpriv.h @@ -25,6 +25,12 @@ #ifndef PNGPRIV_H #define PNGPRIV_H +#ifdef _MSC_VER +# ifndef _CRT_SECURE_NO_DEPRECATE +# define _CRT_SECURE_NO_DEPRECATE +# endif +#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. @@ -97,6 +103,11 @@ # endif #endif /* Setting PNG_BUILD_DLL if required */ +/* Modfied for usage in Qt: Do not export the libpng APIs */ +#ifdef PNG_BUILD_DLL +#undef PNG_BUILD_DLL +#endif + /* See pngconf.h for more details: the builder of the library may set this on * the command line to the right thing for the specific compilation system or it * may be automagically set above (at present we know of no system where it does @@ -350,7 +361,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 */ @@ -360,7 +373,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() @@ -1584,7 +1597,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 |