]> granicus.if.org Git - imagemagick/commitdiff
Reverted latest change to coders/png.c
authorglennrp <glennrp@git.imagemagick.org>
Sat, 19 Feb 2011 19:15:38 +0000 (19:15 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Sat, 19 Feb 2011 19:15:38 +0000 (19:15 +0000)
ChangeLog
coders/png.c

index 126a3b9715b7f0487a0dc2e04ca1380f69721ace..fe844811d71f55bf3968df23b8f92b2f9416090d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,3 @@
-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.
 
index f002d837803b862e68f3920fa766ad728cec81cd..f03e13d3973074e686105f423d968410d7c57f3d 100644 (file)
@@ -91,9 +91,7 @@
 /* #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 */
-#if (PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER < 10500)
-   #define PNG_DEPSTRUCT  /* Access to this struct member is deprecated */
-#endif
+/* #define PNG_DEPSTRUCT    Access to this struct member is deprecated */
 
 #include "png.h"
 #include "zlib.h"
@@ -1347,6 +1345,9 @@ static void MagickPNGErrorHandler(png_struct *ping,png_const_charp message)
     message,"`%s'",image->filename);
 
 #if (PNG_LIBPNG_VER < 10500)
+  /* A warning about deprecated use of jmpbuf here is unavoidable if you
+   * are building with libpng-1.4.x and can be ignored.
+   */
   longjmp(ping->jmpbuf,1);
 #else
   png_longjmp(ping,1);
@@ -1733,12 +1734,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 
   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.
@@ -2399,12 +2395,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
   /*
     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.
@@ -7451,12 +7442,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
   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.
@@ -8749,12 +8735,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
   /*
     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.