This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: [patch] dirent.h problem with include_next


On Mon, 2005-10-03 at 14:23, Jeff Johnston wrote:
> James E Wilson wrote:
> >An alternative solution here would be to replace the #include_next with
> >a #error.
> I think this idea would be cleaner.  The creation of the file was done 
> long ago and it appears the original intention was simply to be a fail-safe:

OK.  Here is a patch that uses the #error approach.  I've tested this
with a mips-elf full toolchain build and make check.  There were no
regressions.

I've also tested this with a mips-elf program that uses dirent.h to make
sure I get expected behaviour, i.e. an error.  This works both from the
build tree and from the install tree, and also when we have both.

I also built a powerpc-rtems toolchain which includes dirent.h support,
and tested a program that uses dirent.h to make sure I get expected
behaviour, i.e. a successful compile.  This works both from the build
tree and from the install tree, and also when we have both.  This works
in the build tree because there is an -isystem option pointing to the
rtems sys directory (newlib/targ-include) before the -isystem option
pointing at the regular newlib include directory.  This is in the
FLAGS_FOR_TARGET variable in the top level Makefile.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

Attachment: patch.dirent.error
Description: Text document


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