mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-12 22:02:12 +00:00
RETURN OF THE PORTS CHOPPING BLOCK: Destroy DOS!
Remove all remaining traces of the following macros for the obsolete DOS port, which were missed previously: * `DJGPP` * `__DJGPP__` * `DJGPPDOS` * `PC_DOS` * `WATTCP` May get rid of `MSDOS` later once I get word on whether I should kill it or not
This commit is contained in:
parent
2aaaddae7c
commit
ee8acccd3c
10 changed files with 8 additions and 134 deletions
|
@ -98,7 +98,6 @@ ALL_SYSTEMS=\
|
|||
MINGW64\
|
||||
HAIKU\
|
||||
DUMMY\
|
||||
DJGPPDOS\
|
||||
MINGW\
|
||||
UNIX\
|
||||
LINUX\
|
||||
|
@ -622,8 +621,6 @@ asm:
|
|||
$(REMOVE) $(OBJDIR)/tmp.exe
|
||||
|
||||
# executable
|
||||
# NOTE: DJGPP's objcopy do not have --add-gnu-debuglink
|
||||
|
||||
$(BIN)/$(EXENAME): $(POS) $(OBJS)
|
||||
-$(MKDIR) $(BIN)
|
||||
$(call echo,Linking $(EXENAME)...)
|
||||
|
|
|
@ -40,10 +40,6 @@ void D_SRB2Main(void);
|
|||
|
||||
// Called by IO functions when input is detected.
|
||||
void D_PostEvent(const event_t *ev);
|
||||
#if defined (PC_DOS) && !defined (DOXYGEN)
|
||||
void D_PostEvent_end(void); // delimiter for locking memory
|
||||
#endif
|
||||
|
||||
void D_ProcessEvents(void);
|
||||
|
||||
const char *D_Home(void);
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include <time.h>
|
||||
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#else
|
||||
|
@ -30,10 +30,6 @@
|
|||
#elif defined (_WIN32)
|
||||
#include <sys/utime.h>
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#include <dir.h>
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined (_WIN32) || defined (__DJGPP__)
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -54,17 +54,6 @@ typedef long ssize_t;
|
|||
#define PDWORD_PTR PDWORD
|
||||
#endif
|
||||
#endif
|
||||
#elif defined (__DJGPP__)
|
||||
#define UINT8 unsigned char
|
||||
#define SINT8 signed char
|
||||
|
||||
#define UINT16 unsigned short int
|
||||
#define INT16 signed short int
|
||||
|
||||
#define INT32 signed long
|
||||
#define UINT32 unsigned long
|
||||
#define INT64 signed long long
|
||||
#define UINT64 unsigned long long
|
||||
#else
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#include <stdint.h>
|
||||
|
@ -136,7 +125,7 @@ char *strcasestr(const char *in, const char *what);
|
|||
#endif
|
||||
#endif //macintosh
|
||||
|
||||
#if defined (PC_DOS) || defined (_WIN32) || defined (__HAIKU__)
|
||||
#if defined (_WIN32) || defined (__HAIKU__)
|
||||
#define HAVE_DOSSTR_FUNCS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#else
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#elif !defined (__DJGPP__)
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
|
106
src/i_tcp.c
106
src/i_tcp.c
|
@ -107,15 +107,6 @@
|
|||
#endif
|
||||
#endif // USE_WINSOCK
|
||||
|
||||
#ifdef __DJGPP__
|
||||
#ifdef WATTCP // Alam_GBC: Wattcp may need this
|
||||
#include <tcp.h>
|
||||
#define strerror strerror_s
|
||||
#else // wattcp
|
||||
#include <lsck/lsck.h>
|
||||
#endif // libsocket
|
||||
#endif // djgpp
|
||||
|
||||
typedef union
|
||||
{
|
||||
struct sockaddr any;
|
||||
|
@ -149,25 +140,15 @@
|
|||
|
||||
#include "doomstat.h"
|
||||
|
||||
// win32 or djgpp
|
||||
#if defined (USE_WINSOCK) || defined (__DJGPP__)
|
||||
// win32
|
||||
#ifdef USE_WINSOCK
|
||||
// winsock stuff (in winsock a socket is not a file)
|
||||
#define ioctl ioctlsocket
|
||||
#define close closesocket
|
||||
#endif
|
||||
|
||||
#include "i_addrinfo.h"
|
||||
|
||||
#ifdef __DJGPP__
|
||||
|
||||
#ifdef WATTCP
|
||||
#define SELECTTEST
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define SELECTTEST
|
||||
#endif
|
||||
|
||||
#define DEFAULTPORT "5029"
|
||||
|
||||
#if defined (USE_WINSOCK) && !defined (NONET)
|
||||
|
@ -184,7 +165,7 @@
|
|||
|
||||
#ifndef NONET
|
||||
// define socklen_t in DOS/Windows if it is not already defined
|
||||
#if (defined (WATTCP) && !defined (__libsocket_socklen_t)) || defined (USE_WINSOCK1)
|
||||
#ifdef USE_WINSOCK1
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
static SOCKET_TYPE mysockets[MAXNETNODES+1] = {ERRSOCKET};
|
||||
|
@ -207,19 +188,6 @@ static const char *serverport_name = DEFAULTPORT;
|
|||
static const char *clientport_name;/* any port */
|
||||
|
||||
#ifndef NONET
|
||||
|
||||
#ifdef WATTCP
|
||||
static void wattcp_outch(char s)
|
||||
{
|
||||
static char old = '\0';
|
||||
char pr[2] = {s,0};
|
||||
if (s == old && old == ' ') return;
|
||||
else old = s;
|
||||
if (s == '\r') CONS_Printf("\n");
|
||||
else if (s != '\n') CONS_Printf(pr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
// stupid microsoft makes things complicated
|
||||
static char *get_WSAErrorStr(int e)
|
||||
|
@ -764,11 +732,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen
|
|||
int opt;
|
||||
socklen_t opts;
|
||||
#ifdef FIONBIO
|
||||
#ifdef WATTCP
|
||||
char trueval = true;
|
||||
#else
|
||||
unsigned long trueval = true;
|
||||
#endif
|
||||
#endif
|
||||
mysockaddr_t straddr;
|
||||
struct sockaddr_in sin;
|
||||
|
@ -1138,61 +1102,7 @@ boolean I_InitTcpDriver(void)
|
|||
CONS_Debug(DBG_NETPLAY, "WinSock description: %s\n",WSAData.szDescription);
|
||||
CONS_Debug(DBG_NETPLAY, "WinSock System Status: %s\n",WSAData.szSystemStatus);
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#ifdef WATTCP // Alam_GBC: survive bootp, dhcp, rarp and wattcp/pktdrv from failing to load
|
||||
survive_eth = 1; // would be needed to not exit if pkt_eth_init() fails
|
||||
survive_bootp = 1; // ditto for BOOTP
|
||||
survive_dhcp = 1; // ditto for DHCP/RARP
|
||||
survive_rarp = 1;
|
||||
//_watt_do_exit = false;
|
||||
//_watt_handle_cbreak = false;
|
||||
//_watt_no_config = true;
|
||||
_outch = wattcp_outch;
|
||||
init_misc();
|
||||
//#ifdef DEBUGFILE
|
||||
dbug_init();
|
||||
//#endif
|
||||
switch (sock_init())
|
||||
{
|
||||
case 0:
|
||||
init_tcp_driver = true;
|
||||
break;
|
||||
case 3:
|
||||
CONS_Debug(DBG_NETPLAY, "No packet driver detected\n");
|
||||
break;
|
||||
case 4:
|
||||
CONS_Debug(DBG_NETPLAY, "Error while talking to packet driver\n");
|
||||
break;
|
||||
case 5:
|
||||
CONS_Debug(DBG_NETPLAY, "BOOTP failed\n");
|
||||
break;
|
||||
case 6:
|
||||
CONS_Debug(DBG_NETPLAY, "DHCP failed\n");
|
||||
break;
|
||||
case 7:
|
||||
CONS_Debug(DBG_NETPLAY, "RARP failed\n");
|
||||
break;
|
||||
case 8:
|
||||
CONS_Debug(DBG_NETPLAY, "TCP/IP failed\n");
|
||||
break;
|
||||
case 9:
|
||||
CONS_Debug(DBG_NETPLAY, "PPPoE login/discovery failed\n");
|
||||
break;
|
||||
default:
|
||||
CONS_Debug(DBG_NETPLAY, "Unknown error with TCP/IP stack\n");
|
||||
break;
|
||||
}
|
||||
hires_timer(0);
|
||||
#else // wattcp
|
||||
if (__lsck_init())
|
||||
init_tcp_driver = true;
|
||||
else
|
||||
CONS_Debug(DBG_NETPLAY, "No TCP/IP driver detected\n");
|
||||
#endif // libsocket
|
||||
#endif // __DJGPP__
|
||||
#ifndef __DJGPP__
|
||||
init_tcp_driver = true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
if (!tcp_was_up && init_tcp_driver)
|
||||
|
@ -1217,10 +1127,8 @@ static void SOCK_CloseSocket(void)
|
|||
if (mysockets[i] != (SOCKET_TYPE)ERRSOCKET
|
||||
&& FD_ISSET(mysockets[i], &masterset))
|
||||
{
|
||||
#if !defined (__DJGPP__) || defined (WATTCP)
|
||||
FD_CLR(mysockets[i], &masterset);
|
||||
close(mysockets[i]);
|
||||
#endif
|
||||
}
|
||||
mysockets[i] = ERRSOCKET;
|
||||
}
|
||||
|
@ -1237,14 +1145,6 @@ void I_ShutdownTcpDriver(void)
|
|||
WS_addrinfocleanup();
|
||||
WSACleanup();
|
||||
#endif
|
||||
#ifdef __DJGPP__
|
||||
#ifdef WATTCP // wattcp
|
||||
//_outch = NULL;
|
||||
sock_exit();
|
||||
#else
|
||||
__lsck_uninit();
|
||||
#endif // libsocket
|
||||
#endif // __DJGPP__
|
||||
CONS_Printf("shut down\n");
|
||||
init_tcp_driver = false;
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f)
|
|||
value [eax] \
|
||||
modify exact [eax edx]
|
||||
#elif defined (__GNUC__) && defined (__i386__) && !defined (NOASM)
|
||||
// DJGPP, i386 linux, cygwin or mingw
|
||||
// i386 linux, cygwin or mingw
|
||||
FUNCMATH FUNCINLINE static inline fixed_t FixedMul(fixed_t a, fixed_t b) // asm
|
||||
{
|
||||
fixed_t ret;
|
||||
|
|
|
@ -64,8 +64,6 @@ typedef off_t off64_t;
|
|||
#define PRIdS "u"
|
||||
#elif defined (_WIN32)
|
||||
#define PRIdS "Iu"
|
||||
#elif defined (DJGPP)
|
||||
#define PRIdS "u"
|
||||
#else
|
||||
#define PRIdS "zu"
|
||||
#endif
|
||||
|
|
|
@ -1033,11 +1033,9 @@ void S_SetSfxVolume(INT32 volume)
|
|||
|
||||
void S_ClearSfx(void)
|
||||
{
|
||||
#ifndef DJGPPDOS
|
||||
size_t i;
|
||||
for (i = 1; i < NUMSFX; i++)
|
||||
I_FreeSfx(S_sfx + i);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void S_StopChannel(INT32 cnum)
|
||||
|
|
Loading…
Reference in a new issue