aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1993-08-09 06:04:14 +0000
committerJim Blandy1993-08-09 06:04:14 +0000
commit6d3c6adbdf4d047d007473ff693a9fade8563c42 (patch)
tree264a5b0e3f992820e35fab734cdf633c1f941911 /src
parent3a0ce8496de4efb386d7c1323b68f0b91b9e0de8 (diff)
downloademacs-6d3c6adbdf4d047d007473ff693a9fade8563c42.tar.gz
emacs-6d3c6adbdf4d047d007473ff693a9fade8563c42.zip
* config.h.in (HAVE_LOGB, HAVE_FREXP): Add #undefs for the
configuration script to edit. * floatfns.c (Flogb): Use HAVE_LOGB and HAVE_FREXP, instead of assuming that all USG systems have FREXP.
Diffstat (limited to 'src')
-rw-r--r--src/config.in2
-rw-r--r--src/floatfns.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/config.in b/src/config.in
index dafb759749a..78635b080fb 100644
--- a/src/config.in
+++ b/src/config.in
@@ -117,6 +117,8 @@ and this notice must be preserved on all copies. */
117#undef HAVE_RMDIR 117#undef HAVE_RMDIR
118#undef HAVE_RANDOM 118#undef HAVE_RANDOM
119#undef HAVE_BCOPY 119#undef HAVE_BCOPY
120#undef HAVE_LOGB
121#undef HAVE_FREXP
120 122
121#undef HAVE_AIX_SMT_EXP 123#undef HAVE_AIX_SMT_EXP
122 124
diff --git a/src/floatfns.c b/src/floatfns.c
index 90a2186d3f6..8f0515a84b5 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -635,7 +635,11 @@ This is the same as the exponent of a float.")
635 int value; 635 int value;
636 double f = extract_float (arg); 636 double f = extract_float (arg);
637 637
638#ifdef USG 638#ifdef HAVE_LOGB
639 IN_FLOAT (value = logb (f), "logb", arg);
640 XSET (val, Lisp_Int, value);
641#else
642#ifdef HAVE_FREXP
639 { 643 {
640 int exp; 644 int exp;
641 645
@@ -643,8 +647,8 @@ This is the same as the exponent of a float.")
643 XSET (val, Lisp_Int, exp-1); 647 XSET (val, Lisp_Int, exp-1);
644 } 648 }
645#else 649#else
646 IN_FLOAT (value = logb (f), "logb", arg); 650 Well, what *do* you have?
647 XSET (val, Lisp_Int, value); 651#endif
648#endif 652#endif
649 653
650 return val; 654 return val;