X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ffrexpl.m4;h=e2722910c1219eefaa88de50f393c32e94d7046f;hb=46f5f314f34a08c9305758482d7d2fdb0e999d09;hp=8e71420a304b9ffb0b9284b45c3f1c5c2c8e113a;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/m4/frexpl.m4 b/m4/frexpl.m4 index 8e71420a3..e2722910c 100644 --- a/m4/frexpl.m4 +++ b/m4/frexpl.m4 @@ -1,5 +1,5 @@ -# frexpl.m4 serial 18 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# frexpl.m4 serial 20 +dnl Copyright (C) 2007-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8,9 +8,14 @@ AC_DEFUN([gl_FUNC_FREXPL], [ AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) + + dnl Persuade glibc to declare frexpl(). + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + dnl Check whether it's declared. - dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . + dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) + FREXPL_LIBM= if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM @@ -68,7 +73,7 @@ AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], AC_REQUIRE([gl_MATH_H_DEFAULTS]) AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) dnl Check whether it's declared. - dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in . + dnl Mac OS X 10.3 has frexpl() in libc but doesn't declare it in . AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [[#include ]]) if test $HAVE_DECL_FREXPL = 1; then gl_CHECK_FREXPL_NO_LIBM @@ -108,8 +113,8 @@ AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM], ]) dnl Test whether frexpl() works on finite numbers (this fails on -dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers -dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this +dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers +dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this dnl fails e.g. on IRIX 6.5 and mingw). AC_DEFUN([gl_FUNC_FREXPL_WORKS], [ @@ -157,7 +162,7 @@ int main() if (exp != 5) result |= 1; } - /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl + /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl function returns an invalid (incorrectly normalized) value: it returns y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } but the correct result is @@ -196,7 +201,7 @@ int main() int exp; long double y = frexpl (x, &exp); /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, - exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */ + exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ if (exp != LDBL_MIN_EXP - 1) result |= 8; }