Avoid the completely broken frexpl() function of AIX 5.1.
authorBruno Haible <bruno@clisp.org>
Sun, 25 Mar 2007 22:21:06 +0000 (22:21 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 25 Mar 2007 22:21:06 +0000 (22:21 +0000)
ChangeLog
m4/frexpl.m4

index 7f2cfe9..ecb4bfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-03-25  Bruno Haible  <bruno@clisp.org>
 
+       * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
+
+2007-03-25  Bruno Haible  <bruno@clisp.org>
+
        Avoid test failures on IRIX 6.5.
        * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
        (main): Use it.
index b10fee2..e3162c2 100644 (file)
@@ -58,8 +58,8 @@ AC_DEFUN([gl_FUNC_FREXPL],
   fi
 ])
 
-dnl Test whether frexpl() works also on infinite numbers (this fails e.g. on
-dnl IRIX 6.5).
+dnl Test whether frexpl() works on finite numbers (this fails on AIX 5.1) and
+dnl also on infinite numbers (this fails e.g. on IRIX 6.5).
 AC_DEFUN([gl_FUNC_FREXPL_WORKS],
 [
   AC_REQUIRE([AC_PROG_CC])
@@ -71,6 +71,14 @@ AC_DEFUN([gl_FUNC_FREXPL_WORKS],
 int main()
 {
   volatile long double x;
+  /* Test on finite numbers.  */
+  {
+    int exp = -9999;
+    x = 16.0L;
+    frexpl (x, &exp);
+    if (exp != 5)
+      return 1;
+  }
   /* Test on infinite numbers.  */
   {
     x = 1.0L / 0.0L;
@@ -82,8 +90,8 @@ int main()
   return 0;
 }], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no],
       [case "$host_os" in
-         irix*) gl_cv_func_frexpl_works="guessing no";;
-         *)     gl_cv_func_frexpl_works="guessing yes";;
+         aix* | irix*) gl_cv_func_frexpl_works="guessing no";;
+         *)            gl_cv_func_frexpl_works="guessing yes";;
        esac
       ])
     ])