# HG changeset patch # User Eli Zaretskii # Date 1294083161 -7200 # Node ID 3fd4ea7be3a2c0c75d28fb706ee301f89b5b2306 # Parent 8abb8860e89c330bb310281e7bba79bb75c3ce45 Don't use png_jmpbuf, it doesn't work with dynamic loading. image.c (png_jmpbuf): Remove definition. (my_png_error, png_load): Don't use png_jmpbuf. diff -r 8abb8860e89c -r 3fd4ea7be3a2 src/ChangeLog --- a/src/ChangeLog Sun Jan 02 22:21:35 2011 -0800 +++ b/src/ChangeLog Mon Jan 03 21:32:41 2011 +0200 @@ -1,3 +1,8 @@ +2011-01-03 Eli Zaretskii + + * image.c (png_jmpbuf): Remove definition. + (my_png_error, png_load): Don't use png_jmpbuf. + 2010-12-31 Eli Zaretskii * image.c : New variable. diff -r 8abb8860e89c -r 3fd4ea7be3a2 src/image.c --- a/src/image.c Sun Jan 02 22:21:35 2011 -0800 +++ b/src/image.c Mon Jan 03 21:32:41 2011 +0200 @@ -5648,12 +5648,6 @@ #endif /* HAVE_NTGUI */ -/* libpng before 1.4.0 didn't have png_jmpbuf; v1.4.0 and later - deprecate direct access to png_ptr fields. */ -#ifndef png_jmpbuf -# define png_jmpbuf(PTR) ((PTR)->jmpbuf) -#endif - /* Error and warning handlers installed when the PNG library is initialized. */ @@ -5666,7 +5660,7 @@ /* Avoid compiler warning about deprecated direct access to png_ptr's fields in libpng versions 1.4.x. */ image_error ("PNG error: %s", build_string (msg), Qnil); - longjmp (png_jmpbuf (png_ptr), 1); + longjmp (png_ptr->jmpbuf, 1); } @@ -5842,7 +5836,7 @@ /* Set error jump-back. We come back here when the PNG library detects an error. */ - if (setjmp (png_jmpbuf (png_ptr))) + if (setjmp (png_ptr->jmpbuf)) { error: if (png_ptr)