]> git.eshelyaron.com Git - emacs.git/commitdiff
* image.c: Include <png.h> before <setjmp.h>.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 7 May 2014 18:20:18 +0000 (11:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 7 May 2014 18:20:18 +0000 (11:20 -0700)
Fixes: debbugs:17429
src/ChangeLog
src/image.c

index f8b12fafca087271e916b52b942e27ea287d4d66..3aef0c729f6bfb9f2258c0e5d1ee15f0de572abc 100644 (file)
@@ -1,3 +1,7 @@
+2014-05-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
+
 2014-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
index c459122a1b5f7843b87351a03201041cbd0b69e0..047f7517501f4085c13ddddb6fa5c8bfde9356ea 100644 (file)
@@ -21,6 +21,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sysstdio.h"
 #include <unistd.h>
 
+/* Include this before including <setjmp.h> to work around bugs with
+   older libpng; see Bug#17429.  */
+#if defined HAVE_PNG && !defined HAVE_NS
+# include <png.h>
+#endif
+
 #include <setjmp.h>
 #include <c-ctype.h>
 
@@ -5512,8 +5518,6 @@ png_image_p (Lisp_Object object)
 
 #if defined HAVE_PNG && !defined HAVE_NS
 
-#include <png.h>
-
 #ifdef WINDOWSNT
 /* PNG library details.  */