You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Graham Leggett <mi...@sharp.fm> on 2012/02/04 12:17:33 UTC

Re: svn commit: r1240475 - in /apr/apr/branches/1.4.x: ./ include/apr_errno.h

On 04 Feb 2012, at 11:47 AM, sf@apache.org wrote:

> URL: http://svn.apache.org/viewvc?rev=1240475&view=rev
> Log:
> Reserve a range of USERERR values for HTTPD

> --- apr/apr/branches/1.4.x/include/apr_errno.h (original)
> +++ apr/apr/branches/1.4.x/include/apr_errno.h Sat Feb  4 09:47:57 2012
> @@ -158,6 +158,8 @@ APR_DECLARE(char *) apr_strerror(apr_sta
>  * Subversion - Defined ranges, of less than 100, at intervals of 5000
>  *              starting at an offset of 5000, e.g.
>  *               +5000 to 5100,  +10000 to 10100
> + *
> + * Apache HTTPD - +2000 to 2999
>  */
> #define APR_OS_START_USERERR    (APR_OS_START_STATUS + APR_OS_ERRSPACE_SIZE)
> /**

Would it be possible to have this as "reserved for the application", rather than "reserved for httpd"?

Ideally APR shouldn't have any httpd specific code in it, however this error range would be useful for other external apps, including httpd.

Regards,
Graham
--


Re: svn commit: r1240475 - in /apr/apr/branches/1.4.x: ./ include/apr_errno.h

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Saturday 04 February 2012, William A. Rowe Jr. wrote:
> > Read the full comment in the file (the diff context is too
> > small).  There is a huge range of error codes reserved for the
> > application. Out of this range, subversion already had some
> > ranges reserved. Now HTTPD has some other range reserved. There
> > is still plenty of space for other applications.
> 
> It still doesn't make much sense.
> 
>   1. you can't add reservations in apr 1.x - that would be a
> semantic change reserved for apr 2.x
> 
>   2. it's not apr_*.h job to document userspace (and yes, if svn
> ranges are defined here, that too was an error).  These surely
> belong in http_/ap_*.h header space, no?

I guess the comment in apr_errno.h is only informational. In most 
cases it doesn't matter if two applications use the same error codes.
But it won't hurt to have the ranges used by the two biggest apr 
consumers documented, even if it's not an API guarantee.

But I don't care much. Just remove the whole comment block if you 
think it's a bad idea.

Re: svn commit: r1240475 - in /apr/apr/branches/1.4.x: ./ include/apr_errno.h

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 2/4/2012 11:11 AM, Stefan Fritsch wrote:
> On Saturday 04 February 2012, Graham Leggett wrote:
>> On 04 Feb 2012, at 11:47 AM, sf@apache.org wrote:
>>> URL: http://svn.apache.org/viewvc?rev=1240475&view=rev
>>> Log:
>>> Reserve a range of USERERR values for HTTPD
>>>
>>> --- apr/apr/branches/1.4.x/include/apr_errno.h (original)
>>> +++ apr/apr/branches/1.4.x/include/apr_errno.h Sat Feb  4
>>> 09:47:57 2012 @@ -158,6 +158,8 @@ APR_DECLARE(char *)
>>> apr_strerror(apr_sta
>>>
>>>  * Subversion - Defined ranges, of less than 100, at intervals of
>>>  5000 *              starting at an offset of 5000, e.g.
>>>  *               +5000 to 5100,  +10000 to 10100
>>>
>>> + *
>>> + * Apache HTTPD - +2000 to 2999
>>>
>>>  */
>>>
>>> #define APR_OS_START_USERERR    (APR_OS_START_STATUS +
>>> APR_OS_ERRSPACE_SIZE) /**
>>
>> Would it be possible to have this as "reserved for the
>> application", rather than "reserved for httpd"?
>>
>> Ideally APR shouldn't have any httpd specific code in it, however
>> this error range would be useful for other external apps,
>> including httpd.
> 
> Read the full comment in the file (the diff context is too small). 
> There is a huge range of error codes reserved for the application. Out 
> of this range, subversion already had some ranges reserved. Now HTTPD 
> has some other range reserved. There is still plenty of space for 
> other applications.

It still doesn't make much sense.

  1. you can't add reservations in apr 1.x - that would be a semantic
     change reserved for apr 2.x

  2. it's not apr_*.h job to document userspace (and yes, if svn ranges
     are defined here, that too was an error).  These surely belong
     in http_/ap_*.h header space, no?


Re: svn commit: r1240475 - in /apr/apr/branches/1.4.x: ./ include/apr_errno.h

Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Saturday 04 February 2012, Graham Leggett wrote:
> On 04 Feb 2012, at 11:47 AM, sf@apache.org wrote:
> > URL: http://svn.apache.org/viewvc?rev=1240475&view=rev
> > Log:
> > Reserve a range of USERERR values for HTTPD
> > 
> > --- apr/apr/branches/1.4.x/include/apr_errno.h (original)
> > +++ apr/apr/branches/1.4.x/include/apr_errno.h Sat Feb  4
> > 09:47:57 2012 @@ -158,6 +158,8 @@ APR_DECLARE(char *)
> > apr_strerror(apr_sta
> > 
> >  * Subversion - Defined ranges, of less than 100, at intervals of
> >  5000 *              starting at an offset of 5000, e.g.
> >  *               +5000 to 5100,  +10000 to 10100
> > 
> > + *
> > + * Apache HTTPD - +2000 to 2999
> > 
> >  */
> > 
> > #define APR_OS_START_USERERR    (APR_OS_START_STATUS +
> > APR_OS_ERRSPACE_SIZE) /**
> 
> Would it be possible to have this as "reserved for the
> application", rather than "reserved for httpd"?
> 
> Ideally APR shouldn't have any httpd specific code in it, however
> this error range would be useful for other external apps,
> including httpd.

Read the full comment in the file (the diff context is too small). 
There is a huge range of error codes reserved for the application. Out 
of this range, subversion already had some ranges reserved. Now HTTPD 
has some other range reserved. There is still plenty of space for 
other applications.