X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Ffrexp.m4;h=33e07f598b8c60c5c000de96255b6e01eaa1ed4a;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=4162195e5372f4ff00461fcb7576e8ff987952f9;hpb=4ee107046a0ffd91f6c60c787326a5e27b799f6d;p=debian%2Fgzip diff --git a/m4/frexp.m4 b/m4/frexp.m4 index 4162195..33e07f5 100644 --- a/m4/frexp.m4 +++ b/m4/frexp.m4 @@ -1,5 +1,5 @@ -# frexp.m4 serial 13 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# frexp.m4 serial 16 +dnl Copyright (C) 2007-2018 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. @@ -93,7 +93,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([alarm]) + AC_CHECK_DECLS_ONCE([alarm]) AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works], [ AC_RUN_IFELSE( @@ -101,13 +101,14 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS], #include #include #include -#if HAVE_ALARM +#if HAVE_DECL_ALARM +# include # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. ICC 10.0 has a bug when optimizing the expression -zero. The expression -DBL_MIN * DBL_MIN does not work when cross-compiling - to PowerPC on MacOS X 10.5. */ + to PowerPC on Mac OS X 10.5. */ #if defined __hpux || defined __sgi || defined __ICC static double compute_minus_zero (void) @@ -124,9 +125,10 @@ int main() int i; volatile double x; double zero = 0.0; -#if HAVE_ALARM +#if HAVE_DECL_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ + signal (SIGALRM, SIG_DFL); alarm (5); #endif /* Test on denormalized numbers. */ @@ -162,8 +164,17 @@ int main() [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in - netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; - *) gl_cv_func_frexp_works="guessing yes";; + netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; + mingw*) # Guess yes with MSVC, no with mingw. + AC_EGREP_CPP([Good], [ +#ifdef _MSC_VER + Good +#endif + ], + [gl_cv_func_frexp_works="guessing yes"], + [gl_cv_func_frexp_works="guessing no"]) + ;; + *) gl_cv_func_frexp_works="guessing yes" ;; esac ]) ])