httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject RE: cvs commit: apache-2.0/src/lib/apr/network_io/os2 os2nerrno.h os2calls.h
Date Mon, 09 Oct 2000 13:52:13 GMT
Brian (and others)...  before you blast apr_get/set_os_error

would this make more sense?

Index: apr_errno.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
retrieving revision 1.41
diff -u -r1.41 apr_errno.h
--- apr_errno.h	2000/10/09 06:46:48	1.41
+++ apr_errno.h	2000/10/09 13:48:35
.
.This is the OS2 case:
.
@@ -356,6 +356,13 @@
 #define INCL_DOS
 #include <os2.h>
 #include "../network_io/os2/os2nerrno.h"
+
+#define apr_get_os_error()   (errno)
+#define apr_set_os_error(e)  (errno)
+
+/* A special case to share sock error handling: */
+#define apr_get_netos_error() (APR_FROM_OS_ERROR(sock_errno()))
+
 /* And this needs to be greped away for good:
  */
 #define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
.
.This is the WIN32 case:
.
@@ -444,8 +451,7 @@
 #define apr_get_os_error()   (APR_FROM_OS_ERROR(GetLastError()))
 #define apr_set_os_error(e)  (SetLastError(APR_TO_OS_ERROR(e)))
 
-/* A special case, only Win32 winsock calls require this:
- */
+/* A special case to share sock error handling: */
 #define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))
 
 #define APR_STATUS_IS_SUCCESS           ((s) == APR_SUCCESS \
.
.This could be the unix (TPF) case 
.
@@ -504,6 +510,12 @@
 #define apr_get_os_error()    (errno)
 #define apr_set_os_error(e)   (errno = (e))
 
+/* A special case to share sock error handling: */
+#ifdef TPF
+#define apr_get_netos_error()    (sock_errno())
+#else
+#define apr_get_netos_error()    (errno)
+#endif
 #define APR_STATUS_IS_SUCCESS           ((s) == APR_SUCCESS)
 
 /* APR CANONICAL ERROR TESTS */

Mime
View raw message