From: Bruno Haible Date: Sun, 25 Mar 2007 22:21:06 +0000 (+0000) Subject: Avoid the completely broken frexpl() function of AIX 5.1. X-Git-Tag: cvs-readonly~669 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=b5a781f1425a6550a857c7f36816728aa1039665;p=gnulib.git Avoid the completely broken frexpl() function of AIX 5.1. --- diff --git a/ChangeLog b/ChangeLog index 7f2cfe974..ecb4bfed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-03-25 Bruno Haible + * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers. + +2007-03-25 Bruno Haible + Avoid test failures on IRIX 6.5. * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro. (main): Use it. diff --git a/m4/frexpl.m4 b/m4/frexpl.m4 index b10fee210..e3162c24d 100644 --- a/m4/frexpl.m4 +++ b/m4/frexpl.m4 @@ -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 ]) ])