From 158c112e03dcd064327688576f00d1d8150d2932 Mon Sep 17 00:00:00 2001 From: fvogel Date: Thu, 2 Jan 2020 20:56:20 +0000 Subject: Restore the build by providing a copysign replacement for old MSVC versions. --- generic/tclStrToD.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 /* + * 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.) */ -- cgit v0.12