@@ -22,15 +22,11 @@ #endif #ifdef HAVE_NETDB_H # include #endif -#include "socket.h" - -#ifndef INVALID_SOCKET -# define INVALID_SOCKET -1 -#endif +#include "OFSocket.h" #ifndef INADDR_NONE # define INADDR_NONE ((in_addr_t)-1) #endif @@ -56,14 +52,13 @@ # define closesocket(sock) CloseSocket(sock) # define ioctlsocket(fd, req, arg) IoctlSocket(fd, req, arg) # define hstrerror(err) "unknown (no hstrerror)" # define SOCKET_ERROR -1 # if defined(OF_HAVE_THREADS) && !defined(OF_MORPHOS) -# define SocketBase ((struct Library *)of_tlskey_get(of_socket_base_key)) +# define SocketBase ((struct Library *)OFTLSKeyGet(OFSocketBaseKey)) # ifdef OF_AMIGAOS4 -# define ISocket \ - ((struct SocketIFace *)of_tlskey_get(of_socket_interface_key)) +# define ISocket ((struct SocketIFace *)OFTLSKeyGet(OFSocketInterfaceKey)) # endif # endif # ifdef OF_MORPHOS typedef uint32_t in_addr_t; # endif