summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclStrToD.c')
-rw-r--r--generic/tclStrToD.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 236fe59..e4487cb 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -18,6 +18,18 @@
#include <math.h>
/*
+ * Older MSVC has no copysign function, but it's available at least since
+ * MSVC++ 12.0 (that is Visual Studio 2013).
+ */
+
+#if (defined(_MSC_VER) && (_MSC_VER < 1800))
+inline static double
+copysign(double a, double b) {
+ return _copysign(a, b);
+}
+#endif
+
+/*
* This code supports (at least hypothetically), IBM, Cray, VAX and IEEE-754
* floating point; of these, only IEEE-754 can represent NaN. IEEE-754 can be
* uniquely determined by radix and by the widths of significand and exponent.