httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: cvs commit: apache-2.0/src/lib/apr/network_io/os2 sockets.c sockopt.c
Date Thu, 16 Nov 2000 04:57:22 GMT

> 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

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 Bloom               
406 29th St.
San Francisco, CA 94131

View raw message