diff options
author | fvogel <fvogelnew1@free.fr> | 2020-01-02 21:00:22 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-01-02 21:00:22 (GMT) |
commit | 0188ad708298eb9ebd90c463e3000a0e67eeee91 (patch) | |
tree | 66a433ddfa6d6540979f6deab787f09c904f0c40 /generic | |
parent | 30d15963daa3545b3a2b09e6cd1f340f68723020 (diff) | |
parent | 019eea55c07628286aa1bfac23da59984bd2b96f (diff) | |
download | tcl-0188ad708298eb9ebd90c463e3000a0e67eeee91.zip tcl-0188ad708298eb9ebd90c463e3000a0e67eeee91.tar.gz tcl-0188ad708298eb9ebd90c463e3000a0e67eeee91.tar.bz2 |
Restore the build by providing a copysign replacement for old MSVC versions.
Diffstat (limited to 'generic')
-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 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. |