diff --git a/engine/common/net_wins.c b/engine/common/net_wins.c index a8aa025cb..e39c0b60d 100644 --- a/engine/common/net_wins.c +++ b/engine/common/net_wins.c @@ -22,6 +22,7 @@ struct sockaddr; #include "quakedef.h" #ifdef _WIN32 + #ifdef _MSC_VER #define USEIPX #endif @@ -33,53 +34,9 @@ struct sockaddr; #include "ws2tcpip.h" #endif -#ifndef _WIN32 //for mac -#include #endif -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EMSGSIZE WSAEMSGSIZE -#define ECONNRESET WSAECONNRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#define EAFNOSUPPORT WSAEAFNOSUPPORT - -#else -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef sun -#include -#endif - -#ifdef NeXT -#include -#endif - -#define closesocket close -#define ioctlsocket ioctl - -#ifndef INVALID_SOCKET -#define INVALID_SOCKET -1 -#endif - -#endif - -#ifdef _WIN32 -#define qerrno WSAGetLastError() //windows errors are retrieved via WSAGetLastError -#else -#define qerrno errno //linux and single threaded oses are happy with errno as a global -#endif +#include "netinc.h" netadr_t net_local_cl_ipadr; netadr_t net_local_cl_ip6adr; @@ -1126,6 +1083,7 @@ void NET_Init (void) if (r) Sys_Error ("Winsock initialization failed."); #endif + Con_TPrintf(TL_UDPINITED); #ifndef SERVERONLY diff --git a/engine/common/plugin.c b/engine/common/plugin.c index 632b5fb31..712772d6a 100644 --- a/engine/common/plugin.c +++ b/engine/common/plugin.c @@ -13,6 +13,8 @@ cvar_t plug_loaddefault = {"plug_loaddefault", "1"}; #include "glquake.h" #endif +#include "netinc.h" + typedef struct plugin_s { char *name; vm_t *vm; @@ -799,46 +801,6 @@ int VARGS Plug_Con_RenameSub(void *offset, unsigned int mask, const long *arg) } -#ifdef _WIN32 -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EMSGSIZE WSAEMSGSIZE -#define ECONNRESET WSAECONNRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL - -#define qerrno WSAGetLastError() - -#ifdef IPPROTO_IPV6 -#include -#endif -#else - - -#define qerrno errno - -#define MSG_PARTIAL 0 -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef __MORPHOS__ -#define closesocket CloseSocket -#define ioctlsocket IoctlSocket -#else -#define closesocket close -#define ioctlsocket ioctl -#endif -#endif - typedef enum{ STREAM_NONE, STREAM_SOCKET,