diff --git a/configure.in b/configure.in index 268a709cc..2ec8f5619 100644 --- a/configure.in +++ b/configure.in @@ -126,7 +126,7 @@ esac AC_MSG_RESULT([$solaris_posix_pthread]) # check for GNU-extensions to fenv -AC_CHECK_HEADER(fenv.h, [AC_CHECK_FUNCS(feenableexcept)]) +AC_CHECK_HEADER(fenv.h, [AC_CHECK_FUNCS(feenableexcept fedisableexcept)]) dnl =========================================================================== dnl diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c index 42240bc9d..c25197f1a 100644 --- a/test/invalid-matrix.c +++ b/test/invalid-matrix.c @@ -30,6 +30,10 @@ #define HAVE_INFINITY 1 #endif +#if HAVE_FEDISABLEEXCEPT +#include +#endif + static cairo_test_draw_function_t draw; cairo_test_t test = { @@ -69,6 +73,11 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \ return CAIRO_TEST_FAILURE; \ } + /* clear floating point exceptions (added by cairo_test_init()) */ +#if HAVE_FEDISABLEEXCEPT + fedisableexcept (FE_INVALID); +#endif + /* create a bogus matrix and check results of attempted inversion */ bogus.x0 = bogus.xy = bogus.xx = strtod ("NaN", NULL); bogus.y0 = bogus.yx = bogus.yy = bogus.xx;