diff options
author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-01-14 15:45:15 +0700 |
---|---|---|
committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2014-01-14 16:19:38 +0700 |
commit | 8016130a5149e2989c3986ba06400fce287006bb (patch) | |
tree | a7694da331a32246613d08c9146dcf99dfa8ed52 | |
parent | 8f85a8ed689957e72b161bad12e3d691507e1094 (diff) |
Expand aliases for strto*_l() to short functions.
This removes warnings about incompatible pointer types in asm2 mode.
-rw-r--r-- | system/lib/libc.symbols | 6 | ||||
-rw-r--r-- | system/lib/libc/musl/readme.txt | 1 | ||||
-rw-r--r-- | system/lib/libc/musl/src/stdlib/strtod.c | 24 |
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); |