httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: APR_EOF?
Date Thu, 22 Jun 2000 17:56:10 GMT
> On a related topic, is there any reason why we can't consolidate the
> ap_read code across platforms? ap_read must:
> 
> 1. handle the ungetchar
> 2. handle reads (non-blocking, non-blocking with timeouts and blocking)
> 3. buffered i/o
> 4. 1 thru 3 for both files and pipes
> 
> Most of this code is identical across Unix and Windows which implies
> we should create a common ap_read() implementation which calls a
> platform specific os_read_with_timeout(). os_read_with_timeout() is
> where the platform specific code resides. os_read_with_timeout() would
> need to know if it is handling a pipe or a file.  Right now, each
> platform is handling the ungetchar, buffered reads, etc. differently,
> which is not good.

I just looked at the ap_read code.  Most of it is not common across
platforms.  One of the reasons that we have re-written this code, is so
that Windows can use their native functions.  The types are different
throughout these functions, as are the function calls and return
values.  There is error checking in the Windows code that doesn't exist or
need to exist in the Unix side.  I am against trying to combine this code
right now.  It will just make the code that much harder to read and
understand.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message