This is the mail archive of the
mailing list for the GCC project.
Re: need info on __need_ usage
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: Re: need info on __need_ usage
- From: Bruce Korb <bkorb at cruzio dot com>
- Date: Tue, 26 Sep 2000 18:32:17 -0700
- CC: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Organization: Home
- References: <39C95F80.7C73015D@cruzio.com> <email@example.com>
Ulrich Drepper wrote:
> Sorry for the delay, I was out of town.
> Bruce Korb <firstname.lastname@example.org> writes:
> > [...] I believe that such unwrappable headers can be detected with
> > the regular expression, "^#if.*__need_".
> Only if you don't handle headers in the bits subdir. <math.h> and
> <complex.h> use multi-inclusion for other things.
How do I detect that?
The problem is that fixincludes has a method for altering
certain files termed, "wrap". It will automatically put
the "#ifndef/#define/.../#endif" wrappers around the file.
If this is done on a file that needs to be sourced multiple
times, there is a problem. I want to detect multi-inclusion
so that the wrap function will know when to leave out the
wrapping. (That function will also put fixed strings at
the start and/or end of a file.
See gcc/fixinc/fixfixes.c(wrap_fix) if I am not being clear enough.)
So, it boils down to: how does one hack at wrap_fix in such
a way that it will not wrap files that must not be wrapped?
> There used to be quite some systems where the headers
> were not appropriately protected and one had to include them in a
> certain order.
Yeah, it was the mid-80's last time I was banging my head on that. :-(