mirror of https://git.musl-libc.org/git/musl
Browse Source
strtod_l, strtof_l, and strtold_l originally existed only as glibc-ABI-compat symbols. as noted in the commit which added them,master17a60f9d32, making them aliases for the non-_l functions was a hack and not appropriate if they ever became public API. unfortunately, commit35eb1a1a9bdid make them public without undoing the hack. fix that now by moving the the _l functions to their own file as wrappers that just throw away the locale_t argument.
2 changed files with 22 additions and 7 deletions
@ -0,0 +1,22 @@ |
|||
#define _GNU_SOURCE |
|||
#include <stdlib.h> |
|||
#include <locale.h> |
|||
|
|||
float strtof_l(const char *restrict s, char **restrict p, locale_t l) |
|||
{ |
|||
return strtof(s, p); |
|||
} |
|||
|
|||
double strtod_l(const char *restrict s, char **restrict p, locale_t l) |
|||
{ |
|||
return strtod(s, p); |
|||
} |
|||
|
|||
long double strtold_l(const char *restrict s, char **restrict p, locale_t l) |
|||
{ |
|||
return strtold(s, p); |
|||
} |
|||
|
|||
weak_alias(strtof_l, __strtof_l); |
|||
weak_alias(strtod_l, __strtod_l); |
|||
weak_alias(strtold_l, __strtold_l); |
|||
Loading…
Reference in new issue