summaryrefslogtreecommitdiff
path: root/stdlib/strtol_l.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/strtol_l.c')
-rw-r--r--stdlib/strtol_l.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index f3319a8936..f4c17694ab 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2015 Free Software Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -137,8 +137,8 @@
# define UCHAR_TYPE wint_t
# define STRING_TYPE wchar_t
# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
-# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# define ISALPHA(Ch) __iswalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __towupper_l ((Ch), _nl_C_locobj_ptr)
#else
# if defined _LIBC \
|| defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
@@ -150,8 +150,8 @@
# define UCHAR_TYPE unsigned char
# define STRING_TYPE char
# define ISSPACE(Ch) __isspace_l ((Ch), loc)
-# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
-# define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# define ISALPHA(Ch) __isalpha_l ((Ch), _nl_C_locobj_ptr)
+# define TOUPPER(Ch) __toupper_l ((Ch), _nl_C_locobj_ptr)
#endif
#define INTERNAL(X) INTERNAL1(X)
@@ -222,12 +222,8 @@ extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden;
one converted is stored in *ENDPTR. */
INT
-INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- int group;
- __locale_t loc;
+INTERNAL (__strtol_l) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, int group, __locale_t loc)
{
int negative;
unsigned LONG int cutoff;
@@ -355,8 +351,8 @@ INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
&& (wchar_t) c != thousands
# else
&& ({ for (cnt = 0; cnt < thousands_len; ++cnt)
- if (thousands[cnt] != end[cnt])
- break;
+ if (thousands[cnt] != end[cnt])
+ break;
cnt < thousands_len; })
# endif
&& (!ISALPHA (c)
@@ -546,11 +542,8 @@ INT
#ifdef weak_function
weak_function
#endif
-__strtol_l (nptr, endptr, base, loc)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- __locale_t loc;
+__strtol_l (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, __locale_t loc)
{
return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
}