From 056f3c62e331fd4adf8ad7fc3e7b3792bd28d21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 2 Jul 2004 17:54:40 +0000 Subject: [PATCH] Now exports the __strtoXX_internal() functions from glibc, too - some apps are using those. Their implementation is currently not complete; they just call the public functions, the group argument is ignored. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8277 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/stdlib/strtod.c | 12 ++++++++++++ src/kernel/libroot/posix/stdlib/strtol.c | 13 +++++++++++++ src/kernel/libroot/posix/stdlib/strtoll.c | 13 +++++++++++++ src/kernel/libroot/posix/stdlib/strtoul.c | 13 +++++++++++++ src/kernel/libroot/posix/stdlib/strtoull.c | 13 +++++++++++++ 5 files changed, 64 insertions(+) diff --git a/src/kernel/libroot/posix/stdlib/strtod.c b/src/kernel/libroot/posix/stdlib/strtod.c index d4456946e0..279e15969f 100644 --- a/src/kernel/libroot/posix/stdlib/strtod.c +++ b/src/kernel/libroot/posix/stdlib/strtod.c @@ -1601,6 +1601,18 @@ strtod(const char * __restrict s00, char ** __restrict se) } +double __strtod_internal(const char *number, char **_end, int group); + +double +__strtod_internal(const char *number, char **_end, int group) +{ + // ToDo: group is currently not supported! + (void)group; + + return strtod(number, _end); +} + + /* removed from the build, is only used by __dtoa() */ #if 0 static int diff --git a/src/kernel/libroot/posix/stdlib/strtol.c b/src/kernel/libroot/posix/stdlib/strtol.c index d76d699364..fe8883673f 100644 --- a/src/kernel/libroot/posix/stdlib/strtol.c +++ b/src/kernel/libroot/posix/stdlib/strtol.c @@ -135,3 +135,16 @@ noconv: *endptr = (char *)(any ? s - 1 : nptr); return (acc); } + + +long __strtol_internal(const char *number, char **_end, int base, int group); + +long +__strtol_internal(const char *number, char **_end, int base, int group) +{ + // ToDo: group is currently not supported! + (void)group; + + return strtol(number, _end, base); +} + diff --git a/src/kernel/libroot/posix/stdlib/strtoll.c b/src/kernel/libroot/posix/stdlib/strtoll.c index 5b0d307115..4771a122ff 100644 --- a/src/kernel/libroot/posix/stdlib/strtoll.c +++ b/src/kernel/libroot/posix/stdlib/strtoll.c @@ -137,3 +137,16 @@ noconv: return acc; } + + +long long __strtoll_internal(const char *number, char **_end, int base, int group); + +long long +__strtoll_internal(const char *number, char **_end, int base, int group) +{ + // ToDo: group is currently not supported! + (void)group; + + return strtoll(number, _end, base); +} + diff --git a/src/kernel/libroot/posix/stdlib/strtoul.c b/src/kernel/libroot/posix/stdlib/strtoul.c index b5e85a52dd..76f7c349c3 100644 --- a/src/kernel/libroot/posix/stdlib/strtoul.c +++ b/src/kernel/libroot/posix/stdlib/strtoul.c @@ -114,3 +114,16 @@ noconv: *endptr = (char *)(any ? s - 1 : nptr); return (acc); } + + +unsigned long __strtoul_internal(const char *number, char **_end, int base, int group); + +unsigned long +__strtoul_internal(const char *number, char **_end, int base, int group) +{ + // ToDo: group is currently not supported! + (void)group; + + return strtoul(number, _end, base); +} + diff --git a/src/kernel/libroot/posix/stdlib/strtoull.c b/src/kernel/libroot/posix/stdlib/strtoull.c index 164da2668d..709dc2bb76 100644 --- a/src/kernel/libroot/posix/stdlib/strtoull.c +++ b/src/kernel/libroot/posix/stdlib/strtoull.c @@ -115,3 +115,16 @@ noconv: return acc; } + + +unsigned long long __strtoull_internal(const char *number, char **_end, int base, int group); + +unsigned long long +__strtoull_internal(const char *number, char **_end, int base, int group) +{ + // ToDo: group is currently not supported! + (void)group; + + return strtoull(number, _end, base); +} +