[libpng16] Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)

This commit is contained in:
Glenn Randers-Pehrson 2014-09-11 07:39:24 -05:00
parent de5e34f3ce
commit 3a05d2df0f
3 changed files with 20 additions and 5 deletions

View File

@ -27,8 +27,10 @@ Changes since the last public release (1.6.13):
Version 1.6.14beta01 [September 11, 2014] Version 1.6.14beta01 [September 11, 2014]
Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED.
Add #include <setjmp.h> to contrib/tools/pngfix.c to allow "make" to Do not build contrib/tools/pngfix.c when PNG_SETJMP_NOT_SUPPORTED,
complete without setjmp support (bug report by Claudio Fontana) to allow "make" to complete without setjmp support (bug report by
Claudio Fontana)
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -4980,8 +4980,10 @@ Version 1.6.13 [August 21, 2014]
Version 1.6.14beta01 [September 11, 2014] Version 1.6.14beta01 [September 11, 2014]
Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED.
Add #include <setjmp.h> to contrib/tools/pngfix.c to allow "make" to Do not build contrib/tools/pngfix.c when PNG_SETJMP_NOT_SUPPORTED,
complete without setjmp support (bug report by Claudio Fontana) to allow "make" to complete without setjmp support (bug report by
Claudio Fontana)
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -18,7 +18,6 @@
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include <setjmp.h>
#define implies(x,y) assert(!(x) || (y)) #define implies(x,y) assert(!(x) || (y))
@ -50,6 +49,9 @@
# error "pngfix will not work with libpng prior to 1.6.3" # error "pngfix will not work with libpng prior to 1.6.3"
#endif #endif
#ifdef PNG_SETJMP_SUPPORTED
#include <setjmp.h>
#if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED) #if defined(PNG_READ_SUPPORTED) && defined(PNG_EASY_ACCESS_SUPPORTED)
/* zlib.h defines the structure z_stream, an instance of which is included /* zlib.h defines the structure z_stream, an instance of which is included
* in this structure and is required for decompressing the LZ compressed * in this structure and is required for decompressing the LZ compressed
@ -4035,3 +4037,12 @@ main(void)
return 77; return 77;
} }
#endif /* PNG_READ_SUPPORTED && PNG_EASY_ACCESS_SUPPORTED */ #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 */