Rename xlocale.h to bits/types/__locale_t.h.
authorZack Weinberg <zackw@panix.com>
Fri, 9 Jun 2017 16:02:06 +0000 (12:02 -0400)
committerZack Weinberg <zackw@panix.com>
Wed, 21 Jun 2017 00:28:11 +0000 (20:28 -0400)
xlocale.h is already a single-type micro-header, defining struct
__locale_struct and the typedefs __locale_t and locale_t.  This patch
brings it into the bits/types/ scheme: there are now
bits/types/__locale_t.h which defines only __locale_struct and
__locale_t, and bits/types/locale_t.h which defines locale_t as well
as the other two.  None of *our* headers need __locale_t.h, but it
appears to me that libstdc++ could make use of it.

There are a lot of external uses of xlocale.h, but all the uses I
checked had an autoconf test or equivalent for its existence.  It has
never been available from other C libraries, and it has always
contained a comment reading "This file is not standardized, don't rely
on it, it can go away without warning" so I think dropping it is
pretty safe.

I also took the opportunity to clean up comments in various public
header files that still talk about the *_l interfaces as though they
were completely nonstandard.  There are a few of them, notably the
strtoX_l and wcstoX_l families, that haven't been standardized, but
the bulk are in POSIX.1-2008.

        * locale/xlocale.h: Rename to...
* locale/bits/types/__locale_t.h: ...here.  Adjust commentary.
Only define struct __locale_struct and __locale_t, not locale_t.
        * locale/bits/types/locale_t.h: New file; define locale_t here.
        * locale/Makefile (headers): Update to match.

        * include/xlocale.h: Delete wrapper.
        * include/bits/types/__locale_t.h: New wrapper.
        * include/bits/types/locale_t.h: New wrapper.

        * ctype/ctype.h, include/printf.h, include/time.h
        * locale/langinfo.h, locale/locale.h, stdlib/monetary.h
        * stdlib/stdlib.h, string/string.h, string/strings.h, time/time.h
        * wcsmbs/wchar.h, wctype/wctype.h: Use bits/types/locale_t.h.
        Correct outdated comments regarding the standardization status of
        the functions that take locale_t arguments.

        * stdlib/strtod_l.c, stdlib/strtof_l.c, stdlib/strtol_l.c
        * stdlib/strtold_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
        * sysdeps/ieee754/ldbl-128ibm/strtold_l.c
        * sysdeps/ieee754/ldbl-64-128/strtold_l.c
        * wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
        * wcsmbs/wcstof_l.c, wcsmbs/wcstold.c, wcsmbs/wcstold_l.c:
        Don't include xlocale.h. If necessary, include locale.h instead.

        * stdlib/strtold_l.c: Unconditionally include wchar.h.

36 files changed:
ChangeLog
NEWS
ctype/ctype.h
dev/null [new file with mode: 0644]
include/bits/types/__locale_t.h [new file with mode: 0644]
include/bits/types/locale_t.h [new file with mode: 0644]
include/printf.h
include/time.h
include/xlocale.h [deleted file]
locale/Makefile
locale/bits/types/__locale_t.h [moved from locale/xlocale.h with 72% similarity]
locale/bits/types/locale_t.h [new file with mode: 0644]
locale/langinfo.h
locale/locale.h
stdlib/monetary.h
stdlib/stdlib.h
stdlib/strtod_l.c
stdlib/strtof_l.c
stdlib/strtol_l.c
stdlib/strtold_l.c
stdlib/strtoll_l.c
stdlib/strtoul_l.c
stdlib/strtoull_l.c
string/string.h
string/strings.h
sysdeps/ieee754/ldbl-128ibm/strtold_l.c
sysdeps/ieee754/ldbl-64-128/strtold_l.c
time/time.h
wcsmbs/wchar.h
wcsmbs/wcstod.c
wcsmbs/wcstod_l.c
wcsmbs/wcstof.c
wcsmbs/wcstof_l.c
wcsmbs/wcstold.c
wcsmbs/wcstold_l.c
wctype/wctype.h

index 84f177d..c7877ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2017-06-20  Zack Weinberg  <zackw@panix.com>
+
+        * locale/xlocale.h: Rename to...
+       * locale/bits/types/__locale_t.h: ...here.  Adjust commentary.
+       Only define struct __locale_struct and __locale_t, not locale_t.
+        * locale/bits/types/locale_t.h: New file; define locale_t here.
+        * locale/Makefile (headers): Update to match.
+
+        * include/xlocale.h: Delete wrapper.
+        * include/bits/types/__locale_t.h: New wrapper.
+        * include/bits/types/locale_t.h: New wrapper.
+
+        * ctype/ctype.h, include/printf.h, include/time.h
+        * locale/langinfo.h, locale/locale.h, stdlib/monetary.h
+        * stdlib/stdlib.h, string/string.h, string/strings.h, time/time.h
+        * wcsmbs/wchar.h, wctype/wctype.h: Use bits/types/locale_t.h.
+        Correct outdated comments regarding the standardization status of
+        the functions that take locale_t arguments.
+
+        * stdlib/strtod_l.c, stdlib/strtof_l.c, stdlib/strtol_l.c
+        * stdlib/strtold_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
+        * sysdeps/ieee754/ldbl-128ibm/strtold_l.c
+        * sysdeps/ieee754/ldbl-64-128/strtold_l.c
+        * wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
+        * wcsmbs/wcstof_l.c, wcsmbs/wcstold.c, wcsmbs/wcstold_l.c:
+        Don't include xlocale.h. If necessary, include locale.h instead.
+
+        * stdlib/strtold_l.c: Unconditionally include wchar.h.
+
 2017-06-20  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * sysdeps/unix/sysv/linux/openat.c (__libc_openat): Build only
diff --git a/NEWS b/NEWS
index 4db334b..0736b4b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,10 @@ Version 2.26
   as this kind of optimization is better done by the compiler.  The macros
   __USE_STRING_INLINES and __NO_STRING_INLINES no longer have any effect.
 
+* The nonstandard header <xlocale.h> has been removed.  Most programs should
+  use <locale.h> instead.  If you have a specific need for the definition
+  of locale_t with no other declarations, please talk to us.
+
 * The reallocarray function has been added to libc.  It is a realloc
   replacement with a check for integer overflow when calculating total
   allocation size.
index 1fe89cf..ce598d5 100644 (file)
@@ -233,20 +233,8 @@ __NTH (toupper (int __c))
 
 
 #ifdef __USE_XOPEN2K8
-/* The concept of one static locale per category is not very well
-   thought out.  Many applications will need to process its data using
-   information from several different locales.  Another application is
-   the implementation of the internationalization handling in the
-   upcoming ISO C++ standard library.  To support this another set of
-   the functions using locale data exist which have an additional
-   argument.
-
-   Attention: all these functions are *not* standardized in any form.
-   This is a proof-of-concept implementation.  */
-
-/* Structure for reentrant locale using functions.  This is an
-   (almost) opaque type for the user level programs.  */
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+# include <bits/types/locale_t.h>
 
 /* These definitions are similar to the ones above but all functions
    take as an argument a handle for the locale which shall be used.  */
diff --git a/dev/null b/dev/null
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/include/bits/types/__locale_t.h b/include/bits/types/__locale_t.h
new file mode 100644 (file)
index 0000000..610b819
--- /dev/null
@@ -0,0 +1 @@
+#include <locale/bits/types/__locale_t.h>
diff --git a/include/bits/types/locale_t.h b/include/bits/types/locale_t.h
new file mode 100644 (file)
index 0000000..24b0748
--- /dev/null
@@ -0,0 +1 @@
+#include <locale/bits/types/locale_t.h>
index 984f263..7b4d209 100644 (file)
@@ -4,7 +4,7 @@
 
 # ifndef _ISOMAC
 
-#include <xlocale.h>
+#include <bits/types/locale_t.h>
 
 /* Now define the internal interfaces.  */
 extern int __printf_fphex (FILE *, const struct printf_info *,
index 3a828e0..0a67cf3 100644 (file)
@@ -2,7 +2,7 @@
 #include <time/time.h>
 
 #ifndef _ISOMAC
-# include <xlocale.h>
+# include <bits/types/locale_t.h>
 
 extern __typeof (strftime_l) __strftime_l;
 libc_hidden_proto (__strftime_l)
diff --git a/include/xlocale.h b/include/xlocale.h
deleted file mode 100644 (file)
index 5280ef0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <locale/xlocale.h>
index d9ef48f..98ee762 100644 (file)
@@ -22,7 +22,8 @@ subdir        := locale
 
 include ../Makeconfig
 
-headers                = locale.h bits/locale.h langinfo.h xlocale.h
+headers                = langinfo.h locale.h bits/locale.h \
+                 bits/types/locale_t.h bits/types/__locale_t.h
 routines       = setlocale findlocale loadlocale loadarchive \
                  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
                  newlocale duplocale freelocale uselocale
similarity index 72%
rename from locale/xlocale.h
rename to locale/bits/types/__locale_t.h
index 20b2c11..4511aa1 100644 (file)
@@ -1,4 +1,4 @@
-/* Definition of locale datatype.
+/* Definition of struct __locale_struct and __locale_t.
    Copyright (C) 1997-2017 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _XLOCALE_H
-#define _XLOCALE_H     1
+#ifndef _BITS_TYPES___LOCALE_T_H
+#define _BITS_TYPES___LOCALE_T_H 1
 
-/* Structure for reentrant locale using functions.  This is an
-   (almost) opaque type for the user level programs.  The file and
-   this data structure is not standardized.  Don't rely on it.  It can
-   go away without warning.  */
-typedef struct __locale_struct
+/* POSIX.1-2008: the locale_t type, representing a locale context
+   (implementation-namespace version).  This type should be treated
+   as opaque by applications; some details are exposed for the sake of
+   efficiency in e.g. ctype functions.  */
+
+struct __locale_struct
 {
   /* Note: LC_ALL is not a valid index into this array.  */
   struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */
@@ -36,9 +37,8 @@ typedef struct __locale_struct
 
   /* Note: LC_ALL is not a valid index into this array.  */
   const char *__names[13];
-} *__locale_t;
+};
 
-/* POSIX 2008 makes locale_t official.  */
-typedef __locale_t locale_t;
+typedef struct __locale_struct *__locale_t;
 
-#endif /* xlocale.h */
+#endif /* bits/types/__locale_t.h */
diff --git a/locale/bits/types/locale_t.h b/locale/bits/types/locale_t.h
new file mode 100644 (file)
index 0000000..de7ec2e
--- /dev/null
@@ -0,0 +1,26 @@
+/* Definition of locale_t.
+   Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _BITS_TYPES_LOCALE_T_H
+#define _BITS_TYPES_LOCALE_T_H 1
+
+#include <bits/types/__locale_t.h>
+
+typedef __locale_t locale_t;
+
+#endif /* bits/types/locale_t.h */
index 759adfb..93d8446 100644 (file)
@@ -584,11 +584,8 @@ extern char *nl_langinfo (nl_item __item) __THROW;
 
 
 #ifdef __USE_XOPEN2K8
-/* This interface is for the extended locale model.  See <locale.h> for
-   more information.  */
-
-/* Get locale datatype definition.  */
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+# include <bits/types/locale_t.h>
 
 /* Just like nl_langinfo but get the information from the locale object L.  */
 extern char *nl_langinfo_l (nl_item __item, __locale_t __l);
index 9a5fce9..6c1b220 100644 (file)
@@ -126,19 +126,13 @@ extern struct lconv *localeconv (void) __THROW;
 
 
 #ifdef __USE_XOPEN2K8
-/* The concept of one static locale per category is not very well
-   thought out.  Many applications will need to process its data using
-   information from several different locales.  Another application is
-   the implementation of the internationalization handling in the
-   upcoming ISO C++ standard library.  To support this another set of
-   the functions using locale data exist which have an additional
-   argument.
-
-   Attention: all these functions are *not* standardized in any form.
-   This is a proof-of-concept implementation.  */
-
-/* Get locale datatype definition.  */
-# include <xlocale.h>
+/* POSIX.1-2008 extends the locale interface with functions for
+   explicit creation and manipulation of 'locale_t' objects
+   representing locale contexts, and a set of parallel
+   locale-sensitive text processing functions that take a locale_t
+   argument.  This enables applications to work with data from
+   multiple locales simultaneously and thread-safely.  */
+# include <bits/types/locale_t.h>
 
 /* Return a reference to a data structure representing a set of locale
    datasets.  Unlike for the CATEGORY parameter for `setlocale' the
index dcfbfc5..c1fcbf0 100644 (file)
@@ -40,7 +40,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
      __THROW __attribute_format_strfmon__ (3, 4);
 
 #ifdef __USE_XOPEN2K8
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+# include <bits/types/locale_t.h>
 
 /* Formatting a monetary value according to the given locale.  */
 extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
index 6f1e70e..ce2602e 100644 (file)
@@ -193,23 +193,11 @@ extern int strfromf128 (char *__dest, size_t __size, const char * __format,
 
 
 #ifdef __USE_GNU
-/* The concept of one static locale per category is not very well
-   thought out.  Many applications will need to process its data using
-   information from several different locales.  Another problem is
-   the implementation of the internationalization handling in the
-   ISO C++ standard library.  To support this another set of
-   the functions using locale data exist which take an additional
-   argument.
-
-   Attention: even though several *_l interfaces are part of POSIX:2008,
-   these are not.  */
-
-/* Structure for reentrant locale using functions.  This is an
-   (almost) opaque type for the user level programs.  */
-# include <xlocale.h>
-
-/* Special versions of the functions above which take the locale to
-   use as an additional parameter.  */
+/* Parallel versions of the functions above which take the locale to
+   use as an additional parameter.  These are GNU extensions inspired
+   by the POSIX.1-2008 extended locale API.  */
+# include <bits/types/locale_t.h>
+
 extern long int strtol_l (const char *__restrict __nptr,
                          char **__restrict __endptr, int __base,
                          __locale_t __loc) __THROW __nonnull ((1, 4));
index 99c2af3..a782a24 100644 (file)
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <xlocale.h>
+#include <locale.h>
 
 extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
 
@@ -46,7 +46,6 @@ extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
 #include <errno.h>
 #include <float.h>
 #include "../locale/localeinfo.h"
-#include <locale.h>
 #include <math.h>
 #include <math_private.h>
 #include <stdlib.h>
index 57e5575..ea76c34 100644 (file)
@@ -17,7 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <xlocale.h>
+#include <locale.h>
 
 extern float ____strtof_l_internal (const char *, char **, int, __locale_t);
 
index 5a0683b..48e9ab5 100644 (file)
@@ -41,7 +41,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <locale.h>
-#include <xlocale.h>
 #include <stdint.h>
 #include <bits/wordsize.h>
 
index bef2a4d..7b9efd8 100644 (file)
 
 #include <math.h>
 #include <stdlib.h>
-#include <xlocale.h>
-
-#if defined _LIBC || defined HAVE_WCHAR_H
-# include <wchar.h>
-#endif
+#include <wchar.h>
 
 #ifdef USE_WIDE_CHAR
 # define STRING_TYPE   wchar_t
index 2a712eb..003f425 100644 (file)
@@ -19,7 +19,7 @@
 
 #define QUAD   1
 
-#include <xlocale.h>
+#include <locale.h>
 
 extern long long int ____strtoll_l_internal (const char *, char **, int, int,
                                             __locale_t);
index 6d23ee2..45b0585 100644 (file)
@@ -19,7 +19,7 @@
 
 #define UNSIGNED       1
 
-#include <xlocale.h>
+#include <locale.h>
 
 extern unsigned long int ____strtoul_l_internal (const char *, char **, int,
                                                 int, __locale_t);
index 53ecb91..da6d7cd 100644 (file)
@@ -20,7 +20,7 @@
 #define QUAD           1
 #define UNSIGNED       1
 
-#include <xlocale.h>
+#include <locale.h>
 
 extern unsigned long long int ____strtoull_l_internal (const char *, char **,
                                                       int, int, __locale_t);
index 5aec0ef..fb073d0 100644 (file)
@@ -148,7 +148,8 @@ extern size_t strxfrm (char *__restrict __dest,
      __THROW __nonnull ((2));
 
 #ifdef __USE_XOPEN2K8
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+# include <bits/types/locale_t.h>
 
 /* Compare the collated forms of S1 and S2, using sorting rules from L.  */
 extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
index 43207af..53d1b5c 100644 (file)
@@ -121,7 +121,8 @@ extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
      __THROW __attribute_pure__ __nonnull ((1, 2));
 
 #ifdef __USE_XOPEN2K8
-# include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+# include <bits/types/locale_t.h>
 
 /* Compare S1 and S2, ignoring case, using collation rules from LOC.  */
 extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc)
index 37034cb..341de78 100644 (file)
@@ -18,7 +18,6 @@
 #include <math.h>
 #include <stdlib.h>
 #include <wchar.h>
-#include <xlocale.h>
 
 /* The actual implementation for all floating point sizes is in strtod.c.
    These macros tell it to produce the `long double' version, `strtold'.  */
index 37034cb..341de78 100644 (file)
@@ -18,7 +18,6 @@
 #include <math.h>
 #include <stdlib.h>
 #include <wchar.h>
-#include <xlocale.h>
 
 /* The actual implementation for all floating point sizes is in strtod.c.
    These macros tell it to produce the `long double' version, `strtold'.  */
index bb4994f..17cc1e6 100644 (file)
@@ -57,7 +57,7 @@ typedef __pid_t pid_t;
 #endif
 
 #ifdef __USE_XOPEN2K8
-# include <xlocale.h>
+# include <bits/types/locale_t.h>
 #endif
 
 #ifdef __USE_ISOC11
index accd24a..9054661 100644 (file)
@@ -45,6 +45,9 @@
 #if defined __USE_UNIX98 || defined __USE_XOPEN2K
 # include <bits/types/FILE.h>
 #endif
+#ifdef __USE_XOPEN2K8
+# include <bits/types/locale_t.h>
+#endif
 
 /* Tell the caller that we provide correct C++ prototypes.  */
 #if defined __cplusplus && __GNUC_PREREQ (4, 4)
@@ -116,8 +119,6 @@ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
 
 /* Similar to the two functions above but take the information from
    the provided locale and not the global locale.  */
-# include <xlocale.h>
-
 extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
                         __locale_t __loc) __THROW;
 
@@ -435,23 +436,9 @@ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
 #endif /* Use GNU.  */
 
 #ifdef __USE_GNU
-/* The concept of one static locale per category is not very well
-   thought out.  Many applications will need to process its data using
-   information from several different locales.  Another application is
-   the implementation of the internationalization handling in the
-   upcoming ISO C++ standard library.  To support this another set of
-   the functions using locale data exist which have an additional
-   argument.
-
-   Attention: all these functions are *not* standardized in any form.
-   This is a proof-of-concept implementation.  */
-
-/* Structure for reentrant locale using functions.  This is an
-   (almost) opaque type for the user level programs.  */
-# include <xlocale.h>
-
-/* Special versions of the functions above which take the locale to
-   use as an additional parameter.  */
+/* Parallel versions of the functions above which take the locale to
+   use as an additional parameter.  These are GNU extensions inspired
+   by the POSIX.1-2008 extended locale API.  */
 extern long int wcstol_l (const wchar_t *__restrict __nptr,
                          wchar_t **__restrict __endptr, int __base,
                          __locale_t __loc) __THROW;
@@ -783,8 +770,6 @@ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
                        const struct tm *__restrict __tp) __THROW;
 
 # ifdef __USE_GNU
-# include <xlocale.h>
-
 /* Similar to `wcsftime' but takes the information from
    the provided locale and not the global locale.  */
 extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
index b7db11b..72fa7ea 100644 (file)
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 
 #define        USE_WIDE_CHAR   1
index 5f7498c..1d5c67c 100644 (file)
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 
 extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
index 29cdec3..67c16e0 100644 (file)
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 #define        USE_WIDE_CHAR   1
 
index 23d402d..d430bf1 100644 (file)
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 
 #define        USE_WIDE_CHAR   1
index e5c1cc3..816f43b 100644 (file)
@@ -17,7 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 #define USE_WIDE_CHAR  1
 
index 3dd33a7..86f63e8 100644 (file)
@@ -18,7 +18,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
 
 #define USE_WIDE_CHAR  1
 
index 962aef1..7945795 100644 (file)
@@ -55,8 +55,8 @@ extern wctrans_t wctrans (const char *__property) __THROW;
 extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW;
 
 # ifdef __USE_XOPEN2K8
-/* Declare the interface to extended locale model.  */
-#  include <xlocale.h>
+/* POSIX.1-2008 extended locale interface (see locale.h).  */
+#  include <bits/types/locale_t.h>
 
 /* Test for any wide character for which `iswalpha' or `iswdigit' is
    true.  */