Obliterated OS/2

This commit is contained in:
Monster Iestyn 2017-10-07 18:11:14 +01:00
parent d38873854d
commit 52620ac9b1
8 changed files with 8 additions and 45 deletions

View File

@ -1223,7 +1223,7 @@ void CONS_Printf(const char *fmt, ...)
// if not in display loop, force screen update // if not in display loop, force screen update
if (con_startup) if (con_startup)
{ {
#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL)) #ifdef _WINDOWS
static lumpnum_t con_backpic_lumpnum = UINT32_MAX; static lumpnum_t con_backpic_lumpnum = UINT32_MAX;
patch_t *con_backpic; patch_t *con_backpic;

View File

@ -11,9 +11,6 @@
/// \brief Transfer a file using HSendPacket. /// \brief Transfer a file using HSendPacket.
#include <stdio.h> #include <stdio.h>
#ifdef __OS2__
#include <sys/types.h>
#endif // __OS2__
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #include <time.h>

View File

@ -80,15 +80,13 @@ typedef long ssize_t;
#define NOIPX #define NOIPX
#endif #endif
#if defined (_MSC_VER) || defined (__OS2__)
// Microsoft VisualC++
#ifdef _MSC_VER #ifdef _MSC_VER
// Microsoft VisualC++
#if (_MSC_VER <= 1800) // MSVC 2013 and back #if (_MSC_VER <= 1800) // MSVC 2013 and back
#define snprintf _snprintf #define snprintf _snprintf
#if (_MSC_VER <= 1200) // MSVC 2012 and back #if (_MSC_VER <= 1200) // MSVC 2012 and back
#define vsnprintf _vsnprintf #define vsnprintf _vsnprintf
#endif #endif
#endif
#endif #endif
#define strncasecmp strnicmp #define strncasecmp strnicmp
#define strcasecmp stricmp #define strcasecmp stricmp

View File

@ -18,10 +18,6 @@
#ifdef __GNUC__ #ifdef __GNUC__
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef __OS2__
#include <sys/types.h>
#include <sys/time.h>
#endif // __OS2__
#ifndef NO_IPV6 #ifndef NO_IPV6
#define HAVE_IPV6 #define HAVE_IPV6
@ -51,7 +47,7 @@
#else #else
#ifdef USE_WINSOCK1 #ifdef USE_WINSOCK1
#include <winsock.h> #include <winsock.h>
#elif !defined (SCOUW2) && !defined (SCOUW7) && !defined (__OS2__) #elif !defined (SCOUW2) && !defined (SCOUW7)
#ifndef USE_WINSOCK #ifndef USE_WINSOCK
#include <arpa/inet.h> #include <arpa/inet.h>
#endif //normal BSD API #endif //normal BSD API

View File

@ -36,10 +36,6 @@
#include <winsock.h> // socket(),... #include <winsock.h> // socket(),...
#endif //!HAVE_IPV6 #endif //!HAVE_IPV6
#else #else
#ifdef __OS2__
#include <sys/types.h>
#endif // __OS2__
#include <arpa/inet.h> #include <arpa/inet.h>
#ifdef __APPLE_CC__ #ifdef __APPLE_CC__
#ifndef _BSD_SOCKLEN_T_ #ifndef _BSD_SOCKLEN_T_
@ -54,10 +50,6 @@
#include <sys/time.h> // timeval,... (TIMEOUT) #include <sys/time.h> // timeval,... (TIMEOUT)
#include <errno.h> #include <errno.h>
#endif // _WIN32 #endif // _WIN32
#ifdef __OS2__
#include <errno.h>
#endif // __OS2__
#endif // !NONET #endif // !NONET
#include "doomstat.h" #include "doomstat.h"

View File

@ -2417,7 +2417,7 @@ char *I_GetUserName(void)
INT32 I_mkdir(const char *dirname, INT32 unixright) INT32 I_mkdir(const char *dirname, INT32 unixright)
{ {
//[segabor] //[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); return mkdir(dirname, unixright);
#elif defined (_WIN32) #elif defined (_WIN32)
UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt...
@ -2763,16 +2763,6 @@ UINT32 I_GetFreeMem(UINT32 *total)
if (total) if (total)
*total = (UINT32)info.dwTotalPhys; *total = (UINT32)info.dwTotalPhys;
return (UINT32)info.dwAvailPhys; 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) #elif defined (LINUX) || defined (LINUX64)
/* Linux */ /* Linux */
char buf[1024]; char buf[1024];

View File

@ -2435,7 +2435,7 @@ char *I_GetUserName(void)
INT32 I_mkdir(const char *dirname, INT32 unixright) INT32 I_mkdir(const char *dirname, INT32 unixright)
{ {
//[segabor] //[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); return mkdir(dirname, unixright);
#elif defined (_WIN32) #elif defined (_WIN32)
UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt...
@ -2775,16 +2775,6 @@ UINT32 I_GetFreeMem(UINT32 *total)
if (total) if (total)
*total = (UINT32)info.dwTotalPhys; *total = (UINT32)info.dwTotalPhys;
return (UINT32)info.dwAvailPhys; 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 #else
// Guess 48 MB. // Guess 48 MB.
if (total) if (total)

View File

@ -60,7 +60,7 @@ C(vidwidth): .long 0 //use this one out of the inner loops
//so you don't need to patch everywhere... //so you don't need to patch everywhere...
#ifdef USEASM #ifdef USEASM
#if !defined( LINUX) && !defined( __OS2__) #if !defined( LINUX)
.text .text
#endif #endif
.globl C(ASM_PatchRowBytes) .globl C(ASM_PatchRowBytes)
@ -616,7 +616,7 @@ vskydone:
ystep: .long 0 ystep: .long 0
xstep: .long 0 xstep: .long 0
C(texwidth): .long 64 // texture width C(texwidth): .long 64 // texture width
#if !defined( LINUX) && !defined( __OS2__) #if !defined( LINUX)
.text .text
#endif #endif
#ifdef LINUX #ifdef LINUX
@ -1338,7 +1338,7 @@ wdone:
.data .data
advancetable: .long 0, 0 advancetable: .long 0, 0
#if !defined( LINUX) && !defined( __OS2__) #if !defined( LINUX)
.text .text
#endif #endif
#ifdef LINUX #ifdef LINUX