summaryrefslogtreecommitdiff
path: root/lib/strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strtod.c')
-rw-r--r--lib/strtod.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/strtod.c b/lib/strtod.c
index 5c43b4f5..e554a84f 100644
--- a/lib/strtod.c
+++ b/lib/strtod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2013 Free Software
+/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2014 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -31,9 +31,6 @@
#ifndef HAVE_LDEXP_IN_LIBC
#define HAVE_LDEXP_IN_LIBC 0
#endif
-#ifndef HAVE_RAW_DECL_STRTOD
-#define HAVE_RAW_DECL_STRTOD 0
-#endif
/* Return true if C is a space in the current locale, avoiding
problems with signed char and isspace. */
@@ -344,24 +341,11 @@ strtod (const char *nptr, char **endptr)
return negative ? -num : num;
}
-/* The "underlying" strtod implementation. This must be defined
+/* The underlying strtod implementation. This must be defined
after strtod because it #undefs strtod. */
static double
underlying_strtod (const char *nptr, char **endptr)
{
- if (HAVE_RAW_DECL_STRTOD)
- {
- /* Prefer the native strtod if available. Usually it should
- work and it should give more-accurate results than our
- approximation. */
- #undef strtod
- return strtod (nptr, endptr);
- }
- else
- {
- /* Approximate strtod well enough for this module. There's no
- need to handle anything but finite unsigned decimal
- numbers with nonnull ENDPTR. */
- return parse_number (nptr, 10, 10, 1, 'e', endptr);
- }
+#undef strtod
+ return strtod (nptr, endptr);
}