Casper.Dik at Sun.COM wrote:
> >On 10/30/06, Roland Mainz <roland.mainz at nrubsig.org> wrote:
> >> Attached is a small patch ("ksh93_libcmd_killglobalvars001.diff.txt")
> >> for ast-ksh.2006-09-12 which significantly reduces the size of the
> >> global variables in libcmd
> >Why do you think the global variable size needs to be reduced? Is
> >there anything especially bad when a program uses global variables?
> 
> It's a Solaris rule: no variable or function in a library should be
> visible unless defined as an interface.
> 
> But there's a bigger issue: any variable in a program
> will be mapped to the libcmd variable of the same name, so
> in essence libcmd steals a large chunk of user namespace and may
> cause application breakage as a result.

Uhm... why ? These global variables are |static| and therefore visible
only in the source file where they're defined it. And in the case of our
Solaris integration we use "mapfile-vers" which limites the exported
symbols to exactly those listed in this file.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to