httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: [PATCH] let ap_open() work on Win9x
Date Mon, 20 Mar 2000 21:52:18 GMT
On Mon, 20 Mar 2000 wrote:
> > Another thought I had on how to handle the differences between
> > various flavors of Windows (or AIX or whatever) in one executable
> > is to have an os-specific function that filled in a vector of stuff
> > like
> > 
> >   struct os_capabilities {
> >     unsigned int hasFeature1 : 1; 
> >     unsigned int hasFeature2 : 1;
> >     ...
> >   };
> I still don't see how this helps.  On platforms like windows, where things
> are done based on version, we already have a method of retrieving the
> version of the OS.  I guess I see the performance penalties of having to
> fill out this structure as far outweighing any potential benefit this
> might get us.

And one other comment: there is *no* reason to use bitfields here. This
structure (in all likelihood) exists only on the stack. There is no reason
to conserve space -- it isn't like we are allocating a million of these
things on the heap. Each flag should be a separate "int" (drop the
unsigned, too!).

I don't have any comments on the need itself... Ryan can address that. I
just wanted to add my comment that bitfields are bogus.


Greg Stein,

View raw message