[libpng16] PNG_RELEASE_BUILD replaces tests where the code depended on the build base

type and can be defined on the command line, allowing testing in beta builds. Back
ported from libpng17.
This commit is contained in:
John Bowler
2015-05-06 20:03:14 -05:00
committed by Glenn Randers-Pehrson
parent 279dc3f0bf
commit 8ee821e69a
7 changed files with 27 additions and 7 deletions

View File

@@ -300,6 +300,22 @@
# define PNG_DLL_EXPORT
#endif
/* This is a global switch to set the compilation for an installed system
* (a release build). It can be set for testing debug builds to ensure that
* they will compile when the build type is switched to RC or STABLE, the
* default is just to use PNG_LIBPNG_BUILD_BASE_TYPE. Set this in CPPFLAGS
* with either:
*
* -DPNG_RELEASE_BUILD Turns on the release compile path
* -DPNG_RELEASE_BUILD=0 Turns it off
* or in your pngusr.h with
* #define PNG_RELEASE_BUILD=1 Turns on the release compile path
* #define PNG_RELEASE_BUILD=0 Turns it off
*/
#ifndef PNG_RELEASE_BUILD
# define PNG_RELEASE_BUILD (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC)
#endif
/* SECURITY and SAFETY:
*
* libpng is built with support for internal limits on image dimensions and