diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-08-10 16:30:46 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-08-15 17:35:21 +0200 |
commit | 238455adfab4f8070ac65400aac22bb8a9e502fc (patch) | |
tree | 68dbe978bc7250338ba2de4bab0db5f2feb81b32 /newlib/libc/stdlib/gdtoa-gethex.c | |
parent | 5ef60b7e6a0abad86fe637197f738f8a90b525c8 (diff) | |
download | newlib-238455adfab4f8070ac65400aac22bb8a9e502fc.zip newlib-238455adfab4f8070ac65400aac22bb8a9e502fc.tar.gz newlib-238455adfab4f8070ac65400aac22bb8a9e502fc.tar.bz2 |
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/gdtoa-gethex.c')
-rw-r--r-- | newlib/libc/stdlib/gdtoa-gethex.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/newlib/libc/stdlib/gdtoa-gethex.c b/newlib/libc/stdlib/gdtoa-gethex.c index 3449c98..fd3903c 100644 --- a/newlib/libc/stdlib/gdtoa-gethex.c +++ b/newlib/libc/stdlib/gdtoa-gethex.c @@ -32,10 +32,10 @@ THIS SOFTWARE. #include <_ansi.h> #include <reent.h> #include <string.h> +#include <locale.h> #include "mprec.h" #include "gdtoa.h" #include "gd_qnan.h" -#include "locale.h" #if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__) && !defined(_SMALL_HEXDIG) _CONST unsigned char __hexdig[256]= @@ -145,13 +145,8 @@ _DEFUN (increment, (ptr, b), int -_DEFUN(gethex, (ptr, sp, fpi, exp, bp, sign), - struct _reent *ptr _AND - _CONST char **sp _AND - _CONST FPI *fpi _AND - Long *exp _AND - _Bigint **bp _AND - int sign) +gethex (struct _reent *ptr, const char **sp, const FPI *fpi, + Long *exp, _Bigint **bp, int sign, locale_t loc) { _Bigint *b; _CONST unsigned char *decpt, *s0, *s, *s1; @@ -159,7 +154,7 @@ _DEFUN(gethex, (ptr, sp, fpi, exp, bp, sign), __ULong L, lostbits, *x; Long e, e1; unsigned char *decimalpoint = (unsigned char *) - _localeconv_r (ptr)->decimal_point; + __localeconv_l (loc)->decimal_point; size_t decp_len = strlen ((const char *) decimalpoint); unsigned char decp_end = decimalpoint[decp_len - 1]; |