Subject: Re: ufs includes in src/tools/compat
To: Darrin B. Jewell <dbj@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-toolchain
Date: 05/08/2003 12:45:59
"Darrin B. Jewell" wrote:

> [*] When using cc -no-cpp-precomp, apple's dev tools will
> prefer subdirectories of /usr/include over directories
> symlinked into the current directory, even with -I.
> 
> The bug in apple's compiler can be demonstrated as such:
> 
> $ mkdir foo
> $ touch foo/time.h
> $ ln -s foo sys
> $ echo "#include <sys/time.h>" > testme.c
> $ cc -E -no-cpp-precomp -I. testme.c
> 
> You will notice from the resulting output that it is including
> /usr/include/sys/time.h rather than ./sys/time.h.
> Invoking the compiler without -no-cpp-precomp does not
> produce the problem.

Out of curiosity, does "-no-cpp-precomp -nostdinc -I. -I/usr/include"
do what you want (assuming that Apple's compiler does -nostdinc)?

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/