[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.
This commit is contained in:
Herbert Xu 2005-10-29 21:04:27 +10:00
parent e74aa1e960
commit 751f4eeb22
3 changed files with 10 additions and 1 deletions

View File

@ -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>

View File

@ -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)

View File

@ -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