Marc Glisse writes:
> > You _may_ be able to get away with inserting "#undef"
> > statements that
> > remove the _C and _S definitions or even with "-U_C
> > -U_S" on the g++
> > command line, but at that point, you're on your own.
> > 
> > The right answer is to fix the code.
> 
> I agree with all you are saying here. I just wanted to say that even when you 
> use legal names, you can still have problems. If for instance _C and _S were 
> replaced by CS and SS, the header sys/regset.h would break the code as well 
> on sol-x86 (this header is one of the worst I have met for macro pollution).

I don't think I follow.  If you intentionally #include a header file
that contains macros that you want (such as CS and SS in
<sys/regset.h>), then how is that "pollution?"  If you didn't include
it intentionally, then why not remove that errant #include so that you
don't have symbols you don't want?

I don't think this is a problem at all.  In fact, those symbols are
defined by the i386 ABI, so they're *supposed* to be there.

But, in any event, if you feel there's something wrong with that
header file, then do file a bug on it.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to