httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: cvs commit: apache-2.0/src/lib/apr APRDesign
Date Tue, 19 Oct 1999 18:06:50 GMT
> Euh... isn't it safe to break the thing at compile time?
> I'd hate to see the case if somebody forgets to check an error value and
> builds a server that fails in mysterious ways.

I have thought about this all day, and here is my response/opinion.  And I
am not saying this is correct, but it is my opinion.  I would like APR to
look the same across all platforms.  This means making some comprimises.
Windows does some ugly things when it comes to compiling.  For one thing,
when compiling, it treats all Win32 platforms the same.  If a function
isn't on 95/98, they just return an error and keep going.  Windows doesn't
even give a #define to help this.

For this reason, non-implemented functions on all platforms are currently
returning APR_ENOTIMPL.  I am also providing #defines for good, clean
code, but I would rather the code be as similar as possible across Windows
and Unix.

As an example, named pipes (I use this because I know 95/98 don't have
them).  If I am on WinNT, I can call ap_create_named_pipe, and I will
actually get a pipe back.  On 95/98 I get APR_ENOTIMPL.  On Linux, I get a
valid pipe.  On an imaginary Unix without Named Pipes, I'll get
APR_ENOTIMPL.  The only difference will be that on that imaginary Unix,
I'll also have APR_HAS_NAMED_PIPES defined appropriately.  I can't define
that on Win32, because at compile/configure time, I don't know where the
code will be run.

I really hope that makes sense, but if not, feel free to tear me apart.  I
am leaning in this direction, but a part of me wants a REALLY GOOD reason
not to follow through with it.   :)


Ryan Bloom
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.	

View raw message