mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Do not include <fenv.h> when FLOATING_ARITHMETIC is not supported.
This commit is contained in:
parent
996046aed5
commit
baa95a2d49
7
ANNOUNCE
7
ANNOUNCE
@ -1,4 +1,4 @@
|
|||||||
Libpng 1.6.14beta02 - September 14, 2014
|
Libpng 1.6.14beta02 - September 18, 2014
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
This is not intended to be a public release. It will be replaced
|
||||||
within a few weeks by a public version or by another test version.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -32,12 +32,15 @@ Version 1.6.14beta01 [September 14, 2014]
|
|||||||
Claudio Fontana)
|
Claudio Fontana)
|
||||||
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
||||||
|
|
||||||
Version 1.6.14beta02 [September 14, 2014]
|
Version 1.6.14beta02 [September 18, 2014]
|
||||||
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
||||||
because usleep() is deprecated.
|
because usleep() is deprecated.
|
||||||
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
||||||
in unistd.h and nanosleep() is not available; fixes error introduced
|
in unistd.h and nanosleep() is not available; fixes error introduced
|
||||||
in libpng-1.6.13.
|
in libpng-1.6.13.
|
||||||
|
Disable floating point exception handling in pngvalid.c when
|
||||||
|
PNG_FLOATING_ARITHMETIC is not supported (bug report by "zootus
|
||||||
|
at users.sourceforge.net").
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
5
CHANGES
5
CHANGES
@ -4985,12 +4985,15 @@ Version 1.6.14beta01 [September 14, 2014]
|
|||||||
Claudio Fontana)
|
Claudio Fontana)
|
||||||
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
Add "#include <setjmp.h>" to contrib/tools/pngfix.c (John Bowler)
|
||||||
|
|
||||||
Version 1.6.14beta02 [September 14, 2014]
|
Version 1.6.14beta02 [September 18, 2014]
|
||||||
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
Use nanosleep() instead of usleep() in contrib/gregbook/rpng2-x.c
|
||||||
because usleep() is deprecated.
|
because usleep() is deprecated.
|
||||||
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
Define usleep() in contrib/gregbook/rpng2-x.c if not already defined
|
||||||
in unistd.h and nanosleep() is not available; fixes error introduced
|
in unistd.h and nanosleep() is not available; fixes error introduced
|
||||||
in libpng-1.6.13.
|
in libpng-1.6.13.
|
||||||
|
Disable floating point exception handling in pngvalid.c when
|
||||||
|
PNG_FLOATING_ARITHMETIC is not supported (bug report by "zootus
|
||||||
|
at users.sourceforge.net").
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@ -30,10 +30,6 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FEENABLEEXCEPT /* from config.h, if included */
|
|
||||||
# include <fenv.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Define the following to use this test against your installed libpng, rather
|
/* Define the following to use this test against your installed libpng, rather
|
||||||
* than the one being built here:
|
* than the one being built here:
|
||||||
*/
|
*/
|
||||||
@ -43,6 +39,13 @@
|
|||||||
# include "../../png.h"
|
# include "../../png.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||||
|
# ifdef HAVE_FEENABLEEXCEPT /* from config.h, if included */
|
||||||
|
# include <fenv.h>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PNG_ZLIB_HEADER
|
#ifdef PNG_ZLIB_HEADER
|
||||||
# include PNG_ZLIB_HEADER
|
# include PNG_ZLIB_HEADER
|
||||||
#else
|
#else
|
||||||
@ -9976,9 +9979,11 @@ static void signal_handler(int signum)
|
|||||||
pos = safecat(msg, sizeof msg, pos, "abort");
|
pos = safecat(msg, sizeof msg, pos, "abort");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||||
case SIGFPE:
|
case SIGFPE:
|
||||||
pos = safecat(msg, sizeof msg, pos, "floating point exception");
|
pos = safecat(msg, sizeof msg, pos, "floating point exception");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case SIGILL:
|
case SIGILL:
|
||||||
pos = safecat(msg, sizeof msg, pos, "illegal instruction");
|
pos = safecat(msg, sizeof msg, pos, "illegal instruction");
|
||||||
@ -10044,18 +10049,21 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* Add appropriate signal handlers, just the ANSI specified ones: */
|
/* Add appropriate signal handlers, just the ANSI specified ones: */
|
||||||
signal(SIGABRT, signal_handler);
|
signal(SIGABRT, signal_handler);
|
||||||
signal(SIGFPE, signal_handler);
|
|
||||||
signal(SIGILL, signal_handler);
|
signal(SIGILL, signal_handler);
|
||||||
signal(SIGINT, signal_handler);
|
signal(SIGINT, signal_handler);
|
||||||
signal(SIGSEGV, signal_handler);
|
signal(SIGSEGV, signal_handler);
|
||||||
signal(SIGTERM, signal_handler);
|
signal(SIGTERM, signal_handler);
|
||||||
|
|
||||||
#ifdef HAVE_FEENABLEEXCEPT
|
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
|
||||||
|
signal(SIGFPE, signal_handler);
|
||||||
|
|
||||||
|
# ifdef HAVE_FEENABLEEXCEPT
|
||||||
/* Only required to enable FP exceptions on platforms where they start off
|
/* Only required to enable FP exceptions on platforms where they start off
|
||||||
* disabled; this is not necessary but if it is not done pngvalid will likely
|
* disabled; this is not necessary but if it is not done pngvalid will likely
|
||||||
* end up ignoring FP conditions that other platforms fault.
|
* end up ignoring FP conditions that other platforms fault.
|
||||||
*/
|
*/
|
||||||
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
|
feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
modifier_init(&pm);
|
modifier_init(&pm);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user