summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2000-04-10 21:09:09 +0000
committerstoddard <stoddard@13f79535-47bb-0310-9956-ffa450edef68>2000-04-10 21:09:09 +0000
commit890e8d4692081c46e4edcb29f1ca670508cb0699 (patch)
treee6dd89151359ae30e74e092d7083546c80175284
parentbdfdd9d4afa61d0fc1952f89dec3a609e44ccffd (diff)
downloadlibapr-890e8d4692081c46e4edcb29f1ca670508cb0699.tar.gz
Fix Windows compile breaks due to recent error reporting/message changes
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59820 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--network_io/win32/sockaddr.c4
-rw-r--r--network_io/win32/sockets.c2
-rw-r--r--network_io/win32/sockopt.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/network_io/win32/sockaddr.c b/network_io/win32/sockaddr.c
index 0e24d7189..c75532c1a 100644
--- a/network_io/win32/sockaddr.c
+++ b/network_io/win32/sockaddr.c
@@ -141,7 +141,7 @@ ap_status_t ap_set_local_ipaddr(ap_socket_t *sock, const char *addr)
ipaddr = inet_addr(addr);
if (ipaddr == INADDR_NONE) {
- return APR_ENOADDRESS;
+ return WSAEADDRNOTAVAIL;
}
sock->local_addr->sin_addr.s_addr = ipaddr;
@@ -168,7 +168,7 @@ ap_status_t ap_set_remote_ipaddr(ap_socket_t *sock, const char *addr)
ipaddr = inet_addr(addr);
if (ipaddr == INADDR_NONE) {
- return APR_ENOADDRESS;
+ return WSAEADDRNOTAVAIL;
}
sock->remote_addr->sin_addr.s_addr = ipaddr;
diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c
index 5484d3523..19f159d49 100644
--- a/network_io/win32/sockets.c
+++ b/network_io/win32/sockets.c
@@ -201,7 +201,7 @@ ap_status_t ap_connect(ap_socket_t *sock, char *hostname)
else {
hp = gethostbyname(hostname);
if (!hp) {
- return status_from_res_error(WSAGetLastError());
+ return (WSAGetLastError() + APR_OS_START_SYSERR);
}
memcpy((char *)&sock->remote_addr->sin_addr, hp->h_addr_list[0], hp->h_length);
sock->addr_len = sizeof(*sock->remote_addr);
diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c
index e9c75fef9..ba81d1a7e 100644
--- a/network_io/win32/sockopt.c
+++ b/network_io/win32/sockopt.c
@@ -156,9 +156,9 @@ ap_status_t ap_get_remote_hostname(char **name, ap_socket_t *sock)
return APR_ENOMEM;
}
- return status_from_res_error(WSAGetLastError());
+ return (WSAGetLastError() + APR_OS_START_SYSERR);
}
-
+#if 0
ap_status_t status_from_res_error(int reserr)
{
ap_status_t status;
@@ -180,5 +180,6 @@ ap_status_t status_from_res_error(int reserr)
}
return status;
}
+#endif