httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: ap_status_t for Win32
Date Fri, 31 Mar 2000 16:29:18 GMT

> >If all of these errno returns are gotten rid of, the current errno stuff
> >should work everywhere.
> On OS/2 the situation is similar to Win32 in that some APR functions
> are implemented using C library routines that return errno values &
> others use API calls that return OS/2 error codes. I don't think
> banning errno values is the answer either as we'll then be doomed to
> re-implement C library functions in APR.
> EG. OS/2's ap_create_thread() uses the C library function
> _beginthread() rather than the API call DosCreateThread() as the latter
> doesn't initialize the C library for the new thread.
> Just an idea (feel free to shoot it down, I haven't thought about it
> too hard), what if OS error codes were offset some fixed amount,
> leaving 0->n for errno codes? The only exception being 0 stays 0 (which
> == APR_SUCCESS). A macro for returning an OS error code could be:
> AP_APRCODE_OFFSET 100  /* some room for APR defined codes */
> AP_OS_STATUS(oscode) (oscode ? oscode + AP_OSCODE_OFFSET : APR_SUCCESS)

Can't all of this be done by just redefining the current APR_FOO macros in
apr_errno.h by platform, and adding some for platforms that need it.  I
was under the impression that was the goal when this code was originally


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message