aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1993-08-09 06:04:14 +0000
committerJim Blandy <[email protected]>1993-08-09 06:04:14 +0000
commit6d3c6adbdf4d047d007473ff693a9fade8563c42 (patch)
tree264a5b0e3f992820e35fab734cdf633c1f941911 /src
parent3a0ce8496de4efb386d7c1323b68f0b91b9e0de8 (diff)
* 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 dafb759749..78635b080f 100644
--- a/src/config.in
+++ b/src/config.in
@@ -117,6 +117,8 @@ and this notice must be preserved on all copies. */
#undef HAVE_RMDIR
#undef HAVE_RANDOM
#undef HAVE_BCOPY
+#undef HAVE_LOGB
+#undef HAVE_FREXP
#undef HAVE_AIX_SMT_EXP
diff --git a/src/floatfns.c b/src/floatfns.c
index 90a2186d3f..8f0515a84b 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -635,7 +635,11 @@ This is the same as the exponent of a float.")
int value;
double f = extract_float (arg);
-#ifdef USG
+#ifdef HAVE_LOGB
+ IN_FLOAT (value = logb (f), "logb", arg);
+ XSET (val, Lisp_Int, value);
+#else
+#ifdef HAVE_FREXP
{
int exp;
@@ -643,8 +647,8 @@ This is the same as the exponent of a float.")
XSET (val, Lisp_Int, exp-1);
}
#else
- IN_FLOAT (value = logb (f), "logb", arg);
- XSET (val, Lisp_Int, value);
+ Well, what *do* you have?
+#endif
#endif
return val;