From: Paul Eggert Date: Tue, 7 Mar 2017 17:50:15 +0000 (-0800) Subject: Remove isnan hack for Solaris 10 gcc 3.4.3 X-Git-Tag: emacs-26.0.90~620 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a136734f3fdc17bfb5924e30e597b00057c916d0;p=emacs.git 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. --- 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. */