You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2020/11/27 18:27:09 UTC
svn commit: r1883874 - in /apr/apr/trunk: include/apr_errno.h
misc/unix/errorcodes.c
Author: ylavic
Date: Fri Nov 27 18:27:08 2020
New Revision: 1883874
URL: http://svn.apache.org/viewvc?rev=1883874&view=rev
Log:
apr_errno: add APR_EALREADY, eventually mapped from existing [WSA]EALREADY.
Modified:
apr/apr/trunk/include/apr_errno.h
apr/apr/trunk/misc/unix/errorcodes.c
Modified: apr/apr/trunk/include/apr_errno.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_errno.h?rev=1883874&r1=1883873&r2=1883874&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_errno.h (original)
+++ apr/apr/trunk/include/apr_errno.h Fri Nov 27 18:27:08 2020
@@ -853,6 +853,13 @@ APR_DECLARE(char *) apr_strerror(apr_sta
#define APR_ERANGE (APR_OS_START_CANONERR + 29)
#endif
+/** @see APR_STATUS_IS_EALREADY */
+#ifdef EALREADY
+#define APR_EALREADY EALREADY
+#else
+#define APR_EALREADY (APR_OS_START_CANONERR + 30)
+#endif
+
/** @} */
#if defined(OS2) && !defined(DOXYGEN)
@@ -996,13 +1003,14 @@ APR_DECLARE(char *) apr_strerror(apr_sta
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + SOCEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
+#define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \
+ || (s) == APR_OS_START_SYSERR + SOCEALREADY)
/*
Sorry, too tired to wrap this up for OS2... feel free to
fit the following into their best matches.
{ ERROR_NO_SIGNAL_SENT, ESRCH },
- { SOCEALREADY, EALREADY },
{ SOCEDESTADDRREQ, EDESTADDRREQ },
{ SOCEMSGSIZE, EMSGSIZE },
{ SOCEPROTOTYPE, EPROTOTYPE },
@@ -1143,6 +1151,8 @@ APR_DECLARE(char *) apr_strerror(apr_sta
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
+#define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \
+ || (s) == APR_OS_START_SYSERR + WSAEALREADY)
#elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */
@@ -1207,6 +1217,8 @@ APR_DECLARE(char *) apr_strerror(apr_sta
#define APR_STATUS_IS_EOPNOTSUPP(s) ((s) == APR_EOPNOTSUPP \
|| (s) == APR_OS_START_SYSERR + WSAEOPNOTSUPP)
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
+#define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY \
+ || (s) == APR_OS_START_SYSERR + WSAEALREADY)
#else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
@@ -1331,6 +1343,9 @@ APR_DECLARE(char *) apr_strerror(apr_sta
/** Numeric value not representable */
#define APR_STATUS_IS_ERANGE(s) ((s) == APR_ERANGE)
+
+/** Operation already in progress */
+#define APR_STATUS_IS_EALREADY(s) ((s) == APR_EALREADY)
/** @} */
#endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */
Modified: apr/apr/trunk/misc/unix/errorcodes.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/misc/unix/errorcodes.c?rev=1883874&r1=1883873&r2=1883874&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/errorcodes.c (original)
+++ apr/apr/trunk/misc/unix/errorcodes.c Fri Nov 27 18:27:08 2020
@@ -139,6 +139,8 @@ static char *apr_error_string(apr_status
return "The given lock was busy.";
case APR_EPROC_UNKNOWN:
return "The process is not recognized.";
+ case APR_EALREADY:
+ return "Operation already in progress";
case APR_EGENERAL:
return "Internal error (specific information not available)";