diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-17 17:30:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-17 17:30:13 (GMT) |
commit | e246b44499e406683adac8035e53d08b4dc0192a (patch) | |
tree | 871f197c9b3896ee27b62f946ee1b42f7062ceb9 /generic/tclInt.h | |
parent | aa93fba41a6764dce6c1f918388efd0f46136ada (diff) | |
download | tcl-e246b44499e406683adac8035e53d08b4dc0192a.zip tcl-e246b44499e406683adac8035e53d08b4dc0192a.tar.gz tcl-e246b44499e406683adac8035e53d08b4dc0192a.tar.bz2 |
Deprecate internal macro's TclIsInfinite() and TclIsNan(), since C99 has isinf() and isnan()
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index b82a473..75cd6e5 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4965,22 +4965,15 @@ MODULE_SCOPE Tcl_LibraryInitProc Procbodytest_SafeInit; /* *---------------------------------------------------------------- * Macros used by the Tcl core to test for some special double values. - * The ANSI C "prototypes" for these macros are: + * (deprecated) The ANSI C "prototypes" for these macros are: * * MODULE_SCOPE int TclIsInfinite(double d); * MODULE_SCOPE int TclIsNaN(double d); */ -#ifdef _MSC_VER -# define TclIsInfinite(d) (!(_finite((d)))) -# define TclIsNaN(d) (_isnan((d))) -#else -# define TclIsInfinite(d) ((d) > DBL_MAX || (d) < -DBL_MAX) -# ifdef NO_ISNAN -# define TclIsNaN(d) ((d) != (d)) -# else -# define TclIsNaN(d) (isnan(d)) -# endif +#if !defined(TCL_NO_DEPRECATED) && !defined(BUILD_tcl) +# define TclIsInfinite(d) isinf(d) +# define TclIsNaN(d) isnan(d) #endif /* |