summaryrefslogtreecommitdiff
path: root/include/apr_errno.h
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2016-01-27 00:08:59 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2016-01-27 00:08:59 +0000
commitec963a3b9647f20e6655bf4a9a3714117aee76e3 (patch)
treebf41a078c0249d7cd6b867326b1fd75e4af54257 /include/apr_errno.h
parent03fc502eb7e015477e466e29a6d8ca5119906724 (diff)
downloadlibapr-ec963a3b9647f20e6655bf4a9a3714117aee76e3.tar.gz
Introduce the subset of svn_cstring_ functions into APR as the apr_cstr_
family of functions. Requires the introduction of APR_ERANGE. Solves apr_cstr_casecmp[n] for ASCII and EBCDIC and borrows from the work of jim, ylavic and wrowe, see r1715401 forwards in; http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?view=log&pathrev=1722194 More performance review is needed against different compilers, so went ahead and borrowed original svn implementation as a basis, and we can port whichever performance enhancements test out more efficiently. Proposing for APR 1.6.0 which is the thought behind the initial @since tags. These must be changed if not accepted for backport. Note that the svn_cstring_join function could not be implemented as-is due to the absence of svn's counted string functionality. It deserves an implementation if not already present, or should be removed before tagging or backporting. No whitespace/formatting cleanup on this pass in order to preserve as much of the svn attributions as possible. This can happen in a later pass to conform to APR's style conventions. While renaming the functions, declarations themsel git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1726928 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_errno.h')
-rw-r--r--include/apr_errno.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/apr_errno.h b/include/apr_errno.h
index 78dbedf27..d2abfb18f 100644
--- a/include/apr_errno.h
+++ b/include/apr_errno.h
@@ -846,6 +846,13 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
#define APR_EOPNOTSUPP (APR_OS_START_CANONERR + 28)
#endif
+/** @see APR_STATUS_IS_ERANGE */
+#ifdef ERANGE
+#define APR_ERANGE ERANGE
+#else
+#define APR_ERANGE (APR_OS_START_CANONERR + 29)
+#endif
+
/** @} */
#if defined(OS2) && !defined(DOXYGEN)
@@ -988,6 +995,7 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|| (s) == APR_OS_START_SYSERR + SOCEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + SOCEOPNOTSUPP)
+#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
/*
Sorry, too tired to wrap this up for OS2... feel free to
@@ -1134,6 +1142,7 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|| (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
+#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
@@ -1197,6 +1206,7 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
|| (s) == APR_OS_START_SYSERR + WSAEAFNOSUPPORT)
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
+#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
@@ -1318,6 +1328,9 @@ APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
#define APR_STATUS_IS_EAFNOSUPPORT(s) ((s) == APR_EAFNOSUPPORT)
/** Socket operation not supported */
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP)
+
+/** Numeric value not representable */
+#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
/** @} */
#endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */