httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: cvs commit: apache-1.3/src/os/unix os.c
Date Thu, 02 May 2002 14:54:19 GMT
Ben Laurie wrote:
> 
> jim@apache.org wrote:
> > 
> > jim         02/05/02 06:28:46
> > 
> >   Modified:    src/os/unix os.c
> >   Log:
> >   OK. This is admittedly anal. But the whole idea behind cpp macros
> >   is to avoid things like "we know NSLINKMODULE_OPTION_NONE is 0"
> >   and making such shortcuts as this. This makes it clear what exactly
> >   we are setting, and though admittedly verbose, the tradeoff of a
> >   few bytes of source is worth it :)
> 
> Err? But what is the meaning of combining a NONE option with some other?
> Does it mean "we're setting both some and no options"? Very Zen!
> 

The weirdness is due that NSLINKMODULE_OPTION_NONE is actually
part of a triple play of NSLINKMODULE_OPTION_PRIVATE and
NSLINKMODULE_OPTION_BINDNOW, each of which different handles
how Darwin creates "modules". The old function call just allowed
0 or 1 (which was the same as NSLINKMODULE_OPTION_NONE and
NSLINKMODULE_OPTION_BINDNOW, respectively) with no other
"options" available. When Apple changed the API of the
function, they added more capability.

So the NSLINKMODULE_OPTION_NONE is to explicitly state that
we are not binding at that time. The other option is to add
other capability... we're simply setting bits (last arg is
a bitfield flag basically). Functionally it's no diff, but
I'd prefer being clear and safe :)

For those masochists with more interest, I refer you to:
  http://developer.apple.com/techpubs/macosx/ReleaseNotes/CompilerTools.html

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Mime
View raw message