Fixincludes - some analysis

Greg Schafer gschafer at zip.com.au
Sat Jan 25 05:32:20 PST 2003


On Fri, Jan 24, 2003 at 07:30:38PM -0600, Bruce Dubbs wrote:
> Greg Schafer wrote:
> 
> >Sidenote: I don't understand at all why /usr/local/include comes first in
> >the search path. This seems very counter-intuitive to me. The gcc page at:-
> >http://gcc.gnu.org/install/configure.html   contains some commentary on why
> >this is so but I still don't get it.
> >
> Its there so a programmer can easily override a default header file by 
> merely putting an updated one in /usr/local/lib.  Otherwise the path 
> would have to be explicitly defined every time or the actual header in 
> /usr/lib changed.

I thought that was what -I was for :/

http://gcc.gnu.org/onlinedocs/gcc-3.2.1/cpp/Search-Path.html#Search%20Path

is not a bad read on the subject. On a related point, it seems to me that
the folk who symlink /usr/local to /usr are defeating the include search
order and are potentially bypassing the fixed headers (but as per the rest
of this thread, that's looking like not a big deal)

Greg
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list