You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Bloom <rb...@raleigh.ibm.com> on 1999/09/13 14:22:18 UTC
Portability of APR.
There has been a lot of talk recently about how portable APR is, because
of the directory layout. This all happened, because David Reid had to
make a big patch to bring the BeOS stuff up to date. Because of this, a
lot of people have stated that they would rather see all of the code in
one file. I have been thinking about this all morning, and I am going
to make a bold statement. This will not make the APR code portable!
Think of it this way. All of the Unix-like platforms should be in the
Unix directory. This basically means any platform that is POSIX
compliant, uses int's and FILE * for file descriptors/pointers, uses ints
for sockets, can fork. If your platform is Posix compliant, try compiling
and using the unix code. This code should be as portable as is possible.
However, Windows, for example, is not POSIX compliant. Why should I put
Windows code in the same place as Unix code? They do not share the same
basic API's. They do not share the same basic types. In fact, there is
not currently ANY shared code, except for getopt, which should in all
honesty be moved to the lib directory, because that is where all of the
truly portable code is.
APR is not portable code. If the goal was to write portable code, that
looked the same on all platforms, then APR is a stupid project. The goal
is to write code with portable interfaces that uses the optimal calls on
each platform. This can be acheived best, by keeping the code separate in
my opinion. As a unix developer, which I am primarily, I don't especially
want to see HANDLE's ifdef'ed throughout my code. I don't really know
what they are, and all they are doing is getting in my way. I want int's
and FILE *. I know what those are.
This is just my 0.02, but moving the Windows code into the same file as
the Unix code just makes it harder to read, and doesn't give us any
benefit like being able to share code.
Ryan
_______________________________________________________________________
Ryan Bloom rbb@raleigh.ibm.com
4205 S Miami Blvd
RTP, NC 27709 It's a beautiful sight to see good dancers
doing simple steps. It's a painful sight to
see beginners doing complicated patterns.