[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
frexpl: avoid bug on AIX
From: |
Bruno Haible |
Subject: |
frexpl: avoid bug on AIX |
Date: |
Mon, 26 Mar 2007 00:20:32 +0200 |
User-agent: |
KMail/1.5.4 |
The function frexpl() on AIX doesn't return reasonable values at all. It has
to be disabled in a configure test. I'm applying this:
2007-03-25 Bruno Haible <address@hidden>
* m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
*** m4/frexpl.m4 25 Mar 2007 21:35:38 -0000 1.2
--- m4/frexpl.m4 25 Mar 2007 22:17:45 -0000
***************
*** 58,65 ****
fi
])
! dnl Test whether frexpl() works also on infinite numbers (this fails e.g. on
! dnl IRIX 6.5).
AC_DEFUN([gl_FUNC_FREXPL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
--- 58,65 ----
fi
])
! 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,76 ****
--- 71,84 ----
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,89 ****
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";;
esac
])
])
--- 90,97 ----
return 0;
}], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no],
[case "$host_os" in
! aix* | irix*) gl_cv_func_frexpl_works="guessing no";;
! *) gl_cv_func_frexpl_works="guessing yes";;
esac
])
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- frexpl: avoid bug on AIX,
Bruno Haible <=