Subject: Re: *mask variables in intr.h
To: Martin Husemann <martin@duskware.de>
From: Antti Kantee <pooka@cs.hut.fi>
List: port-sgimips
Date: 06/03/2005 11:00:36
On Fri Jun 03 2005 at 08:05:48 +0200, Martin Husemann wrote:
> Huston, we have a problem...

wonders never cease

> It seems no other arch exports biomask, netmask, ttymask and clockmask
> as prominently as sgimips does.
> 
> This is a problem, because "netmask" is a pretty common variable name in
> networking code - so with the -current -Wshadow compile options, we loose
> (netiso and nfs won't compile at least).
> 
> If sgimips wouldn't be the only one doing this (if I grepped correctly),
> I would just rename the offending variables.
> 
> Now we have multiple choices: we could just rename the variables (to _netmask,
> for example), or we could create an array of the masks and turn splnet()
> into _splraise(splmasks[IPL_NET]) - or something along that line.

The latter looks less pollutionist towards the namespace, so perhaps
I'd go that way.  If you can stand up to the extra typing task, that is
(which, arguably, is way less than the effort spent in writing this
mail ;).

-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
                        "The dish washer returns!"