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

libX11 provides <X11/Xlocale.h>.  The build of libX11 itself adds
include/X11 to the compiler's include path.  This results in a name
collision with /usr/include/xlocale.h on case-insensitive filesystems.

Commit 90e35b1eb3 renamed sys/_locale.h to xlocale.h in March 2017 under
the assumption that we should provide the locale_t type in the same file
as on Linux, FreeBSD, and Darwin.

A few weeks later (June 2017), glibc removed the xlocale.h file in favor
of bits/types/locale_t.h, which shouldn't be included directly anyway.

For reference and the reasoning, see
https://sourceware.org/git/?p=glibc.git;a=commit;h=f0be25b6336d

Given the above, revert 90e35b1eb3 and
fix additional usage of xlocale.h.
This commit is contained in:
Corinna Vinschen 2019-06-12 22:31:14 +02:00
parent 000f2409b1
commit ad101bcb0f
14 changed files with 23 additions and 14 deletions

View File

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

View File

@ -22,7 +22,7 @@
#include <stddef.h>
#if __BSD_VISIBLE
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#define __STRINGIFY(a) #a

View File

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

View File

@ -23,7 +23,7 @@
#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
#include <xlocale.h>
#include <sys/_locale.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 <xlocale.h>
#include <sys/_locale.h>
#endif
_BEGIN_STD_C

View File

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

View File

@ -33,7 +33,7 @@
#include <sys/_types.h>
#if __POSIX_VISIBLE >= 200809
#include <xlocale.h>
#include <sys/_locale.h>
#endif
#ifndef _SIZE_T_DECLARED

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,6 +16,9 @@ What changed:
- If a SA_SIGINFO signal handler changes the ucontext_t pointed to by
the third parameter, follow it after returning from the handler.
- Eliminate a header file name collision with <X11/XLocale.h> on case
insensitive filesystems by reverting <xlocale.h> back to <sys/_locale.h>.
Bug Fixes
---------

View File

@ -8,6 +8,12 @@
<itemizedlist mark="bullet">
<listitem><para>
Eliminate a header file name collision with &lt;X11/XLocale.h&gt; on
case insensitive filesystems by reverting &lt;xlocale.h&gt; back to
&lt;sys/_locale.h&gt;.
</para></listitem>
<listitem><para>
FIFOs can now be opened multiple times for writing.
</para></listitem>