]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove isnan hack for Solaris 10 gcc 3.4.3
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Mar 2017 17:50:15 +0000 (09:50 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Mar 2017 17:51:16 +0000 (09:51 -0800)
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
src/floatfns.c

index ae88e3f8aa5741b567b4ce1871b371041c377fef..29547d8a9baa4dd6a1a1e54a29e714bf780c700a 100644 (file)
@@ -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,
index 8534f1d04e4b213423ab8a45dfb5c4164e4304e8..47553f27e827c1b1dd201f1458e6caaf0e750ad1 100644 (file)
@@ -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.  */