summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdlib/strtorx.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-08-10 16:30:46 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-08-15 17:35:21 +0200
commit238455adfab4f8070ac65400aac22bb8a9e502fc (patch)
tree68dbe978bc7250338ba2de4bab0db5f2feb81b32 /newlib/libc/stdlib/strtorx.c
parent5ef60b7e6a0abad86fe637197f738f8a90b525c8 (diff)
downloadcygnal-238455adfab4f8070ac65400aac22bb8a9e502fc.tar.gz
cygnal-238455adfab4f8070ac65400aac22bb8a9e502fc.tar.bz2
cygnal-238455adfab4f8070ac65400aac22bb8a9e502fc.zip
Implement strto[dflu]_l/wcsto[dflu]_l
Implement GNU extensions strtod_l, strtof_l, strtol_l, strtold_l, strtoll_l, strtoul_l, strtoull_l, wcstod_l, wcstof_l, wcstol_l, wcstold_l, wcstoll_l, wcstoul_l, wcstoull_l. Export from Cygwin, fix posix.xml. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/stdlib/strtorx.c')
-rw-r--r--newlib/libc/stdlib/strtorx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newlib/libc/stdlib/strtorx.c b/newlib/libc/stdlib/strtorx.c
index 961ecd2f2..aeeb25066 100644
--- a/newlib/libc/stdlib/strtorx.c
+++ b/newlib/libc/stdlib/strtorx.c
@@ -105,9 +105,10 @@ ULtox(__UShort *L, __ULong *bits, Long exp, int k)
int
#ifdef KR_headers
-_strtorx_r(p, s, sp, rounding, L) struct _reent *p; const char *s; char **sp; int rounding; void *L;
+_strtorx_l(p, s, sp, rounding, L, loc) struct _reent *p; const char *s; char **sp; int rounding; void *L; locale_t loc;
#else
-_strtorx_r(struct _reent *p, const char *s, char **sp, int rounding, void *L)
+_strtorx_l(struct _reent *p, const char *s, char **sp, int rounding, void *L,
+ locale_t loc)
#endif
{
static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI };
@@ -122,7 +123,7 @@ _strtorx_r(struct _reent *p, const char *s, char **sp, int rounding, void *L)
fpi1.rounding = rounding;
fpi = &fpi1;
}
- k = _strtodg_r(p, s, sp, fpi, &exp, bits);
+ k = _strtodg_l(p, s, sp, fpi, &exp, bits, loc);
ULtox((__UShort*)L, bits, exp, k);
return k;
}