summaryrefslogtreecommitdiff
path: root/prism/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'prism/defines.h')
-rw-r--r--prism/defines.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/prism/defines.h b/prism/defines.h
index 80db39bc77..f7bb2120c4 100644
--- a/prism/defines.h
+++ b/prism/defines.h
@@ -138,10 +138,14 @@
/**
* isinf on POSIX systems it accepts a float, a double, or a long double.
- * But Windows didn't provide isinf, so we need to use _finite instead.
+ * But mingw didn't provide an isinf macro, only an isinf function that only
+ * accepts floats, so we need to use _finite instead.
*/
-#ifdef _WIN32
-# include <float.h>
+#ifdef __MINGW64__
+ #include <float.h>
+ #define PRISM_ISINF(x) (!_finite(x))
+#else
+ #define PRISM_ISINF(x) isinf(x)
#endif
/**