[PATCH] Include "xlocale.h", not <xlocale.h>.

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Include "xlocale.h", not <xlocale.h>.

Michael Haubenwallner-2
libX11 does provide an <X11/Xlocale.h>, and while building libX11
itself, they add their include/X11 to the compiler's include path.
Now when newlib headers include <xlocale.h> on the case insensitive
file system, the compiler does pick their Xlocale.h.
So we better include "xlocale.h" in newlib headers instead, to prefer
newlib xlocale.h from within newlib headers.
---
 newlib/libc/include/ctype.h      | 2 +-
 newlib/libc/include/inttypes.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 +-
 winsup/cygwin/include/monetary.h | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index 1cee6953b..562683a70 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 _BEGIN_STD_C
diff --git a/newlib/libc/include/inttypes.h b/newlib/libc/include/inttypes.h
index 694ba8fcf..363d05f6f 100644
--- a/newlib/libc/include/inttypes.h
+++ b/newlib/libc/include/inttypes.h
@@ -22,7 +22,7 @@
 #include <stddef.h>
 
 #if __BSD_VISIBLE
-#include <xlocale.h>
+#include "xlocale.h"
 #endif
 
 #define __STRINGIFY(a) #a
diff --git a/newlib/libc/include/langinfo.h b/newlib/libc/include/langinfo.h
index d2b7a031c..75ba4d92f 100644
--- a/newlib/libc/include/langinfo.h
+++ b/newlib/libc/include/langinfo.h
@@ -32,7 +32,7 @@
 #include <sys/cdefs.h>
 #include <sys/_types.h>
 #if __POSIX_VISIBLE >= 200809
-#include <xlocale.h>
+#include "xlocale.h"
 #endif
 
 #ifndef _NL_ITEM_DECLARED
diff --git a/newlib/libc/include/locale.h b/newlib/libc/include/locale.h
index d11eb00fb..17fa6a736 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 <xlocale.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 933d181e1..aebc15036 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -27,7 +27,7 @@
 #endif
 
 #if __GNU_VISIBLE
-#include <xlocale.h>
+#include "xlocale.h"
 #endif
 
 _BEGIN_STD_C
diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 04c4d1828..a35a00cc7 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 #if __BSD_VISIBLE
diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h
index 7e2e557e7..29e5f783c 100644
--- a/newlib/libc/include/strings.h
+++ b/newlib/libc/include/strings.h
@@ -33,7 +33,7 @@
 #include <sys/_types.h>
 
 #if __POSIX_VISIBLE >= 200809
-#include <xlocale.h>
+#include "xlocale.h"
 #endif
 
 #ifndef _SIZE_T_DECLARED
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index d69d19969..9b67b847b 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 _BEGIN_STD_C
diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index 9f2441c4f..a3a6698b4 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 _BEGIN_STD_C
diff --git a/newlib/libc/include/wctype.h b/newlib/libc/include/wctype.h
index 9b710900d..4e3dc16e4 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 #ifndef WEOF
diff --git a/winsup/cygwin/include/monetary.h b/winsup/cygwin/include/monetary.h
index 82a6312bf..4daabce0e 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 <xlocale.h>
+#include "xlocale.h"
 #endif
 
 __BEGIN_DECLS
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Corinna Vinschen
Hi Michael,

On Jun 11 19:43, Michael Haubenwallner wrote:
> libX11 does provide an <X11/Xlocale.h>, and while building libX11
> itself, they add their include/X11 to the compiler's include path.
> Now when newlib headers include <xlocale.h> on the case insensitive
> file system, the compiler does pick their Xlocale.h.
> So we better include "xlocale.h" in newlib headers instead, to prefer
> newlib xlocale.h from within newlib headers.

Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
xlocale.h header, I'd favor reverting 90e35b1eb3df.


Thoughts?


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Michael Haubenwallner-2
Hi Corinna,

On 6/12/19 10:05 AM, Corinna Vinschen wrote:

> Hi Michael,
>
> On Jun 11 19:43, Michael Haubenwallner wrote:
>> libX11 does provide an <X11/Xlocale.h>, and while building libX11
>> itself, they add their include/X11 to the compiler's include path.
>> Now when newlib headers include <xlocale.h> on the case insensitive
>> file system, the compiler does pick their Xlocale.h.
>> So we better include "xlocale.h" in newlib headers instead, to prefer
>> newlib xlocale.h from within newlib headers.
>
> Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
> xlocale.h header, I'd favor reverting 90e35b1eb3df.
Fine with me as well!

Thanks!
/haubi/


signature.asc (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Michael Haubenwallner-2


On 6/12/19 10:27 AM, Michael Haubenwallner wrote:

> Hi Corinna,
>
> On 6/12/19 10:05 AM, Corinna Vinschen wrote:
>> Hi Michael,
>>
>> On Jun 11 19:43, Michael Haubenwallner wrote:
>>> libX11 does provide an <X11/Xlocale.h>, and while building libX11
>>> itself, they add their include/X11 to the compiler's include path.
>>> Now when newlib headers include <xlocale.h> on the case insensitive
>>> file system, the compiler does pick their Xlocale.h.
>>> So we better include "xlocale.h" in newlib headers instead, to prefer
>>> newlib xlocale.h from within newlib headers.
>>
>> Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
>> xlocale.h header, I'd favor reverting 90e35b1eb3df.
>
> Fine with me as well!
And just in case you're waiting for a patch to apply...

/haubi/

0001-Revert-Rename-sys-_locale.h-to-xlocale.h.patch (6K) Download Attachment
signature.asc (1000 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Corinna Vinschen
On Jun 13 09:51, Michael Haubenwallner wrote:

>
>
> On 6/12/19 10:27 AM, Michael Haubenwallner wrote:
> > Hi Corinna,
> >
> > On 6/12/19 10:05 AM, Corinna Vinschen wrote:
> >> Hi Michael,
> >>
> >> On Jun 11 19:43, Michael Haubenwallner wrote:
> >>> libX11 does provide an <X11/Xlocale.h>, and while building libX11
> >>> itself, they add their include/X11 to the compiler's include path.
> >>> Now when newlib headers include <xlocale.h> on the case insensitive
> >>> file system, the compiler does pick their Xlocale.h.
> >>> So we better include "xlocale.h" in newlib headers instead, to prefer
> >>> newlib xlocale.h from within newlib headers.
> >>
> >> Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
> >> xlocale.h header, I'd favor reverting 90e35b1eb3df.
> >
> > Fine with me as well!
>
> And just in case you're waiting for a patch to apply...
Thanks, I already have a patch.  I was just waiting if Yaakov
has some input.  He provided the original patch.

Yaakov?  Any input?


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Yaakov Selkowitz-2
In reply to this post by Corinna Vinschen
On Wed, 2019-06-12 at 10:05 +0200, Corinna Vinschen wrote:

> Hi Michael,
>
> On Jun 11 19:43, Michael Haubenwallner wrote:
> > libX11 does provide an <X11/Xlocale.h>, and while building libX11
> > itself, they add their include/X11 to the compiler's include path.
> > Now when newlib headers include <xlocale.h> on the case insensitive
> > file system, the compiler does pick their Xlocale.h.
> > So we better include "xlocale.h" in newlib headers instead, to prefer
> > newlib xlocale.h from within newlib headers.
>
> Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
> xlocale.h header, I'd favor reverting 90e35b1eb3df.

I concur, please proceed.  Any packages which still expect <xlocale.h>
should have a patch in Fedora by now.

--
Yaakov Selkowitz
Senior Software Engineer - Platform Enablement
Red Hat, Inc.


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Include "xlocale.h", not <xlocale.h>.

Corinna Vinschen
On Jun 13 19:00, Yaakov Selkowitz wrote:

> On Wed, 2019-06-12 at 10:05 +0200, Corinna Vinschen wrote:
> > Hi Michael,
> >
> > On Jun 11 19:43, Michael Haubenwallner wrote:
> > > libX11 does provide an <X11/Xlocale.h>, and while building libX11
> > > itself, they add their include/X11 to the compiler's include path.
> > > Now when newlib headers include <xlocale.h> on the case insensitive
> > > file system, the compiler does pick their Xlocale.h.
> > > So we better include "xlocale.h" in newlib headers instead, to prefer
> > > newlib xlocale.h from within newlib headers.
> >
> > Commit 90e35b1eb3df renamed _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 that glibc and thus Linux stopped providing the non-standard
> > xlocale.h header, I'd favor reverting 90e35b1eb3df.
>
> I concur, please proceed.  Any packages which still expect <xlocale.h>
> should have a patch in Fedora by now.
Thank you, done.


Corinna

--
Corinna Vinschen
Cygwin Maintainer
Red Hat

signature.asc (849 bytes) Download Attachment