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. For details, refer to the git history of the src/3rdparty/libpng directory of Qt 4 and Qt 5/qtbase. Change-Id: Ia922441024536eec9b8ced8c3c5e4dc941ae152f Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
This commit is contained in:
parent
1fa1ce3628
commit
4a9fb41a79
2
src/3rdparty/libpng/pngconf.h
vendored
2
src/3rdparty/libpng/pngconf.h
vendored
@ -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>
|
||||
|
6
src/3rdparty/libpng/pngdebug.h
vendored
6
src/3rdparty/libpng/pngdebug.h
vendored
@ -85,7 +85,7 @@
|
||||
# define png_debug(l,m) \
|
||||
do { \
|
||||
int num_tabs=l; \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
|
||||
} while (0)
|
||||
# endif
|
||||
@ -93,7 +93,7 @@
|
||||
# define png_debug1(l,m,p1) \
|
||||
do { \
|
||||
int num_tabs=l; \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
|
||||
} while (0)
|
||||
# endif
|
||||
@ -101,7 +101,7 @@
|
||||
# define png_debug2(l,m,p1,p2) \
|
||||
do { \
|
||||
int num_tabs=l; \
|
||||
fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
|
||||
(num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
|
||||
} while (0)
|
||||
# endif
|
||||
|
3
src/3rdparty/libpng/pnglibconf.h
vendored
3
src/3rdparty/libpng/pnglibconf.h
vendored
@ -44,7 +44,9 @@
|
||||
#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
#define PNG_cHRM_SUPPORTED
|
||||
#define PNG_CONSOLE_IO_SUPPORTED
|
||||
#ifndef _WIN32_WCE
|
||||
#define PNG_CONVERT_tIME_SUPPORTED
|
||||
#endif
|
||||
#define PNG_EASY_ACCESS_SUPPORTED
|
||||
/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
|
||||
#define PNG_ERROR_TEXT_SUPPORTED
|
||||
@ -183,4 +185,5 @@
|
||||
#define PNG_WRITE_zTXt_SUPPORTED
|
||||
#define PNG_zTXt_SUPPORTED
|
||||
/* end of options */
|
||||
#define PNG_SAFE_LIMITS_SUPPORTED
|
||||
#endif /* PNGLCONF_H */
|
||||
|
13
src/3rdparty/libpng/pngpriv.h
vendored
13
src/3rdparty/libpng/pngpriv.h
vendored
@ -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
|
||||
@ -360,7 +371,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()
|
||||
|
Loading…
Reference in New Issue
Block a user