-#endif
-
-#ifdef WIN32
-#define get_last_sys_error() GetLastError()
-#define clear_sys_error() SetLastError(0)
-#if !defined(WINNT)
-#define WIN_CONSOLE_BUG
-#endif
-#else
-#define get_last_sys_error() errno
-#define clear_sys_error() errno=0
-#endif
-
-#if defined(WINDOWS)
-#define get_last_socket_error() WSAGetLastError()
-#define clear_socket_error() WSASetLastError(0)
-#define readsocket(s,b,n) recv((s),(b),(n),0)
-#define writesocket(s,b,n) send((s),(b),(n),0)
-#define EADDRINUSE WSAEADDRINUSE
-#elif defined(__DJGPP__)
-#define WATT32
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define closesocket(s) close_s(s)
-#define readsocket(s,b,n) read_s(s,b,n)
-#define writesocket(s,b,n) send(s,b,n,0)
-#elif defined(MAC_OS_pre_X)
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define closesocket(s) MacSocket_close(s)
-#define readsocket(s,b,n) MacSocket_recv((s),(b),(n),true)
-#define writesocket(s,b,n) MacSocket_send((s),(b),(n))
-#elif defined(OPENSSL_SYS_VMS)
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define ioctlsocket(a,b,c) ioctl(a,b,c)
-#define closesocket(s) close(s)
-#define readsocket(s,b,n) recv((s),(b),(n),0)
-#define writesocket(s,b,n) send((s),(b),(n),0)
-#elif defined(OPENSSL_SYS_VXWORKS)
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define ioctlsocket(a,b,c) ioctl((a),(b),(int)(c))
-#define closesocket(s) close(s)
-#define readsocket(s,b,n) read((s),(b),(n))
-#define writesocket(s,b,n) write((s),(char *)(b),(n))
-#elif defined(OPENSSL_SYS_NETWARE)
-#define get_last_socket_error() WSAGetLastError()
-#define clear_socket_error() WSASetLastError(0)
-#define readsocket(s,b,n) recv((s),(b),(n),0)
-#define writesocket(s,b,n) send((s),(b),(n),0)
-#else
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define ioctlsocket(a,b,c) ioctl(a,b,c)
-#define closesocket(s) close(s)
-#define readsocket(s,b,n) read((s),(b),(n))
-#define writesocket(s,b,n) write((s),(b),(n))
-#endif