apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/include apr_errno.h
Date Tue, 16 Mar 2004 02:09:39 GMT
bnicholes    2004/03/15 18:09:38

  Modified:    include  apr_errno.h
  Log:
  Use the correct macros for converting between winsock net errors and apr on NetWare
  
  submitted by: Jean-Jacques Clar<JJCLAR@novell.com>
  
  Revision  Changes    Path
  1.118     +5 -4      apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_errno.h,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- apr_errno.h	12 Mar 2004 17:24:36 -0000	1.117
  +++ apr_errno.h	16 Mar 2004 02:09:38 -0000	1.118
  @@ -1043,14 +1043,15 @@
   
   #elif defined(NETWARE) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32)
*/
   
  -#define APR_FROM_OS_ERROR(e)  (e)
  -#define APR_TO_OS_ERROR(e)    (e)
  +#define APR_FROM_OS_ERROR(e) (e == 0 ? APR_SUCCESS : e + APR_OS_START_SYSERR)
  +#define APR_TO_OS_ERROR(e)   (e == 0 ? APR_SUCCESS : e - APR_OS_START_SYSERR)
   
   #define apr_get_os_error()    (errno)
   #define apr_set_os_error(e)   (errno = (e))
   
  -#define apr_get_netos_error()   (WSAGetLastError()+APR_OS_START_SYSERR)
  -#define apr_set_netos_error(e)   (WSASetLastError((e)-APR_OS_START_SYSERR))
  +/* A special case, only socket calls require this: */
  +#define apr_get_netos_error()   (APR_FROM_OS_ERROR(WSAGetLastError()))
  +#define apr_set_netos_error(e)  (WSASetLastError(APR_TO_OS_ERROR(e)))
   
   #define APR_STATUS_IS_SUCCESS(s)           ((s) == APR_SUCCESS)
   
  
  
  

Mime
View raw message