4 #include "stdio_impl.h"
7 static long double strtox(const char *s, char **p, int prec)
10 .buf = (void *)s, .rpos = (void *)s,
11 .rend = (void *)-1, .lock = -1
14 long double y = __floatscan(&f, prec, 1);
15 off_t cnt = shcnt(&f);
16 if (p) *p = cnt ? (char *)s + cnt : (char *)s;
20 float strtof(const char *restrict s, char **restrict p)
22 return strtox(s, p, 0);
25 double strtod(const char *restrict s, char **restrict p)
27 return strtox(s, p, 1);
30 long double strtold(const char *restrict s, char **restrict p)
32 return strtox(s, p, 2);
35 weak_alias(strtof, strtof_l);
36 weak_alias(strtod, strtod_l);
37 weak_alias(strtold, strtold_l);
38 weak_alias(strtof, __strtof_l);
39 weak_alias(strtod, __strtod_l);
40 weak_alias(strtold, __strtold_l);