Commit 35a3c501 authored by Howard Chu's avatar Howard Chu
Browse files

Define sock_errno() and sock_errstr() for Unix and winsock.

parent 9a582021
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
#define EINPROGRESS WSAEINPROGRESS #define EINPROGRESS WSAEINPROGRESS
#define ETIMEDOUT WSAETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT
#define sock_errno() WSAGetLastError()
#define sock_errstr(err) WSAGetLastErrorString()
#elif MACOS #elif MACOS
# define tcp_close( s ) tcpclose( s ) # define tcp_close( s ) tcpclose( s )
...@@ -93,6 +96,8 @@ ...@@ -93,6 +96,8 @@
#else #else
# define tcp_close( s ) close( s ) # define tcp_close( s ) close( s )
# define sock_errno() errno
# define sock_errstr(err) strerror(err)
#endif /* MACOS */ #endif /* MACOS */
#ifndef ioctl_t #ifndef ioctl_t
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment