summaryrefslogtreecommitdiff
path: root/contrib/tools/pngfix.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-09-11 07:39:24 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-09-11 07:39:24 -0500
commit3a05d2df0f624d76d0dd7ddf945d72a128894490 (patch)
tree47533806dd5b650434e7648173079c6b7b1867a1 /contrib/tools/pngfix.c
parentde5e34f3ce7d63838fc1e0f0092c8fbe2572e86d (diff)
downloadlibpng-3a05d2df0f624d76d0dd7ddf945d72a128894490.tar.gz
[libpng16] Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
Diffstat (limited to 'contrib/tools/pngfix.c')
-rw-r--r--contrib/tools/pngfix.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c
index b194adbfe..4db0b14b5 100644
--- a/contrib/tools/pngfix.c
+++ b/contrib/tools/pngfix.c
@@ -18,7 +18,6 @@
#include <limits.h>
#include <errno.h>
#include <assert.h>
-#include <setjmp.h>
#define implies(x,y) assert(!(x) || (y))
@@ -50,6 +49,9 @@
# error "pngfix will not work with libpng prior to 1.6.3"
#endif
+#ifdef PNG_SETJMP_SUPPORTED
+#include <setjmp.h>
+
#if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED)
/* zlib.h defines the structure z_stream, an instance of which is included
* in this structure and is required for decompressing the LZ compressed
@@ -4035,3 +4037,12 @@ main(void)
return 77;
}
#endif /* PNG_READ_SUPPORTED && PNG_EASY_ACCESS_SUPPORTED */
+#else /* No setjmp support */
+int
+main(void)
+{
+ fprintf(stderr, "pngfix does not work without setjmp support\n");
+ return 77;
+}
+#endif /* PNG_SETJMP_SUPPORTED */
+