From cbd58ab0bd8263741966eb116170aabf69a8b14c Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Fri, 6 Oct 2000 17:24:43 +0000 Subject: Here it is, the Win32 part of the big canonical errors patch. The reason is really, really simple. If we ever choose to mix clib and dos error codes, they criss-cross and don't line up, but they share the same number space. As I wrote the new APR_IS_ERROR macros, I realized we were about to shoot ourselves in the foot. These changes nearly entirely affect Win32 only. The next big patch will affect all of the rv == APR_ENOENT type problems throughout the system. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86416 13f79535-47bb-0310-9956-ffa450edef68 --- os/win32/mod_isapi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'os') diff --git a/os/win32/mod_isapi.c b/os/win32/mod_isapi.c index 6e7e39fb01..9470b27d85 100644 --- a/os/win32/mod_isapi.c +++ b/os/win32/mod_isapi.c @@ -280,8 +280,8 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!(*isa)->handle) { - apr_status_t rv = GetLastError(); - ap_log_rerror(APLOG_MARK, APLOG_ALERT, GetLastError(), r, + apr_status_t rv = apr_get_os_error(); + ap_log_rerror(APLOG_MARK, APLOG_ALERT, apr_get_os_error(), r, "ISAPI %s failed to load", fpath); (*isa)->handle = NULL; return rv; @@ -290,7 +290,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!((*isa)->GetExtensionVersion = (void *)(GetProcAddress((*isa)->handle, "GetExtensionVersion")))) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s is missing GetExtensionVersion()", fpath); @@ -302,7 +302,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, if (!((*isa)->HttpExtensionProc = (void *)(GetProcAddress((*isa)->handle, "HttpExtensionProc")))) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s is missing HttpExtensionProc()", fpath); @@ -318,7 +318,7 @@ static apr_status_t isapi_load(apr_pool_t *p, isapi_server_conf *sconf, /* Run GetExtensionVersion() */ if (!((*isa)->GetExtensionVersion)((*isa)->pVer)) { - apr_status_t rv = GetLastError(); + apr_status_t rv = apr_get_os_error(); ap_log_rerror(APLOG_MARK, APLOG_ALERT, rv, r, "ISAPI %s call GetExtensionVersion() failed", fpath); @@ -688,8 +688,8 @@ BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize) *lpdwSize - read)) > 0)) { if (res < 0) { *lpdwSize = 0; - if (!GetLastError()) - SetLastError(TODO_ERROR); /* XXX: Find the right error code */ + if (!apr_get_os_error()) + apr_set_os_error(TODO_ERROR); /* XXX: Find the right error code */ return FALSE; } -- cgit v1.2.3