From: Howard Chu Date: Sun, 29 Aug 1999 01:56:51 +0000 (+0000) Subject: Define sock_errno() and sock_errstr() for Unix and winsock. X-Git-Tag: TWEB_OL_BASE~87 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=35a3c5017f359f298184fa870ef573c103ae2d8d;p=openldap Define sock_errno() and sock_errstr() for Unix and winsock. --- diff --git a/include/ac/socket.h b/include/ac/socket.h index b852042976..316b89a924 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -77,6 +77,9 @@ #define EINPROGRESS WSAEINPROGRESS #define ETIMEDOUT WSAETIMEDOUT +#define sock_errno() WSAGetLastError() +#define sock_errstr(err) WSAGetLastErrorString() + #elif MACOS # define tcp_close( s ) tcpclose( s ) @@ -93,6 +96,8 @@ #else # define tcp_close( s ) close( s ) +# define sock_errno() errno +# define sock_errstr(err) strerror(err) #endif /* MACOS */ #ifndef ioctl_t