diff options
| author | Paul Eggert | 2017-03-07 09:50:15 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-03-07 09:51:16 -0800 |
| commit | a136734f3fdc17bfb5924e30e597b00057c916d0 (patch) | |
| tree | 936407c3678b779361c8411a899ff8f6b8f358b1 /src | |
| parent | 95f3fd204097fd78be27cf60b390677c6aad61ed (diff) | |
| download | emacs-a136734f3fdc17bfb5924e30e597b00057c916d0.tar.gz emacs-a136734f3fdc17bfb5924e30e597b00057c916d0.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 7 | ||||
| -rw-r--r-- | 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 <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | |||
| 23 | #include <math.h> | ||
| 22 | #include <stdio.h> | 24 | #include <stdio.h> |
| 23 | 25 | ||
| 24 | #include <byteswap.h> | 26 | #include <byteswap.h> |
| @@ -2812,8 +2814,9 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | |||
| 2812 | return val; | 2814 | return val; |
| 2813 | } | 2815 | } |
| 2814 | 2816 | ||
| 2815 | #undef isnan | 2817 | #ifndef isnan |
| 2816 | #define isnan(x) ((x) != (x)) | 2818 | # define isnan(x) ((x) != (x)) |
| 2819 | #endif | ||
| 2817 | 2820 | ||
| 2818 | static Lisp_Object | 2821 | static Lisp_Object |
| 2819 | float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code, | 2822 | 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 <http://www.gnu.org/licenses/>. */ | |||
| 47 | 47 | ||
| 48 | #include <count-leading-zeros.h> | 48 | #include <count-leading-zeros.h> |
| 49 | 49 | ||
| 50 | /* 'isfinite' and 'isnan' cause build failures on Solaris 10 with the | 50 | #ifndef isfinite |
| 51 | bundled GCC in c99 mode. Work around the bugs with simple | 51 | # define isfinite(x) ((x) - (x) == 0) |
| 52 | implementations that are good enough. */ | 52 | #endif |
| 53 | #undef isfinite | 53 | #ifndef isnan |
| 54 | #define isfinite(x) ((x) - (x) == 0) | 54 | # define isnan(x) ((x) != (x)) |
| 55 | #undef isnan | 55 | #endif |
| 56 | #define isnan(x) ((x) != (x)) | ||
| 57 | 56 | ||
| 58 | /* Check that X is a floating point number. */ | 57 | /* Check that X is a floating point number. */ |
| 59 | 58 | ||