aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2011-09-06 13:47:45 -0700
committerPaul Eggert2011-09-06 13:47:45 -0700
commitc8199d0f9eb45a99de074ec10b893f737f738cd8 (patch)
treece31864f7f951b86b84a9f8cd2ae8c33c4883341
parent369e19fc45a4c2d4bf84da0d8e3f27050624a38c (diff)
downloademacs-c8199d0f9eb45a99de074ec10b893f737f738cd8.tar.gz
emacs-c8199d0f9eb45a99de074ec10b893f737f738cd8.zip
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.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in2
-rw-r--r--src/ChangeLog14
-rw-r--r--src/floatfns.c7
4 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f33d61ef9f1..437c6dba2f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
12011-09-06 Paul Eggert <eggert@cs.ucla.edu> 12011-09-06 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * configure.in (isnan): Remove now-unnecessary check.
4
52011-09-06 Paul Eggert <eggert@cs.ucla.edu>
6
3 Merge from gnulib, using build-aux to remove clutter (Bug#9169). 7 Merge from gnulib, using build-aux to remove clutter (Bug#9169).
4 This is to fix the following problems: 8 This is to fix the following problems:
5 . On FreeBSD 6.4, HP-UX 11.31, and Solaris 9, and when Emacs is 9 . On FreeBSD 6.4, HP-UX 11.31, and Solaris 9, and when Emacs is
diff --git a/configure.in b/configure.in
index a89297854a8..5116648c32a 100644
--- a/configure.in
+++ b/configure.in
@@ -2708,7 +2708,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
2708sendto recvfrom getsockopt setsockopt getsockname getpeername \ 2708sendto recvfrom getsockopt setsockopt getsockname getpeername \
2709gai_strerror mkstemp getline getdelim mremap fsync sync \ 2709gai_strerror mkstemp getline getdelim mremap fsync sync \
2710difftime mempcpy mblen mbrlen posix_memalign \ 2710difftime mempcpy mblen mbrlen posix_memalign \
2711cfmakeraw cfsetspeed isnan copysign __executable_start) 2711cfmakeraw cfsetspeed copysign __executable_start)
2712 2712
2713dnl Cannot use AC_CHECK_FUNCS 2713dnl Cannot use AC_CHECK_FUNCS
2714AC_CACHE_CHECK([for __builtin_unwind_init], 2714AC_CACHE_CHECK([for __builtin_unwind_init],
diff --git a/src/ChangeLog b/src/ChangeLog
index 6131249beb9..f1691252778 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,19 @@
12011-09-06 Paul Eggert <eggert@cs.ucla.edu> 12011-09-06 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 isnan: Fix porting problem to Solaris 10 with bundled gcc.
4 Without this fix, the command to link temacs failed due to an
5 undefined symbol __builtin_isnan. This is because
6 /usr/include/iso/math_c99.h #defines isnan(x) to
7 __builtin_isnan(x), but the bundled gcc, which identifies itself
8 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
9 a __builtin_isnan.
10 * floatfns.c (isnan): #undef, and then #define to a clone of
11 what's in data.c.
12 (Fisnan): Always define, since it's always available now.
13 (syms_of_floatfns): Always define isnan at the Lisp level.
14
152011-09-06 Paul Eggert <eggert@cs.ucla.edu>
16
3 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169). 17 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
4 18
52011-09-06 Paul Eggert <eggert@cs.ucla.edu> 192011-09-06 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/src/floatfns.c b/src/floatfns.c
index 89aa052e8b1..81cf6bdb61f 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -282,7 +282,9 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0,
282 return make_float (d); 282 return make_float (d);
283} 283}
284 284
285#if defined HAVE_ISNAN && defined HAVE_COPYSIGN 285#undef isnan
286#define isnan(x) ((x) != (x))
287
286DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, 288DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
287 doc: /* Return non nil iff argument X is a NaN. */) 289 doc: /* Return non nil iff argument X is a NaN. */)
288 (Lisp_Object x) 290 (Lisp_Object x)
@@ -291,6 +293,7 @@ DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
291 return isnan (XFLOAT_DATA (x)) ? Qt : Qnil; 293 return isnan (XFLOAT_DATA (x)) ? Qt : Qnil;
292} 294}
293 295
296#ifdef HAVE_COPYSIGN
294DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0, 297DEFUN ("copysign", Fcopysign, Scopysign, 1, 2, 0,
295 doc: /* Copy sign of X2 to value of X1, and return the result. 298 doc: /* Copy sign of X2 to value of X1, and return the result.
296Cause an error if X1 or X2 is not a float. */) 299Cause an error if X1 or X2 is not a float. */)
@@ -1030,8 +1033,8 @@ syms_of_floatfns (void)
1030 defsubr (&Scos); 1033 defsubr (&Scos);
1031 defsubr (&Ssin); 1034 defsubr (&Ssin);
1032 defsubr (&Stan); 1035 defsubr (&Stan);
1033#if defined HAVE_ISNAN && defined HAVE_COPYSIGN
1034 defsubr (&Sisnan); 1036 defsubr (&Sisnan);
1037#ifdef HAVE_COPYSIGN
1035 defsubr (&Scopysign); 1038 defsubr (&Scopysign);
1036 defsubr (&Sfrexp); 1039 defsubr (&Sfrexp);
1037 defsubr (&Sldexp); 1040 defsubr (&Sldexp);