diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 21:04:27 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 21:40:05 +1000 |
commit | 751f4eeb228344937c1311a06c38ed1bc3aeffe8 (patch) | |
tree | 3dc65ba8fea750faf2bda56fae77ae05f5393294 | |
parent | [BUILTIN] Removed standalone/csh support from printf (diff) | |
download | dash-751f4eeb228344937c1311a06c38ed1bc3aeffe8.tar.gz dash-751f4eeb228344937c1311a06c38ed1bc3aeffe8.zip |
[SYSTEM] Added dummy strtod implementation
klibc doesn't have strtod or atof. So add an implementation that always fails by setting the end pointer to the input string.
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/system.h | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 588ee87..04fcd3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ * Disable histcmd completely when SMALL is defined. * Added default definition for SSIZE_MAX. * Removed standalone/csh support from printf. + * Added dummy strtod implementation. 2005-10-26 Herbert Xu <herbert@gondor.apana.org.au> diff --git a/configure.ac b/configure.ac index f6fe894..ed2ab02 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ dnl Checks for header files. dnl Checks for library functions. AC_CHECK_FUNCS(bsearch getpwnam getrlimit killpg mempcpy sigsetmask stpcpy \ - strchrnul strsignal strtoimax strtoumax) + strchrnul strsignal strtod strtoimax strtoumax) dnl Check for klibc signal. AC_CHECK_FUNC(signal) diff --git a/src/system.h b/src/system.h index 833e162..2737e9f 100644 --- a/src/system.h +++ b/src/system.h @@ -61,6 +61,14 @@ char *strchrnul(const char *, int); char *strsignal(int); #endif +#ifndef HAVE_STRTOD +static inline double strtod(const char *nptr, char **endptr) +{ + *endptr = (char *)nptr; + return 0; +} +#endif + #ifndef HAVE_STRTOIMAX #define strtoimax strtoll #endif |