From 48c1f944251001bcc0047be899f0021e3293a3a0 Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Tue, 29 Nov 2005 13:12:45 +0000 Subject: [PATCH] Common includefile for platform specific network thingies. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1619 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/netinc.h | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 engine/common/netinc.h diff --git a/engine/common/netinc.h b/engine/common/netinc.h new file mode 100644 index 000000000..9816b71b9 --- /dev/null +++ b/engine/common/netinc.h @@ -0,0 +1,58 @@ + +#ifdef _WIN32 + +#define EWOULDBLOCK WSAEWOULDBLOCK +#define EMSGSIZE WSAEMSGSIZE +#define ECONNRESET WSAECONNRESET +#define ECONNABORTED WSAECONNABORTED +#define ECONNREFUSED WSAECONNREFUSED +#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#define EAFNOSUPPORT WSAEAFNOSUPPORT + +#ifdef IPPROTO_IPV6 +#include +#endif +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef sun +#include +#endif + +#ifdef NeXT +#include +#endif + +#if defined(__MORPHOS__) && !defined(ixemul) +#define closesocket CloseSocket +#define ioctlsocket IoctlSocket +#else +#define closesocket close +#define ioctlsocket ioctl +#endif + +#endif + +#if defined(_WIN32) +#define qerrno WSAGetLastError() +#elif defined(__MORPHOS__) && !defined(ixemul) +#define qerrno Errno() +#else +#define qerrno errno +#endif + + +#ifndef INVALID_SOCKET +#define INVALID_SOCKET -1 +#endif +