[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a136734: Remove isnan hack for Solaris 10 gcc 3.4.3
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master a136734: Remove isnan hack for Solaris 10 gcc 3.4.3 |
Date: |
Tue, 7 Mar 2017 12:51:20 -0500 (EST) |
branch: master
commit a136734f3fdc17bfb5924e30e597b00057c916d0
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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 ae88e3f..29547d8 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/>. */
#include <config.h>
+
+#include <math.h>
#include <stdio.h>
#include <byteswap.h>
@@ -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 8534f1d..47553f2 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/>. */
#include <count-leading-zeros.h>
-/* '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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master a136734: Remove isnan hack for Solaris 10 gcc 3.4.3,
Paul Eggert <=