summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-05-07 11:20:18 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-05-07 11:20:18 -0700
commit1ba38c429fa6ce17568771ef51c8e53b1a72bb94 (patch)
treef1bd8da3362d9f933fcb202b0e643bb2d3ee1b7f
parent98e12950aee65b44beb43e9dcaa77bd2b5e2d308 (diff)
downloademacs-1ba38c429fa6ce17568771ef51c8e53b1a72bb94.tar.gz
* image.c: Include <png.h> before <setjmp.h>.
Fixes: debbugs:17429
-rw-r--r--src/ChangeLog4
-rw-r--r--src/image.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f8b12fafca0..3aef0c729f6 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/image.c b/src/image.c
index c459122a1b5..047f7517501 100644
--- a/src/image.c
+++ b/src/image.c
@@ -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. */