This is the mail archive of the
mailing list for the GCC project.
Re: G++ defining _GNU_SOURCE
On Thu, Jun 07, 2001 at 03:59:22PM -0700, Mark Mitchell wrote:
> Phil> pa-linux.h #undefs the predefines for a reson, I expect...?
> It's trying to undo the pa.h version. So, it should #undef (to avoid
> the pa.h version), and then redefine to have the linux.h version.
> Consider the patch pre-approved, along with your earlier change.
Lemme just make absolutely paranoid-ly certain of this...
The tm_file order in config.gcc is
pa/pa.h linux.h pa/pa-linux.h
So, pa.h defines it,
linux.h doesn't define it (but would undef/redefine it after my patch),
pa-linux.h undefines it,
and so pa-linux.h would then need to re-define it to the union of the pa.h
version and my one-line linux.h version? And have to be maintained by hand?
This sounds like spaghetti code with teeth. Please tell me I've got this
massively confused somehow.
(can't think of an easy way for linux.h to simply "prepend" -D_GNU_SOURCE
to a previously-defined possibly empty CPLUSPLUS_CPP_DEFINE, rather than
undef'ing it and fully redefining it.)
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.