summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclStrToD.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index a535aed..60429c4 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -21,6 +21,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
+
+/*
* Define KILL_OCTAL to suppress interpretation of numbers with leading zero
* as octal. (Ceterum censeo: numeros octonarios delendos esse.)
*/