]> git.sur5r.net Git - openldap/commitdiff
Define sock_errno() and sock_errstr() for Unix and winsock.
authorHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:56:51 +0000 (01:56 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 29 Aug 1999 01:56:51 +0000 (01:56 +0000)
include/ac/socket.h

index b85204297674e778a9a2c2d77ea3785b39338df9..316b89a9242d3529de1916fd6d62695ab70552fc 100644 (file)
@@ -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