Rename <sys/_locale.h> to <xlocale.h>

The locale_t type is provided by <xlocale.h> on Linux, FreeBSD, and Darwin.
While, like on some of those systems, it is automatically included by
<locale.h> with the proper feature test macros, its presence under this
particular name is still presumed in real-world software.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
Yaakov Selkowitz 2017-03-21 15:21:30 -05:00 committed by Corinna Vinschen
parent ffbfb332d6
commit 90e35b1eb3
12 changed files with 18 additions and 13 deletions

View File

@ -5,7 +5,7 @@
#include <sys/cdefs.h>
#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_COMPILING_NEWLIB)
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -33,7 +33,7 @@
#include <sys/config.h>
#include <sys/cdefs.h>
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
typedef int nl_item;

View File

@ -23,7 +23,7 @@
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
#include <sys/_locale.h>
#include <xlocale.h>
#define LC_ALL_MASK (1 << LC_ALL)
#define LC_COLLATE_MASK (1 << LC_COLLATE)

View File

@ -27,7 +27,7 @@
#endif
#if __GNU_VISIBLE
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -17,7 +17,7 @@
#include <stddef.h>
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -16,7 +16,7 @@
#include <sys/types.h> /* for size_t */
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -29,7 +29,7 @@
#include <sys/timespec.h>
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -64,7 +64,7 @@ typedef __gnuc_va_list va_list;
#endif
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
_BEGIN_STD_C

View File

@ -8,7 +8,7 @@
#include <stddef.h>
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
#ifndef WEOF

View File

@ -1,7 +1,7 @@
/* Definition of opaque POSIX-1.2008 type locale_t for userspace. */
#ifndef _SYS__LOCALE_H
#define _SYS__LOCALE_H
#ifndef _XLOCALE_H
#define _XLOCALE_H
#include <newlib.h>
#include <sys/config.h>
@ -9,4 +9,4 @@
struct __locale_t;
typedef struct __locale_t *locale_t;
#endif /* _SYS__LOCALE_H */
#endif /* _XLOCALE_H */

View File

@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#include <sys/types.h>
#if __POSIX_VISIBLE >= 200809
#include <sys/_locale.h>
#include <xlocale.h>
#endif
__BEGIN_DECLS

View File

@ -30,6 +30,11 @@ Pthread_cond_wait now acts like Linux and BSD: Resume waiting for the
condition variable as if it was not interrupted, rather than returning 0.
</para></listitem>
<listitem><para>
The internal &lt;sys/_locale.h&gt; header was renamed to &lt;xlocale.h&gt; for
source compatibility with other systems.
</para></listitem>
</itemizedlist>
</sect2>