This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Resolving libc #includes


James Antill wrote:
Earl Chew <earl_chew@agilent.com> writes:
 Use gcc -I application/includes -I- -c foo.c

and I happen to have a file named application/includes/features.h.

Then it won't be picked up with #include <features.h> only with #include "features.h"

I was going to respond with a scenario showing how -I- causes problems of its own, but I see that gcc is already moving towards a solution. See Mike Stump's posting here:

http://gcc.gnu.org/ml/gcc-patches/2004-04/msg02027.html

and follow the ensuing discussion thread here:

http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00114.html

Using #include <> to locate system headers, and -iquote to
restrict #include "" look in the directory containing the
current file, then to non-system header locations appears
to be the best way forward.

Earl


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