diff --git a/ANNOUNCE b/ANNOUNCE index 4f5b0164..a6208ceb 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -86,7 +86,9 @@ version 1.2.36beta04 [April 5, 2009] Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) version 1.2.36beta05 [April 13, 2009] - None. + Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow + application code writers to bypass the check for multiple inclusion + of setjmp.h when they know that it is safe to ignore the situation. Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/CHANGES b/CHANGES index e7c94ee5..ff5767e1 100644 --- a/CHANGES +++ b/CHANGES @@ -2353,7 +2353,10 @@ version 1.2.36beta04 [April 5, 2009] Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles) version 1.2.36beta05 [April 13, 2009] - None. + Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow + application code writers to bypass the check for multiple inclusion + of setjmp.h when they know that it is safe to ignore the situation. + Made some cosmetic changes to whitespace in pngtest output. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngconf.h b/pngconf.h index 346875a7..300589f8 100644 --- a/pngconf.h +++ b/pngconf.h @@ -314,21 +314,29 @@ #ifdef PNG_SETJMP_SUPPORTED /* This is an attempt to force a single setjmp behaviour on Linux. If * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. + * + * You can bypass this test if you know that your application uses exactly + * the same setjmp.h that was included when libpng was built. Only define + * PNG_SKIP_SETJMP_CHECK while building your application, prior to the + * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK + * while building a separate libpng library for general use. */ -# ifdef __linux__ -# ifdef _BSD_SOURCE -# define PNG_SAVE_BSD_SOURCE -# undef _BSD_SOURCE -# endif -# ifdef _SETJMP_H - /* If you encounter a compiler error here, see the explanation - * near the end of INSTALL. - */ - __pngconf.h__ already includes setjmp.h; - __dont__ include it again.; -# endif -# endif /* __linux__ */ +# ifndef PNG_SKIP_SETJMP_CHECK +# ifdef __linux__ +# ifdef _BSD_SOURCE +# define PNG_SAVE_BSD_SOURCE +# undef _BSD_SOURCE +# endif +# ifdef _SETJMP_H + /* If you encounter a compiler error here, see the explanation + * near the end of INSTALL. + */ + __pngconf.h__ in libpng already includes setjmp.h; + __dont__ include it again.; +# endif +# endif /* __linux__ */ +# endif /* PNG_SKIP_SETJMP_CHECK */ /* include setjmp.h for error handling */ # include