From 3458f09caac5234831a315d073344fc898dde077 Mon Sep 17 00:00:00 2001 From: "Paul R. Eggert" Date: Mon, 12 Jul 2010 09:14:10 -0700 Subject: strtod: make it more-accurate typically, and don't require libm * lib/strtod.c (_GL_ARG_NONNULL): Remove; no longer needed. Include limits.h. Don't include string.h. (HAVE_LDEXP_IN_LIBC, HAVE_RAW_DECL_STRTOD): Define to 0 if not defined. (locale_isspace): New function, so that no casts are needed to check whether *s is a space. (ldexp): Provide an unused dummy if not available. (scale_radix_exp, parse_number, underlying_strtod): New functions. (strtod): Use them. This implementation prefers to use the underlying strtod if available, falling back on our own code only to fix known bugs. This is more likely to produce an accurate result. Also, it avoids the use of libm functions. * m4/strtod.m4 (gl_FUNC_STRTOD): Don't invoke _AC_LIBOBJ_STRTOD; no longer needed. Invoke AC_LIBOBJ([strtod]); don't know why this was absent, but it caused a test failure with coreutils. (gl_PREREQ_STRTOD): Check wither ldexp can be used without linking with libm. * modules/strtod (Makefile.am, Link): libm is no longer needed. * modules/strtod-tests (Makefile.am): Likewise. --- modules/strtod-tests | 1 - 1 file changed, 1 deletion(-) (limited to 'modules/strtod-tests') diff --git a/modules/strtod-tests b/modules/strtod-tests index 8d5be7f7f7..bea7825e77 100644 --- a/modules/strtod-tests +++ b/modules/strtod-tests @@ -11,6 +11,5 @@ signbit configure.ac: Makefile.am: -LIBS += $(POW_LIB) TESTS += test-strtod check_PROGRAMS += test-strtod -- cgit v1.2.1