From fcdbbe0069c767a03f42f7615175ac03494de93a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 14 Jun 2010 17:15:41 -0700 Subject: [PATCH] strtod: Assume strtod() works when cross-compiling to new-enough glibc. --- ChangeLog | 4 +++- m4/strtod.m4 | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 47fe5b4809..48b37aaf22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2010-06-14 Ben Pfaff - * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code. + * m4/strtod.m4 (gl_FUNC_STRTOD): Factor out common code. Assume + that strtod() works when cross-compiling to a glibc version known + to work. 2010-06-15 Bruno Haible diff --git a/m4/strtod.m4 b/m4/strtod.m4 index 36b5d2dd8a..aa6a1c53d5 100644 --- a/m4/strtod.m4 +++ b/m4/strtod.m4 @@ -95,7 +95,19 @@ numeric_equal (double x, double y) ]])], [gl_cv_func_strtod_works=yes], [gl_cv_func_strtod_works=no], - [gl_cv_func_strtod_works="guessing no"])]) + [dnl The last known bugs in glibc strtod(), as of this writing, + dnl were fixed in version 2.8 + AC_EGREP_CPP([Lucky user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8) || (__GLIBC__ > 2) + Lucky user + #endif +#endif + ], + [gl_cv_func_strtod_works=yes], + [gl_cv_func_strtod_works="guessing no"])])]) if test "$gl_cv_func_strtod_works" != yes; then REPLACE_STRTOD=1 fi -- 2.30.2