-#endif
-
-#if defined(MSDOS) && !defined(GETPID_IS_MEANINGLESS)
-# define GETPID_IS_MEANINGLESS
-#endif
-
-#ifdef WIN32
-#define NO_SYS_UN_H
-#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)
-#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_BEOS_R5)
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define FIONBIO SO_NONBLOCK
-#define ioctlsocket(a,b,c) setsockopt((a),SOL_SOCKET,(b),(c),sizeof(*(c)))
-#define readsocket(s,b,n) recv((s),(b),(n),0)
-#define writesocket(s,b,n) send((s),(b),(n),0)
-#elif defined(OPENSSL_SYS_NETWARE)
-#if defined(NETWARE_BSDSOCK)
-#define get_last_socket_error() errno
-#define clear_socket_error() errno=0
-#define closesocket(s) close(s)
-#define ioctlsocket(a,b,c) ioctl(a,b,c)
-#if defined(NETWARE_LIBC)
-#define readsocket(s,b,n) recv((s),(b),(n),0)
-#define writesocket(s,b,n) send((s),(b),(n),0)
-#else
-#define readsocket(s,b,n) recv((s),(char*)(b),(n),0)
-#define writesocket(s,b,n) send((s),(char*)(b),(n),0)
-#endif
-#else
-#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)
-#endif
-#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
-
-#ifdef WIN16 /* never the case */
-# define MS_CALLBACK _far _loadds
-# define MS_FAR _far
-#else
-# define MS_CALLBACK
-# define MS_FAR
-#endif