mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'what-is-a-standard'
This commit is contained in:
commit
7d93995aae
1 changed files with 115 additions and 121 deletions
18
src/i_tcp.c
18
src/i_tcp.c
|
|
@ -47,12 +47,9 @@
|
||||||
#else
|
#else
|
||||||
#ifdef USE_WINSOCK1
|
#ifdef USE_WINSOCK1
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#elif !defined (SCOUW2) && !defined (SCOUW7)
|
#else
|
||||||
#ifndef USE_WINSOCK
|
#ifndef USE_WINSOCK
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif //normal BSD API
|
|
||||||
|
|
||||||
#ifndef USE_WINSOCK
|
|
||||||
#ifdef __APPLE_CC__
|
#ifdef __APPLE_CC__
|
||||||
#ifndef _BSD_SOCKLEN_T_
|
#ifndef _BSD_SOCKLEN_T_
|
||||||
#define _BSD_SOCKLEN_T_
|
#define _BSD_SOCKLEN_T_
|
||||||
|
|
@ -60,9 +57,6 @@
|
||||||
#endif //__APPLE_CC__
|
#endif //__APPLE_CC__
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif //normal BSD API
|
|
||||||
|
|
||||||
#ifndef USE_WINSOCK
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif //normal BSD API
|
#endif //normal BSD API
|
||||||
|
|
@ -73,7 +67,7 @@
|
||||||
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
|
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif // UNIXCOMMON
|
#endif // UNIXCOMMON
|
||||||
#endif // !NONET
|
#endif
|
||||||
|
|
||||||
#ifdef USE_WINSOCK
|
#ifdef USE_WINSOCK
|
||||||
// some undefined under win32
|
// some undefined under win32
|
||||||
|
|
@ -111,7 +105,7 @@
|
||||||
#ifndef STATUS_INVALID_PARAMETER
|
#ifndef STATUS_INVALID_PARAMETER
|
||||||
#define STATUS_INVALID_PARAMETER 0xC000000D
|
#define STATUS_INVALID_PARAMETER 0xC000000D
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif // USE_WINSOCK
|
||||||
|
|
||||||
#ifdef __DJGPP__
|
#ifdef __DJGPP__
|
||||||
#ifdef WATTCP // Alam_GBC: Wattcp may need this
|
#ifdef WATTCP // Alam_GBC: Wattcp may need this
|
||||||
|
|
@ -140,7 +134,7 @@ typedef union
|
||||||
#include "miniupnpc/upnpcommands.h"
|
#include "miniupnpc/upnpcommands.h"
|
||||||
#undef STATICLIB
|
#undef STATICLIB
|
||||||
static UINT8 UPNP_support = TRUE;
|
static UINT8 UPNP_support = TRUE;
|
||||||
#endif
|
#endif // HAVE_MINIUPNC
|
||||||
|
|
||||||
#endif // !NONET
|
#endif // !NONET
|
||||||
|
|
||||||
|
|
@ -188,11 +182,11 @@ typedef unsigned long SOCKET_TYPE;
|
||||||
#define ERRSOCKET (-1)
|
#define ERRSOCKET (-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NONET
|
||||||
|
// define socklen_t in DOS/Windows if it is not already defined
|
||||||
#if (defined (WATTCP) && !defined (__libsocket_socklen_t)) || defined (USE_WINSOCK1)
|
#if (defined (WATTCP) && !defined (__libsocket_socklen_t)) || defined (USE_WINSOCK1)
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NONET
|
|
||||||
static SOCKET_TYPE mysockets[MAXNETNODES+1] = {ERRSOCKET};
|
static SOCKET_TYPE mysockets[MAXNETNODES+1] = {ERRSOCKET};
|
||||||
static size_t mysocketses = 0;
|
static size_t mysocketses = 0;
|
||||||
static int myfamily[MAXNETNODES+1] = {0};
|
static int myfamily[MAXNETNODES+1] = {0};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue