summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-04-19 22:39:35 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-04-19 22:39:35 +0000
commit89517d04ef292cf1b2573a1364565aadd9d29fad (patch)
tree4ddc583afd250bf1804030e9ac3344231bbcf914 /include
parentb706f6865d5c832e08068a50056b58818c06c35d (diff)
downloadlibapr-89517d04ef292cf1b2573a1364565aadd9d29fad.tar.gz
First pass at ap_strerrot. This is probably broken somewhere, but it compiles
on Linux, and seems to work most of the time. This also provides an error string for every APR error and status code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr_errno.h13
-rw-r--r--include/apr_general.h13
2 files changed, 20 insertions, 6 deletions
diff --git a/include/apr_errno.h b/include/apr_errno.h
index 692e939e0..f065c76b5 100644
--- a/include/apr_errno.h
+++ b/include/apr_errno.h
@@ -52,8 +52,9 @@
* <http://www.apache.org/>.
*/
-#include <errno.h>
+#include "apr_general.h"
#include "apr.h"
+#include <errno.h>
#ifndef APR_ERRNO_H
#define APR_ERRNO_H
@@ -62,6 +63,11 @@
extern "C" {
#endif /* __cplusplus */
+typedef int ap_status_t;
+
+int ap_canonical_error(ap_status_t err);
+
+
/* APR_OS_START_ERROR is where the APR specific error values should start.
* APR_OS_START_STATUS is where the APR specific status codes should start.
* APR_OS_START_USEERR are reserved for applications that use APR that
@@ -75,11 +81,6 @@ extern "C" {
#define APR_OS_START_CANONERR (APR_OS_START_USEERR + 500)
#define APR_OS_START_SYSERR (APR_OS_START_CANONERR + 500)
-typedef int ap_status_t;
-
-int ap_canonical_error(ap_status_t err);
-const char *ap_strerror(ap_status_t err);
-
#define APR_OS2_STATUS(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
#define APR_SUCCESS 0
diff --git a/include/apr_general.h b/include/apr_general.h
index 715ea1fea..59d86cb3f 100644
--- a/include/apr_general.h
+++ b/include/apr_general.h
@@ -357,6 +357,19 @@ B<NOTE>: This is in for backwards compatability. If the program using
*/
ap_status_t ap_set_abort(int (*apr_abort)(int retcode), ap_pool_t *cont);
+/*
+
+=head1 const char *ap_strerror(ap_status_t statcode, ap_pool_t *p)
+
+B<Return a human readable string describing the specified error.>
+
+ arg 1) The error code the get a string for.
+ arg 2) The pool to use to allocate memory for the string.
+
+=cut
+ */
+const char *ap_strerror(ap_status_t statcode, ap_pool_t *p);
+
#ifdef __cplusplus
}
#endif