You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jean-Jacques Clar <JJ...@novell.com> on 2004/03/15 20:58:20 UTC

[PATCH]: APR_FROM_OS_ERROR on NetWare

The attached patch ensure that APR_FROM_OS_ERROR(e) return 
a consistent value for NetWare.
The current macro prevents AB to run on NetWare because
we are failing a test in apr_socket_connect(): 
 
---------------- sockets.c (line 356) ----------------
    if (connect(sock->socketdes, (const struct sockaddr *)&sa->sa.sin,
                sa->salen) == SOCKET_ERROR) {
        int rc;
        struct timeval tv, *tvptr;
        fd_set wfdset, efdset;
 
        rv = apr_get_netos_error();
        if (rv != APR_FROM_OS_ERROR(WSAEWOULDBLOCK)) {
            return rv;
        }
----------------
 
the call to apr_get_netos_error() return the correct error value:
730035, 
#define apr_get_netos_error()  
(WSAGetLastError()+APR_OS_START_SYSERR)
then the call to APR_FROM_OS_ERROR(WSAEWOULDBLOCK) will 
return only 10035 which is the value of WSAEWOULDBLOCK.
#define APR_FROM_OS_ERROR(e)  (e)
 
see attached patch.
 
Thanks,
 
JJ