summaryrefslogtreecommitdiff
path: root/prism/defines.h
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2024-12-03 09:18:46 +0900
committerHiroshi SHIBATA <[email protected]>2024-12-03 09:53:17 +0900
commit59d23174c01d201b4a1bbc0eaab32b167a3cb975 (patch)
tree39e785c03f1559bf0efc5fda9ce0c3e0ec2ed096 /prism/defines.h
parent4e382c285fc3080f013a10cdce5408a97823fd3b (diff)
Added missing header file for _finite
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12232
Diffstat (limited to 'prism/defines.h')
-rw-r--r--prism/defines.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/prism/defines.h b/prism/defines.h
index 785361728e..80db39bc77 100644
--- a/prism/defines.h
+++ b/prism/defines.h
@@ -137,6 +137,14 @@
#endif
/**
+ * 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.
+ */
+#ifdef _WIN32
+# include <float.h>
+#endif
+
+/**
* If you build prism with a custom allocator, configure it with
* "-D PRISM_XALLOCATOR" to use your own allocator that defines xmalloc,
* xrealloc, xcalloc, and xfree.