Bug 17593 - include ordering in libX11 is wrong, system headers should have higher priority than local headers
Summary: include ordering in libX11 is wrong, system headers should have higher priori...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-15 10:37 UTC by Albert Zeyer
Modified: 2011-10-03 01:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Albert Zeyer 2008-09-15 10:37:15 UTC
The problem is related to my case insensitive filesystem.

There is the local file include/X11/Xlocale.h and the system header xlocale.h. xlocale.h is included by the system header string.h.

In libX11, string.h does not include the correct system header xlocale.h but chooses the local include/X11/Xlocale.h instead.

I am using Gentoo. The Gentoo bug with some more detailed information is filled in here:
http://bugs.gentoo.org/show_bug.cgi?id=237338
Comment 1 Julien Cristau 2008-09-15 10:49:14 UTC
On Mon, Sep 15, 2008 at 10:37:16 -0700, bugzilla-daemon@freedesktop.org wrote:

> The problem is related to my case insensitive filesystem.
> 
Don't do that, then.  Looking for headers in the build directory before
the system ones sounds right to me.
Comment 2 Albert Zeyer 2008-09-15 11:06:03 UTC
(In reply to comment #1)
> On Mon, Sep 15, 2008 at 10:37:16 -0700, bugzilla-daemon@freedesktop.org wrote:
> 
> > The problem is related to my case insensitive filesystem.
> > 
> Don't do that, then.  Looking for headers in the build directory before
> the system ones sounds right to me.
> 

You mean that Xorg does just not support case insensitive filesystems officially?

Because beside this problem (that Xlocale.h is used instead of the system header xlocale.h), everything works fine.
Comment 3 James Cloos 2008-09-15 12:31:26 UTC
It would seem — at least in theory — that <string.h> should be including
<xlocal.h> and whatever looks for Xlocale.h should be using <X11/Xlocale.h>.

And, in fact, everything in the libX11 tree does just that.

So, one question then is whether we need to have -I../include/X11 et al
in CFLAGS?

Does anyone want to check whether the libX11 src ever #includes a file
in its include/X11 dir without specifying it as <X11/foo.h> or "X11/foo.h"?
Comment 4 Jeremy Huddleston Sequoia 2011-10-03 01:22:07 UTC
I build on case insensitive file systems all the time, so I believe this is 
fixed.  If you still think this is an issue, please reopen and assign to me 
with more information.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.