httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Reid" <dr...@jetnet.co.uk>
Subject Re: cvs commit: apache-2.0/src/lib/apr/network_io/os2 sockets.csockopt.c
Date Thu, 16 Nov 2000 09:07:14 GMT
I've started doing that with sa_common.c...

The biggest area seems to be the returning of error codes between unix/win32
so maybe we can do something about that and then have a common set of
files...

david

----- Original Message -----
From: <rbb@covalent.net>
To: <new-httpd@apache.org>
Sent: Thursday, November 16, 2000 4:57 AM
Subject: Re: cvs commit: apache-2.0/src/lib/apr/network_io/os2
sockets.csockopt.c


>
> > Heck, most of sockets.c is the same, but there are sprinkles of
> > platform detail here and there.  This could be shared to a much
> > greater extent but folks would have to be willing to put up with a bit
> > of conditional compilation and some macros (like getting the
> > OS-specific error code) to make it work.
> >
> > Right now it can be a pain to work in that package because there is
> > enough sharing that changing apr_socket_t much affects all four
> > platforms but not enough sharing to minimize the risks of breaking one
> > of the platforms when you play with it.
>
> The general rule for combining code in APR has been that if more than half
> the file is common, then the file should be common.  I would prefer to
> start by really comparing how much of the code is common and how much is
> going to require code like:
>
> #if UNIX
> ...
> #elif BEOS
> ...
> #elif OS2
> ...
> #endif
>
> The other option is to start to combine functions one function at a time,
> and just leave the non-common code in the separate files.
>
> Ryan
>
>
____________________________________________________________________________
___
> Ryan Bloom                        rbb@apache.org
> 406 29th St.
> San Francisco, CA 94131
> --------------------------------------------------------------------------
-----
>
>


Mime
View raw message