emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105668: isnan: Fix porting problem t


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105668: isnan: Fix porting problem to Solaris 10 with bundled gcc.
Date: Tue, 06 Sep 2011 13:47:45 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105668
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2011-09-06 13:47:45 -0700
message:
  isnan: Fix porting problem to Solaris 10 with bundled gcc.
  
  Without this fix, the command to link temacs failed due to an
  undefined symbol __builtin_isnan.  This is because
  /usr/include/iso/math_c99.h #defines isnan(x) to
  __builtin_isnan(x), but the bundled gcc, which identifies itself
  as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
  a __builtin_isnan.
  * configure.in (isnan): Remove now-unnecessary check.
  * src/floatfns.c (isnan): #undef, and then #define to a clone of
  what's in data.c.
  (Fisnan): Always define, since it's always available now.
  (syms_of_floatfns): Always define isnan at the Lisp level.
modified:
  ChangeLog
  configure.in
  src/ChangeLog
  src/floatfns.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2011-09-06 16:34:41 +0000
+++ b/ChangeLog 2011-09-06 20:47:45 +0000
@@ -1,5 +1,9 @@
 2011-09-06  Paul Eggert  <address@hidden>
 
+       * configure.in (isnan): Remove now-unnecessary check.
+
+2011-09-06  Paul Eggert  <address@hidden>
+
        Merge from gnulib, using build-aux to remove clutter (Bug#9169).
        This is to fix the following problems:
         . On FreeBSD 6.4, HP-UX 11.31, and Solaris 9, and when Emacs is

=== modified file 'configure.in'
--- a/configure.in      2011-09-04 23:58:01 +0000
+++ b/configure.in      2011-09-06 20:47:45 +0000
@@ -2708,7 +2708,7 @@
 sendto recvfrom getsockopt setsockopt getsockname getpeername \
 gai_strerror mkstemp getline getdelim mremap fsync sync \
 difftime mempcpy mblen mbrlen posix_memalign \
-cfmakeraw cfsetspeed isnan copysign __executable_start)
+cfmakeraw cfsetspeed copysign __executable_start)
 
 dnl Cannot use AC_CHECK_FUNCS
 AC_CACHE_CHECK([for __builtin_unwind_init],

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-06 16:34:41 +0000
+++ b/src/ChangeLog     2011-09-06 20:47:45 +0000
@@ -1,5 +1,19 @@
 2011-09-06  Paul Eggert  <address@hidden>
 
+       isnan: Fix porting problem to Solaris 10 with bundled gcc.
+       Without this fix, the command to link temacs failed due to an
+       undefined symbol __builtin_isnan.  This is because
+       /usr/include/iso/math_c99.h #defines isnan(x) to
+       __builtin_isnan(x), but the bundled gcc, which identifies itself
+       as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
+       a __builtin_isnan.
+       * floatfns.c (isnan): #undef, and then #define to a clone of
+       what's in data.c.
+       (Fisnan): Always define, since it's always available now.
+       (syms_of_floatfns): Always define isnan at the Lisp level.
+
+2011-09-06  Paul Eggert  <address@hidden>
+
        * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
 
 2011-09-06  Paul Eggert  <address@hidden>

=== modified file 'src/floatfns.c'
--- a/src/floatfns.c    2011-07-11 06:05:57 +0000
+++ b/src/floatfns.c    2011-09-06 20:47:45 +0000
@@ -282,7 +282,9 @@
   return make_float (d);
 }
 
-#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
+#undef isnan
+#define isnan(x) ((x) != (x))
+
 DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
        doc: /* Return non nil iff argument X is a NaN.  */)
   (Lisp_Object x)
@@ -291,6 +293,7 @@
   return isnan (XFLOAT_DATA (x)) ? Qt : Qnil;
 }
 
+#ifdef HAVE_COPYSIGN
 DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0,
        doc: /* Copy sign of X2 to value of X1, and return the result.
 Cause an error if X1 or X2 is not a float.  */)
@@ -1030,8 +1033,8 @@
   defsubr (&Scos);
   defsubr (&Ssin);
   defsubr (&Stan);
-#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
   defsubr (&Sisnan);
+#ifdef HAVE_COPYSIGN
   defsubr (&Scopysign);
   defsubr (&Sfrexp);
   defsubr (&Sldexp);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]