diff --git a/test/cairo-test.c b/test/cairo-test.c index 3f37147..076b014 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -35,9 +35,6 @@ #include #include #include -#if HAVE_FEENABLEEXCEPT -#include -#endif #include #if HAVE_UNISTD_H #include diff --git a/test/cairo-test.h b/test/cairo-test.h index d41cd29..87ba7df 100644 --- a/test/cairo-test.h +++ b/test/cairo-test.h @@ -62,6 +62,26 @@ typedef unsigned __int64 uint64_t; #endif +#if HAVE_FENV_H +# include +#endif +/* The following are optional in C99, so define them if they aren't yet */ +#ifndef FE_DIVBYZERO +#define FE_DIVBYZERO 0 +#endif +#ifndef FE_INEXACT +#define FE_INEXACT 0 +#endif +#ifndef FE_INVALID +#define FE_INVALID 0 +#endif +#ifndef FE_OVERFLOW +#define FE_OVERFLOW 0 +#endif +#ifndef FE_UNDERFLOW +#define FE_UNDERFLOW 0 +#endif + #include static inline double diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c index 6cfaedf..9bb26be 100644 --- a/test/invalid-matrix.c +++ b/test/invalid-matrix.c @@ -33,10 +33,6 @@ #define INFINITY HUGE_VAL #endif -#if HAVE_FENV_H -# include -#endif - static cairo_test_status_t draw (cairo_t *cr, int width, int height) {