https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=90e35b1eb3df4070e68afc5e7060665214d586be
commit 90e35b1eb3df4070e68afc5e7060665214d586be Author: Yaakov Selkowitz <yselk...@redhat.com> Date: Tue Mar 21 15:21:30 2017 -0500 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 <yselk...@redhat.com> Diff: --- newlib/libc/include/ctype.h | 2 +- newlib/libc/include/langinfo.h | 2 +- newlib/libc/include/locale.h | 2 +- newlib/libc/include/stdlib.h | 2 +- newlib/libc/include/string.h | 2 +- newlib/libc/include/strings.h | 2 +- newlib/libc/include/time.h | 2 +- newlib/libc/include/wchar.h | 2 +- newlib/libc/include/wctype.h | 2 +- newlib/libc/include/{sys/_locale.h => xlocale.h} | 6 +++--- winsup/cygwin/include/monetary.h | 2 +- winsup/doc/new-features.xml | 5 +++++ 12 files changed, 18 insertions(+), 13 deletions(-) diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index 31577d1..06458cb 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -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 diff --git a/newlib/libc/include/langinfo.h b/newlib/libc/include/langinfo.h index 193cce3..59381d6 100644 --- a/newlib/libc/include/langinfo.h +++ b/newlib/libc/include/langinfo.h @@ -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; diff --git a/newlib/libc/include/locale.h b/newlib/libc/include/locale.h index 7feb881..8ba88a9 100644 --- a/newlib/libc/include/locale.h +++ b/newlib/libc/include/locale.h @@ -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) diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 7b62e00..9ee32ac 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -27,7 +27,7 @@ #endif #if __GNU_VISIBLE -#include <sys/_locale.h> +#include <xlocale.h> #endif _BEGIN_STD_C diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h index ba5e51e..4e0e151 100644 --- a/newlib/libc/include/string.h +++ b/newlib/libc/include/string.h @@ -17,7 +17,7 @@ #include <stddef.h> #if __POSIX_VISIBLE >= 200809 -#include <sys/_locale.h> +#include <xlocale.h> #endif _BEGIN_STD_C diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h index be01958..3331611 100644 --- a/newlib/libc/include/strings.h +++ b/newlib/libc/include/strings.h @@ -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 diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h index ec67cb2..8806b98 100644 --- a/newlib/libc/include/time.h +++ b/newlib/libc/include/time.h @@ -29,7 +29,7 @@ #include <sys/timespec.h> #if __POSIX_VISIBLE >= 200809 -#include <sys/_locale.h> +#include <xlocale.h> #endif _BEGIN_STD_C diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h index 4766ca9..25ee9a8 100644 --- a/newlib/libc/include/wchar.h +++ b/newlib/libc/include/wchar.h @@ -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 diff --git a/newlib/libc/include/wctype.h b/newlib/libc/include/wctype.h index d085374..3d36d5a 100644 --- a/newlib/libc/include/wctype.h +++ b/newlib/libc/include/wctype.h @@ -8,7 +8,7 @@ #include <stddef.h> #if __POSIX_VISIBLE >= 200809 -#include <sys/_locale.h> +#include <xlocale.h> #endif #ifndef WEOF diff --git a/newlib/libc/include/sys/_locale.h b/newlib/libc/include/xlocale.h similarity index 70% rename from newlib/libc/include/sys/_locale.h rename to newlib/libc/include/xlocale.h index ce6f995..f955426 100644 --- a/newlib/libc/include/sys/_locale.h +++ b/newlib/libc/include/xlocale.h @@ -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 */ diff --git a/winsup/cygwin/include/monetary.h b/winsup/cygwin/include/monetary.h index 1c3479b..82a6312 100644 --- a/winsup/cygwin/include/monetary.h +++ b/winsup/cygwin/include/monetary.h @@ -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 diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index 185c97e..324d99d 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -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 <sys/_locale.h> header was renamed to <xlocale.h> for +source compatibility with other systems. +</para></listitem> + </itemizedlist> </sect2>