diff options
| author | fvogel <fvogelnew1@free.fr> | 2020-01-02 20:56:46 (GMT) |
|---|---|---|
| committer | fvogel <fvogelnew1@free.fr> | 2020-01-02 20:56:46 (GMT) |
| commit | 019eea55c07628286aa1bfac23da59984bd2b96f (patch) | |
| tree | 9b198aef14d5994e7b751aab9163f4cf3a2202c3 /generic/tclStrToD.c | |
| parent | 8140d238ea3c4ce1eecd0bf976c2870c68a41090 (diff) | |
| parent | 158c112e03dcd064327688576f00d1d8150d2932 (diff) | |
| download | tcl-019eea55c07628286aa1bfac23da59984bd2b96f.zip tcl-019eea55c07628286aa1bfac23da59984bd2b96f.tar.gz tcl-019eea55c07628286aa1bfac23da59984bd2b96f.tar.bz2 | |
Restore the build by providing a copysign replacement for old MSVC versions.
Diffstat (limited to 'generic/tclStrToD.c')
| -rw-r--r-- | generic/tclStrToD.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c index 06b69e5..aafd282 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 + +/* * Define KILL_OCTAL to suppress interpretation of numbers with leading zero * as octal. (Ceterum censeo: numeros octonarios delendos esse.) */ |
