about summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-20 09:26:43 -0400
committerZack Weinberg <zackw@panix.com>2017-06-20 20:30:06 -0400
commitaf85385f311c574590381f7897461643f8a2fe6f (patch)
treeb1cd7d3f16a4e66a60db7fd714b6cb9823fbdc35 /stdlib
parentf0be25b6336db7492e47d2e8e72eb8af53b5506d (diff)
downloadglibc-af85385f311c574590381f7897461643f8a2fe6f.tar.gz
glibc-af85385f311c574590381f7897461643f8a2fe6f.tar.xz
glibc-af85385f311c574590381f7897461643f8a2fe6f.zip
Use locale_t, not __locale_t, throughout glibc
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t.  Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.

	* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
	* include/monetary.h, include/stdlib.h, include/time.h
	* include/wchar.h, locale/duplocale.c, locale/freelocale.c
	* locale/global-locale.c, locale/langinfo.h, locale/locale.h
	* locale/localeinfo.h, locale/newlocale.c
	* locale/nl_langinfo_l.c, locale/uselocale.c
	* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
	* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
	* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
	* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
	* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
	* string/strcasecmp.c, string/strcoll_l.c, string/string.h
	* string/strings.h, string/strncase.c, string/strxfrm_l.c
	* sysdeps/ieee754/float128/strtof128_l.c
	* sysdeps/ieee754/float128/wcstof128.c
	* sysdeps/ieee754/float128/wcstof128_l.c
	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
	* sysdeps/ieee754/ldbl-64-128/strtold_l.c
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
	* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
	* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
	* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
	* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
	* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
	* sysdeps/x86_64/strcasecmp_l-nonascii.c
	* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
	* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
	* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
	* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
	* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
	* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
	* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
	* wctype/towctrans_l.c, wctype/wcfuncs_l.c
	* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
	Change all uses of __locale_t to locale_t.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/monetary.h2
-rw-r--r--stdlib/stdlib.h16
-rw-r--r--stdlib/strfmon_l.c4
-rw-r--r--stdlib/strtod_l.c6
-rw-r--r--stdlib/strtof_l.c2
-rw-r--r--stdlib/strtol.c2
-rw-r--r--stdlib/strtol_l.c4
-rw-r--r--stdlib/strtold_l.c6
-rw-r--r--stdlib/strtoll_l.c2
-rw-r--r--stdlib/strtoul_l.c2
-rw-r--r--stdlib/strtoull_l.c2
11 files changed, 24 insertions, 24 deletions
diff --git a/stdlib/monetary.h b/stdlib/monetary.h
index c1fcbf06d1..2c35cc15b9 100644
--- a/stdlib/monetary.h
+++ b/stdlib/monetary.h
@@ -45,7 +45,7 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
 
 /* Formatting a monetary value according to the given locale.  */
 extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
-			  __locale_t __loc,
+			  locale_t __loc,
 			  const char *__restrict __format, ...)
      __THROW __attribute_format_strfmon__ (4, 5);
 #endif
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index ce2602e03a..7a720cfd11 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -200,42 +200,42 @@ extern int strfromf128 (char *__dest, size_t __size, const char * __format,
 
 extern long int strtol_l (const char *__restrict __nptr,
 			  char **__restrict __endptr, int __base,
-			  __locale_t __loc) __THROW __nonnull ((1, 4));
+			  locale_t __loc) __THROW __nonnull ((1, 4));
 
 extern unsigned long int strtoul_l (const char *__restrict __nptr,
 				    char **__restrict __endptr,
-				    int __base, __locale_t __loc)
+				    int __base, locale_t __loc)
      __THROW __nonnull ((1, 4));
 
 __extension__
 extern long long int strtoll_l (const char *__restrict __nptr,
 				char **__restrict __endptr, int __base,
-				__locale_t __loc)
+				locale_t __loc)
      __THROW __nonnull ((1, 4));
 
 __extension__
 extern unsigned long long int strtoull_l (const char *__restrict __nptr,
 					  char **__restrict __endptr,
-					  int __base, __locale_t __loc)
+					  int __base, locale_t __loc)
      __THROW __nonnull ((1, 4));
 
 extern double strtod_l (const char *__restrict __nptr,
-			char **__restrict __endptr, __locale_t __loc)
+			char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
 extern float strtof_l (const char *__restrict __nptr,
-		       char **__restrict __endptr, __locale_t __loc)
+		       char **__restrict __endptr, locale_t __loc)
      __THROW __nonnull ((1, 3));
 
 extern long double strtold_l (const char *__restrict __nptr,
 			      char **__restrict __endptr,
-			      __locale_t __loc)
+			      locale_t __loc)
      __THROW __nonnull ((1, 3));
 
 # if __HAVE_FLOAT128
 extern _Float128 strtof128_l (const char *__restrict __nptr,
 			      char **__restrict __endptr,
-			      __locale_t __loc)
+			      locale_t __loc)
      __THROW __nonnull ((1, 3));
 # endif
 #endif /* GNU */
diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c
index af64173800..69ca9d5d3b 100644
--- a/stdlib/strfmon_l.c
+++ b/stdlib/strfmon_l.c
@@ -81,7 +81,7 @@ extern unsigned int __guess_grouping (unsigned int intdig_max,
    too.  Some of the information contradicts the information which can
    be specified in format string.  */
 ssize_t
-__vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format,
+__vstrfmon_l (char *s, size_t maxsize, locale_t loc, const char *format,
 	      va_list ap)
 {
   struct __locale_data *current = loc->__locales[LC_MONETARY];
@@ -609,7 +609,7 @@ __vstrfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format,
 }
 
 ssize_t
-___strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
+___strfmon_l (char *s, size_t maxsize, locale_t loc, const char *format, ...)
 {
   va_list ap;
 
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index a782a2434b..9fc9e4c013 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -19,7 +19,7 @@
 
 #include <locale.h>
 
-extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
+extern double ____strtod_l_internal (const char *, char **, int, locale_t);
 
 /* Configuration part.  These macros are defined by `strtold.c',
    `strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
@@ -484,7 +484,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
    ERANGE and return HUGE_VAL with the appropriate sign.  */
 FLOAT
 ____STRTOF_INTERNAL (const STRING_TYPE *nptr, STRING_TYPE **endptr, int group,
-		     __locale_t loc)
+		     locale_t loc)
 {
   int negative;			/* The sign of the number.  */
   MPN_VAR (num);		/* MP representation of the number.  */
@@ -1758,7 +1758,7 @@ FLOAT
 #ifdef weak_function
 weak_function
 #endif
-__STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr, __locale_t loc)
+__STRTOF (const STRING_TYPE *nptr, STRING_TYPE **endptr, locale_t loc)
 {
   return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
 }
diff --git a/stdlib/strtof_l.c b/stdlib/strtof_l.c
index ea76c344f4..33be42f96d 100644
--- a/stdlib/strtof_l.c
+++ b/stdlib/strtof_l.c
@@ -19,7 +19,7 @@
 
 #include <locale.h>
 
-extern float ____strtof_l_internal (const char *, char **, int, __locale_t);
+extern float ____strtof_l_internal (const char *, char **, int, locale_t);
 
 #define	FLOAT		float
 #define	FLT		FLT
diff --git a/stdlib/strtol.c b/stdlib/strtol.c
index 8ac8347e7d..d1e3bfe129 100644
--- a/stdlib/strtol.c
+++ b/stdlib/strtol.c
@@ -88,7 +88,7 @@
 
 
 extern INT INTERNAL (__strtol_l) (const STRING_TYPE *, STRING_TYPE **, int,
-				  int, __locale_t);
+				  int, locale_t);
 
 
 INT
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index 48e9ab5310..28ea4bced1 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -222,7 +222,7 @@ extern const unsigned char __strtol_ull_rem_tab[] attribute_hidden;
 
 INT
 INTERNAL (__strtol_l) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
-		       int base, int group, __locale_t loc)
+		       int base, int group, locale_t loc)
 {
   int negative;
   unsigned LONG int cutoff;
@@ -542,7 +542,7 @@ INT
 weak_function
 #endif
 __strtol_l (const STRING_TYPE *nptr, STRING_TYPE **endptr,
-	    int base, __locale_t loc)
+	    int base, locale_t loc)
 {
   return INTERNAL (__strtol_l) (nptr, endptr, base, 0, loc);
 }
diff --git a/stdlib/strtold_l.c b/stdlib/strtold_l.c
index 7b9efd8819..7445379fe0 100644
--- a/stdlib/strtold_l.c
+++ b/stdlib/strtold_l.c
@@ -35,12 +35,12 @@
 #define INTERNAL1(x) __##x##_internal
 
 extern double INTERNAL (__STRTOD) (const STRING_TYPE *, STRING_TYPE **,
-				   int, __locale_t);
+				   int, locale_t);
 
 /* There is no `long double' type, use the `double' implementations.  */
 long double
 INTERNAL (__STRTOLD) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
-		      int group, __locale_t loc)
+		      int group, locale_t loc)
 {
   return INTERNAL (__STRTOD) (nptr, endptr, group, loc);
 }
@@ -50,7 +50,7 @@ libc_hidden_def (INTERNAL (__STRTOLD))
 
 long double
 weak_function
-__STRTOLD (const STRING_TYPE *nptr, STRING_TYPE **endptr, __locale_t loc)
+__STRTOLD (const STRING_TYPE *nptr, STRING_TYPE **endptr, locale_t loc)
 {
   return INTERNAL (__STRTOD) (nptr, endptr, 0, loc);
 }
diff --git a/stdlib/strtoll_l.c b/stdlib/strtoll_l.c
index 003f425db8..93548d08d0 100644
--- a/stdlib/strtoll_l.c
+++ b/stdlib/strtoll_l.c
@@ -22,6 +22,6 @@
 #include <locale.h>
 
 extern long long int ____strtoll_l_internal (const char *, char **, int, int,
-					     __locale_t);
+					     locale_t);
 
 #include <strtol_l.c>
diff --git a/stdlib/strtoul_l.c b/stdlib/strtoul_l.c
index 45b0585342..8a0934c9ad 100644
--- a/stdlib/strtoul_l.c
+++ b/stdlib/strtoul_l.c
@@ -22,6 +22,6 @@
 #include <locale.h>
 
 extern unsigned long int ____strtoul_l_internal (const char *, char **, int,
-						 int, __locale_t);
+						 int, locale_t);
 
 #include "strtol_l.c"
diff --git a/stdlib/strtoull_l.c b/stdlib/strtoull_l.c
index da6d7cde8c..a9de8eb778 100644
--- a/stdlib/strtoull_l.c
+++ b/stdlib/strtoull_l.c
@@ -23,6 +23,6 @@
 #include <locale.h>
 
 extern unsigned long long int ____strtoull_l_internal (const char *, char **,
-						       int, int, __locale_t);
+						       int, int, locale_t);
 
 #include <strtol_l.c>