summaryrefslogtreecommitdiff
path: root/ext/bigdecimal/missing.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bigdecimal/missing.c')
-rw-r--r--ext/bigdecimal/missing.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/bigdecimal/missing.c b/ext/bigdecimal/missing.c
new file mode 100644
index 0000000..b0bc6ee
--- /dev/null
+++ b/ext/bigdecimal/missing.c
@@ -0,0 +1,17 @@
+#include <ruby/ruby.h>
+
+#ifdef HAVE_RUBY_ATOMIC_H
+# include <ruby/atomic.h>
+#endif
+
+#ifdef RUBY_ATOMIC_PTR_CAS
+# define ATOMIC_PTR_CAS(var, old, new) RUBY_ATOMIC_PTR_CAS(var, old, new)
+#endif
+
+#undef strtod
+#define strtod BigDecimal_strtod
+#undef dtoa
+#define dtoa BigDecimal_dtoa
+#undef hdtoa
+#define hdtoa BigDecimal_hdtoa
+#include "missing/dtoa.c"