httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: cvs commit: apache-2.0/src/lib/apr/include apr_errno.h
Date Wed, 05 Apr 2000 16:09:04 GMT
> > > be honest, what scares me the most is that we are using
> the same values on
> > > every system.
> >
> > Tell me a system which has APR OS-specific code which calls
> > OS-specific functions and stores them in ap_status_t where this
> > doesn't work.  (Hint: Win32 *might* could theoretically
> return values
> > that won't work, but I sort of doubt that it is possible today given
> > the types of Windows calls used by APR.  Besides I didn't see a lot
> > of consensus for a solution which handled any possible
> Win32 error code.)
>
> I did.  The consensus I saw was:
>
> five definitions, defined appropriately for each platform
> (this will msot
> likely be different for each platform).
>
> APR_OS_START_ERRNO2 (for platforms that have error codes that
> overlap with
> errno.  ALL platforms would use this, including UNIX)
> APR_OS_START_ERROR  (begin APR error codes)
> APR_OS_START_STATUS (befin APR status codes)
> APR_OS_START_SYSERR (to map errno codes for platforms that don't have
> them)
> APR_OS_START_USEERR (for APR apps that want to layer their
> own codes along
> with APR.  [Note, I'm not sure how useful this is, personally])

[Very, apr callbacks to the app need unique return codes, so they can
percolate back to the app without the apr trying to figure them out!!!]

I agree with Ryan to this point.  The constants, or wrapper for bit 29, or
whatever is required, must be in the apr.h, customized to the platform.
APR's own errors still sit in apr_errno.h, but by setting the tweaks in
apr.hw or the autoconf script, we can adjust them, platform by platform, and
break -nothing-.

Hope this is how others have read this thread.  Ryan, I'm not sure you have
come out with a one-liner to state how you want this done.  I've just been
reading between the lines on this.


Mime
View raw message