[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Header name conflicts
From: |
Andreas Schwab |
Subject: |
Re: Header name conflicts |
Date: |
Wed, 26 Mar 2003 15:56:31 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux) |
Bill Moseley <address@hidden> writes:
|> I'm just starting out converting a project to libtool and automake, and I
|> have an initial problem that the generated Makefile adds -I. to the gcc
|> line.
|>
|> We have an unfortunately named header "string.h", so with -I. added
|>
|> #include <string.h>
|>
|> ends up reading our "string.h" instead. Our own code uses
|> #include "string.h" to include our own copy.
|>
|> Yes, it's unfortunate, but is it forbidden to create a header file
|> that might match the name of a system header we also use?
The C standard makes the process of finding the include file
implementation defined, so this is not portable.
|> Seems like adding -I. defeats the purpose of two differnt #include
|> styles.
There is no way around, when building outside the source directory you
have to add -I$(srcdir) anyway.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."