Merge branch 'what-is-a-standard'

This commit is contained in:
James R 2020-12-10 11:23:53 -08:00
commit e4cf8ebcf5
1 changed files with 115 additions and 121 deletions

View File

@ -47,12 +47,9 @@
#else
#ifdef USE_WINSOCK1
#include <winsock.h>
#elif !defined (SCOUW2) && !defined (SCOUW7)
#else
#ifndef USE_WINSOCK
#include <arpa/inet.h>
#endif //normal BSD API
#ifndef USE_WINSOCK
#ifdef __APPLE_CC__
#ifndef _BSD_SOCKLEN_T_
#define _BSD_SOCKLEN_T_
@ -60,9 +57,6 @@
#endif //__APPLE_CC__
#include <sys/socket.h>
#include <netinet/in.h>
#endif //normal BSD API
#ifndef USE_WINSOCK
#include <netdb.h>
#include <sys/ioctl.h>
#endif //normal BSD API
@ -73,7 +67,7 @@
#if (defined (__unix__) && !defined (MSDOS)) || defined(__APPLE__) || defined (UNIXCOMMON)
#include <sys/time.h>
#endif // UNIXCOMMON
#endif // !NONET
#endif
#ifdef USE_WINSOCK
// some undefined under win32
@ -111,7 +105,7 @@
#ifndef STATUS_INVALID_PARAMETER
#define STATUS_INVALID_PARAMETER 0xC000000D
#endif
#endif
#endif // USE_WINSOCK
#ifdef __DJGPP__
#ifdef WATTCP // Alam_GBC: Wattcp may need this
@ -140,7 +134,7 @@ typedef union
#include "miniupnpc/upnpcommands.h"
#undef STATICLIB
static UINT8 UPNP_support = TRUE;
#endif
#endif // HAVE_MINIUPNC
#endif // !NONET
@ -188,11 +182,11 @@ typedef unsigned long SOCKET_TYPE;
#define ERRSOCKET (-1)
#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)
typedef int socklen_t;
#endif
#ifndef NONET
static SOCKET_TYPE mysockets[MAXNETNODES+1] = {ERRSOCKET};
static size_t mysocketses = 0;
static int myfamily[MAXNETNODES+1] = {0};