Why do we need to fixinclude HUGE_VAL definitions in math.h?
Bruce Korb
bkorb@veritas.com
Sun Jul 13 06:33:00 GMT 2003
Nathanael Nerode wrote:
>
> fixincludes likes to replace (in math.h)
> #define HUGE_VAL blah
>
> with
> #ifndef HUGE_VAL
> #define HUGE_VAL blah
> #endif
>
> I can't figure out *why*, though. Who's defining HUGE_VAL before math.h
> and wants to keep it from being trashed?
>
> (I don't quite know what HUGE_VAL is used for anyway.)
Floating point math.
> (This is another one of the tests which I'm trying to straighten out for
> OpenBSD fixincludes normalization, because it triggers on OpenBSD, but
> isn't changed with the current unusual fixincludes script.)
There are files about that define HUGE_VAL but shouldn't.
So, the fix is to wrap all their definitions in #ifndef.
Since there are multiple broken platforms and since this
transformation is innocuous, .... It is one of those things
where it would be interesting to know which platforms have
it trigger more than once and suppress it for the rest. That
is the extent of my recollection. I pulled it from the
original script.
More information about the Gcc
mailing list