diff options
author | Paul R. Eggert <eggert@cs.ucla.edu> | 2010-07-12 09:14:10 -0700 |
---|---|---|
committer | Paul R. Eggert <eggert@lnxsrv01.seas.ucla.edu> | 2010-07-12 09:15:42 -0700 |
commit | 3458f09caac5234831a315d073344fc898dde077 (patch) | |
tree | 41f9f8348b29fe3c44f3bf18bdbff3fed6e02370 /modules | |
parent | 4482085b415661578d0dff98b4c99314d12b308b (diff) | |
download | gnulib-3458f09caac5234831a315d073344fc898dde077.tar.gz |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/strtod | 4 | ||||
-rw-r--r-- | modules/strtod-tests | 1 |
2 files changed, 0 insertions, 5 deletions
diff --git a/modules/strtod b/modules/strtod index 9a4a0f31d2..d4f64c13d4 100644 --- a/modules/strtod +++ b/modules/strtod @@ -15,14 +15,10 @@ gl_FUNC_STRTOD gl_STDLIB_MODULE_INDICATOR([strtod]) Makefile.am: -LIBS += $(POW_LIB) Include: <stdlib.h> -Link: -$(POW_LIB) - License: LGPL 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 |