From 52620ac9b1fcf547fa5d299f5b167f2cdb18d430 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sat, 7 Oct 2017 18:11:14 +0100 Subject: [PATCH] Obliterated OS/2 --- src/console.c | 2 +- src/d_netfil.c | 3 --- src/doomtype.h | 4 +--- src/i_tcp.c | 6 +----- src/mserv.c | 8 -------- src/sdl/i_system.c | 12 +----------- src/sdl12/i_system.c | 12 +----------- src/tmap.s | 6 +++--- 8 files changed, 8 insertions(+), 45 deletions(-) diff --git a/src/console.c b/src/console.c index ed3edbc55..3a6e4729d 100644 --- a/src/console.c +++ b/src/console.c @@ -1223,7 +1223,7 @@ void CONS_Printf(const char *fmt, ...) // if not in display loop, force screen update if (con_startup) { -#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL)) +#ifdef _WINDOWS static lumpnum_t con_backpic_lumpnum = UINT32_MAX; patch_t *con_backpic; diff --git a/src/d_netfil.c b/src/d_netfil.c index 90e03041f..bf94e0ca7 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -11,9 +11,6 @@ /// \brief Transfer a file using HSendPacket. #include -#ifdef __OS2__ -#include -#endif // __OS2__ #include #include diff --git a/src/doomtype.h b/src/doomtype.h index 4af899ed0..b0623de9a 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -80,15 +80,13 @@ typedef long ssize_t; #define NOIPX #endif -#if defined (_MSC_VER) || defined (__OS2__) - // Microsoft VisualC++ #ifdef _MSC_VER + // Microsoft VisualC++ #if (_MSC_VER <= 1800) // MSVC 2013 and back #define snprintf _snprintf #if (_MSC_VER <= 1200) // MSVC 2012 and back #define vsnprintf _vsnprintf #endif -#endif #endif #define strncasecmp strnicmp #define strcasecmp stricmp diff --git a/src/i_tcp.c b/src/i_tcp.c index 3bbebadf2..b6c72f859 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -18,10 +18,6 @@ #ifdef __GNUC__ #include #endif -#ifdef __OS2__ -#include -#include -#endif // __OS2__ #ifndef NO_IPV6 #define HAVE_IPV6 @@ -51,7 +47,7 @@ #else #ifdef USE_WINSOCK1 #include -#elif !defined (SCOUW2) && !defined (SCOUW7) && !defined (__OS2__) +#elif !defined (SCOUW2) && !defined (SCOUW7) #ifndef USE_WINSOCK #include #endif //normal BSD API diff --git a/src/mserv.c b/src/mserv.c index efbf89359..e354329ed 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -36,10 +36,6 @@ #include // socket(),... #endif //!HAVE_IPV6 #else -#ifdef __OS2__ -#include -#endif // __OS2__ - #include #ifdef __APPLE_CC__ #ifndef _BSD_SOCKLEN_T_ @@ -54,10 +50,6 @@ #include // timeval,... (TIMEOUT) #include #endif // _WIN32 - -#ifdef __OS2__ -#include -#endif // __OS2__ #endif // !NONET #include "doomstat.h" diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index d0f000b4e..3e46a9b6a 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -2417,7 +2417,7 @@ char *I_GetUserName(void) INT32 I_mkdir(const char *dirname, INT32 unixright) { //[segabor] -#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) || defined (__OS2__) +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) return mkdir(dirname, unixright); #elif defined (_WIN32) UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... @@ -2763,16 +2763,6 @@ UINT32 I_GetFreeMem(UINT32 *total) if (total) *total = (UINT32)info.dwTotalPhys; return (UINT32)info.dwAvailPhys; -#elif defined (__OS2__) - UINT32 pr_arena; - - if (total) - DosQuerySysInfo( QSV_TOTPHYSMEM, QSV_TOTPHYSMEM, - (PVOID) total, sizeof (UINT32)); - DosQuerySysInfo( QSV_MAXPRMEM, QSV_MAXPRMEM, - (PVOID) &pr_arena, sizeof (UINT32)); - - return pr_arena; #elif defined (LINUX) || defined (LINUX64) /* Linux */ char buf[1024]; diff --git a/src/sdl12/i_system.c b/src/sdl12/i_system.c index e759449a7..9a8f0bb46 100644 --- a/src/sdl12/i_system.c +++ b/src/sdl12/i_system.c @@ -2435,7 +2435,7 @@ char *I_GetUserName(void) INT32 I_mkdir(const char *dirname, INT32 unixright) { //[segabor] -#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) || defined (__OS2__) +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) return mkdir(dirname, unixright); #elif defined (_WIN32) UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... @@ -2775,16 +2775,6 @@ UINT32 I_GetFreeMem(UINT32 *total) if (total) *total = (UINT32)info.dwTotalPhys; return (UINT32)info.dwAvailPhys; -#elif defined (__OS2__) - UINT32 pr_arena; - - if (total) - DosQuerySysInfo( QSV_TOTPHYSMEM, QSV_TOTPHYSMEM, - (PVOID) total, sizeof (UINT32)); - DosQuerySysInfo( QSV_MAXPRMEM, QSV_MAXPRMEM, - (PVOID) &pr_arena, sizeof (UINT32)); - - return pr_arena; #else // Guess 48 MB. if (total) diff --git a/src/tmap.s b/src/tmap.s index a828a9d46..ea1f1c26c 100644 --- a/src/tmap.s +++ b/src/tmap.s @@ -60,7 +60,7 @@ C(vidwidth): .long 0 //use this one out of the inner loops //so you don't need to patch everywhere... #ifdef USEASM -#if !defined( LINUX) && !defined( __OS2__) +#if !defined( LINUX) .text #endif .globl C(ASM_PatchRowBytes) @@ -616,7 +616,7 @@ vskydone: ystep: .long 0 xstep: .long 0 C(texwidth): .long 64 // texture width -#if !defined( LINUX) && !defined( __OS2__) +#if !defined( LINUX) .text #endif #ifdef LINUX @@ -1338,7 +1338,7 @@ wdone: .data advancetable: .long 0, 0 -#if !defined( LINUX) && !defined( __OS2__) +#if !defined( LINUX) .text #endif #ifdef LINUX