diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2017-10-11 19:13:46 -0700 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2017-10-11 19:13:46 -0700 |
commit | d5b634da61597aa8e80ba7d5bc39f092e5888515 (patch) | |
tree | deac81be3d6e5dcd58c2e9a97aaa06ebdb682af9 /src/cairoint.h | |
parent | 5a9dba9929d9c9046705150f7e3c4783ff34e4dd (diff) | |
download | cairo-d5b634da61597aa8e80ba7d5bc39f092e5888515.tar.gz |
Factor out the ISFINITE() macro
Diffstat (limited to 'src/cairoint.h')
-rw-r--r-- | src/cairoint.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairoint.h b/src/cairoint.h index 8573ae616..6f8303c3c 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -107,6 +107,12 @@ _cairo_win32_tmpfile (void); #undef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) +#if _XOPEN_SOURCE >= 600 || defined (_ISOC99_SOURCE) +#define ISFINITE(x) isfinite (x) +#else +#define ISFINITE(x) ((x) * (x) >= 0.) /* check for NaNs */ +#endif + #ifndef FALSE #define FALSE 0 #endif |