apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Jacques Clar" <JJC...@novell.com>
Subject [PATCH]: APR_FROM_OS_ERROR on NetWare
Date Mon, 15 Mar 2004 19:58:20 GMT
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



Mime
View raw message