From 35a3c5017f359f298184fa870ef573c103ae2d8d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 29 Aug 1999 01:56:51 +0000 Subject: [PATCH] Define sock_errno() and sock_errstr() for Unix and winsock. --- include/ac/socket.h | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5