From a136734f3fdc17bfb5924e30e597b00057c916d0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 7 Mar 2017 09:50:15 -0800 Subject: [PATCH] Remove isnan hack for Solaris 10 gcc 3.4.3 This seems to have been a false alarm (Bug#26018). * src/data.c (isnan): * src/floatfns.c (isfinite, isnan): Use standard implementation if available. --- src/data.c | 7 +++++-- src/floatfns.c | 13 ++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/data.c b/src/data.c index ae88e3f8aa5..29547d8a9ba 100644 --- a/src/data.c +++ b/src/data.c @@ -19,6 +19,8 @@ along with GNU Emacs. If not, see . */ #include + +#include #include #include @@ -2812,8 +2814,9 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) return val; } -#undef isnan -#define isnan(x) ((x) != (x)) +#ifndef isnan +# define isnan(x) ((x) != (x)) +#endif static Lisp_Object float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, diff --git a/src/floatfns.c b/src/floatfns.c index 8534f1d04e4..47553f27e82 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -47,13 +47,12 @@ along with GNU Emacs. If not, see . */ #include -/* 'isfinite' and 'isnan' cause build failures on Solaris 10 with the - bundled GCC in c99 mode. Work around the bugs with simple - implementations that are good enough. */ -#undef isfinite -#define isfinite(x) ((x) - (x) == 0) -#undef isnan -#define isnan(x) ((x) != (x)) +#ifndef isfinite +# define isfinite(x) ((x) - (x) == 0) +#endif +#ifndef isnan +# define isnan(x) ((x) != (x)) +#endif /* Check that X is a floating point number. */ -- 2.39.5