On Thu, Aug 31, 2006 at 01:52:44AM +0200, Roland Mainz wrote: > Keith M Wesolowski wrote: > > On Thu, Aug 31, 2006 at 12:22:16AM +0200, Roland Mainz wrote: > > > 1. Does anyone know the gcc switch to turn off warnings for redefined > > > CPP symbols, e.g. things like: > > > -- snip -- > > > src/lib/libmonster/monster_map.h:104:1: "strrcat" redefined > > > ../common/core/strrcat.c:27:1: this is the location of the previous > > > definition > > > -- snip -- > > > > You can't; this is not a warning but an error. The code is > > syntactically incorrect as you are defining the same macro to two > > different values. Fix the code. > > Well, then > http://cvs.opensolaris.org/source/xref/on/usr/src/uts/intel/sys/regset.h#100 > is broken. The two-letter defines there causes lots of breakage and IMO > a violation of things which I would call "namespace clean" and portable > code (e.g. the book "Schnupp, Peter; Von C zu C, Problemlos Portieren, > Carl Hanser Verlag, M?nchen-Wien 1990" lists such examples as serious > problems for system headers).
Unfortunately, these are defined by the i386 ABI supplement. I agree that it's bad practice, but we're probably stuck with them. Note that in general, due to Standards issues, Solaris headers are mostly clear of such problems (for example, none of our function prototypes name the arguments) Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org