+2011-02-18 6.6.7-8 Glenn Randers-Pehrson <glennrp@image...>
+ * Use setjmp() instead of png_setjmp() when building with libpng-1.4.x
+ because png_setjmp() references png_set_longjmp_fn() which was not
+ exported by libpng-1.4.x.
+
2011-02-15 6.6.7-8 Cristy <quetzlzacatenango@image...>
* New version 6.6.7-8.
/* #define PNG_USE_RESULT The result of this function must be checked */
/* #define PNG_NORETURN This function does not return */
/* #define PNG_ALLOCATED The result of the function is new memory */
-/* #define PNG_DEPSTRUCT Access to this struct member is deprecated */
+#if (PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER < 10500)
+ #define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
+#endif
#include "png.h"
#include "zlib.h"
ping_pixels=(unsigned char *) NULL;
+#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
+#else
+ /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
+ if (setjmp(ping->jmpbuf))
+#endif
{
/*
PNG image is corrupt.
/*
Convert PNG pixels to pixel packets.
*/
+#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
+#else
+ /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
+ if (setjmp(ping->jmpbuf))
+#endif
{
/*
PNG image is corrupt.
png_set_write_fn(ping,image,png_put_data,png_flush_data);
ping_pixels=(unsigned char *) NULL;
+#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
+#else
+ /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
+ if (setjmp(ping->jmpbuf))
+#endif
{
/*
PNG write failed.
/*
Initialize image scanlines.
*/
+#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
+#else
+ /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
+ if (setjmp(ping->jmpbuf))
+#endif
{
/*
PNG write failed.