提交 8d404733 编写于 作者: R Rich Felker

fix mismatched signatures for strtod_l family

strtod_l, strtof_l, and strtold_l originally existed only as
glibc-ABI-compat symbols. as noted in the commit which added them,
17a60f9d, making them aliases for the
non-_l functions was a hack and not appropriate if they ever became
public API.

unfortunately, commit 35eb1a1a did
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.
上级 98e688a9
#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);
......@@ -28,10 +28,3 @@ 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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册