aboutsummaryrefslogtreecommitdiff
path: root/system/lib
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib')
-rw-r--r--system/lib/libc.symbols6
-rw-r--r--system/lib/libc/musl/readme.txt1
-rw-r--r--system/lib/libc/musl/src/stdlib/strtod.c24
3 files changed, 22 insertions, 9 deletions
diff --git a/system/lib/libc.symbols b/system/lib/libc.symbols
index d9a20a98..6f80ef90 100644
--- a/system/lib/libc.symbols
+++ b/system/lib/libc.symbols
@@ -73,9 +73,9 @@
T scalbn
T scalbnl
T strtod
- W strtod_l
+ T strtod_l
T strtof
- W strtof_l
+ T strtof_l
T strtold
- W strtold_l
+ T strtold_l
W valloc
diff --git a/system/lib/libc/musl/readme.txt b/system/lib/libc/musl/readme.txt
index 02f3396a..9b9b6ad2 100644
--- a/system/lib/libc/musl/readme.txt
+++ b/system/lib/libc/musl/readme.txt
@@ -11,3 +11,4 @@ Differences from upstream musl include:
* Simplify fputwc to not rely on musl stream internals
* signgam is no longer a weak alias of __signgam.
* __toread and __towrite have had shutdown functionality removed.
+* Expand aliases for strto*_l() to short functions to remove warnings about incompatible pointer types.
diff --git a/system/lib/libc/musl/src/stdlib/strtod.c b/system/lib/libc/musl/src/stdlib/strtod.c
index 461dcf85..35f640da 100644
--- a/system/lib/libc/musl/src/stdlib/strtod.c
+++ b/system/lib/libc/musl/src/stdlib/strtod.c
@@ -32,9 +32,21 @@ long double strtold(const char *restrict s, char **restrict p)
return strtox(s, p, 2);
}
-weak_alias(strtof, strtof_l);
-weak_alias(strtod, strtod_l);
-weak_alias(strtold, strtold_l);
-weak_alias(strtof, __strtof_l);
-weak_alias(strtod, __strtod_l);
-weak_alias(strtold, __strtold_l);
+float strtof_l(const char *restrict s, char **restrict p, struct __locale_struct *loc)
+{
+ return strtof(s, p);
+}
+
+double strtod_l(const char *restrict s, char **restrict p, struct __locale_struct *loc)
+{
+ return strtod(s, p);
+}
+
+long double strtold_l(const char *restrict s, char **restrict p, struct __locale_struct *loc)
+{
+ return strtold(s, p);
+}
+
+weak_alias(strtof_l, __strtof_l);
+weak_alias(strtod_l, __strtod_l);
+weak_alias(strtold_l, __strtold_l);