apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject svn commit: r416634 - /apr/apr/trunk/include/apr_errno.h
Date Fri, 23 Jun 2006 08:35:24 GMT
Author: dreid
Date: Fri Jun 23 01:35:23 2006
New Revision: 416634

URL: http://svn.apache.org/viewvc?rev=416634&view=rev
Log:
Add a "small" space for apr-util to define error codes.

Instead of just using APR_OS_ERRSPACE_SIZE / 2 I went with a 
defined size to give us more control over it.

Modified:
    apr/apr/trunk/include/apr_errno.h

Modified: apr/apr/trunk/include/apr_errno.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_errno.h?rev=416634&r1=416633&r2=416634&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_errno.h (original)
+++ apr/apr/trunk/include/apr_errno.h Fri Jun 23 01:35:23 2006
@@ -122,10 +122,25 @@
  */
 #define APR_OS_ERRSPACE_SIZE 50000
 /**
+ * APR_UTIL_ERRSPACE_SIZE is the size of the space that is reserved for
+ * use within apr-util. This space is reserved above that used by APR
+ * internally.
+ * @note This number MUST be smaller than APR_OS_ERRSPACE_SIZE by a
+ *       large enough amount that APR has sufficient room for it's
+ *       codes.
+ */
+#define APR_UTIL_ERRSPACE_SIZE 20000
+/**
  * APR_OS_START_STATUS is where the APR specific status codes start.
  */
 #define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
 /**
+ * APR_UTIL_START_STATUS is where APR-Util starts defining it's
+ * status codes.
+ */
+#define APR_UTIL_START_STATUS   (APR_OS_START_STATUS + \
+                           (APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE))
+/**
  * APR_OS_START_USERERR are reserved for applications that use APR that
  *     layer their own error codes along with APR's.  Note that the
  *     error immediately following this one is set ten times farther
@@ -181,7 +196,11 @@
  *
  *  70,000      APR_OS_START_STATUS
  *
- *         + APR_OS_ERRSPACE_SIZE (50,000)
+ *         + APR_OS_ERRSPACE_SIZE - APR_UTIL_ERRSPACE_SIZE (30,000)
+ *
+ * 100,000      APR_UTIL_START_STATUS
+ *
+ *         + APR_UTIL_ERRSPACE_SIZE (20,000)
  *
  * 120,000      APR_OS_START_USERERR
  *



Mime
View raw message