This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: /usr/local/include before /usr/include?


On Fri, 25 Feb 2000, David Starner wrote:

> On Fri, Feb 25, 2000 at 12:08:13PM -0600, Brian Ford wrote:
> > I just noticed that gcc seems to default to having /usr/local/include
> > before /usr/include in its include path.  Why is this?
> > 
> > Should not all system includes have first priority unless someone
> > specifically asks for something different?
> 
> Aren't /usr/local/include files system includes?
>
Supplementary ones, yes.  Overriding ones, no.

> If a system
> administrator, for whatever reason, wants to override a
> system include, should he not put it in /usr/local/include?
> (Should the system administrator override a system
> include under normal circumstances? No. But if she creates
> /usr/local/include/stdio.h, I would assume that's what she
> intended to do.)
> 

Most vendor compilers would not look there.  So, she has only overriden it
for gcc.  If that was the desired intention, then why didn't she just put
the overriding include in gcc's fixed include directory?

And again, if you want /usr/local/include first, all you have to do is -I
/usr/local/include.  It seems silly to have to -I/usr/include to assure
system headers get priority.

--
Brian Ford
Software Engineer
Vital Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]