summaryrefslogtreecommitdiff
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-10-22 21:37:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-10-22 21:37:17 -0700
commite4ea223d7332952cc0e1275fa4c982645e11b17f (patch)
tree61d5958db59b27d659db37f404ecd424d9e5fc6d /src/floatfns.c
parent758bed52afd57bd140409bfbbeabb4a89b5182d3 (diff)
downloademacs-e4ea223d7332952cc0e1275fa4c982645e11b17f.tar.gz
Port to Solaris 10 and its bundled GCC.
Problem reported by Timothy C. Burt. * floatfns.c (isfinite, isnan): Redefine unconditionally.
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index f3d0936f888..9f0bab2a452 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -46,12 +46,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <math.h>
-#ifndef isfinite
-# define isfinite(x) ((x) - (x) == 0)
-#endif
-#ifndef isnan
-# define isnan(x) ((x) != (x))
-#endif
+/* '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))
/* Check that X is a floating point number. */