update certain #ifdef DJGPP to also include WATCOM define
FTE now builds correctly and runs without crashing under dos/4gw. woot!
This commit is contained in:
parent
5b7ae937ab
commit
92e80aa11c
12
con_dosx.cpp
12
con_dosx.cpp
|
@ -56,7 +56,7 @@ static GPipe Pipes[MAX_PIPES] = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__DJGPP__)
|
#if defined(__DJGPP__) || defined(WATCOM)
|
||||||
|
|
||||||
// adapted from djgpp library source - redirects stderr as well as stdout
|
// adapted from djgpp library source - redirects stderr as well as stdout
|
||||||
// Original author: pacetti@fl-ngnet.army.mil
|
// Original author: pacetti@fl-ngnet.army.mil
|
||||||
|
@ -859,7 +859,7 @@ int ConContinue()
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetPipeEvent(TEvent *Event) {
|
int GetPipeEvent(TEvent *Event) {
|
||||||
#ifdef DJGPP
|
#if defined(DJGPP) || defined(WATCOM)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
Event->What = evNone;
|
Event->What = evNone;
|
||||||
|
@ -1017,7 +1017,7 @@ static void PipeThread(void *p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUI::OpenPipe(char *Command, EModel *notify) {
|
int GUI::OpenPipe(char *Command, EModel *notify) {
|
||||||
#ifdef DJGPP
|
#if defined(DJGPP) || defined(WATCOM)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_PIPES; i++) {
|
for (i = 0; i < MAX_PIPES; i++) {
|
||||||
|
@ -1041,7 +1041,7 @@ int GUI::OpenPipe(char *Command, EModel *notify) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUI::SetPipeView(int id, EModel *notify) {
|
int GUI::SetPipeView(int id, EModel *notify) {
|
||||||
#ifdef DJGPP
|
#if defined(DJGPP) || defined(WATCOM)
|
||||||
if (id < 0 || id >= MAX_PIPES)
|
if (id < 0 || id >= MAX_PIPES)
|
||||||
return -1;
|
return -1;
|
||||||
if (Pipes[id].used == 0)
|
if (Pipes[id].used == 0)
|
||||||
|
@ -1053,7 +1053,7 @@ int GUI::SetPipeView(int id, EModel *notify) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUI::ReadPipe(int id, void *buffer, int len) {
|
int GUI::ReadPipe(int id, void *buffer, int len) {
|
||||||
#ifdef DJGPP
|
#if defined(DJGPP) || defined(WATCOM)
|
||||||
int rc;
|
int rc;
|
||||||
if (id < 0 || id >= MAX_PIPES)
|
if (id < 0 || id >= MAX_PIPES)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1074,7 +1074,7 @@ int GUI::ReadPipe(int id, void *buffer, int len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int GUI::ClosePipe(int id) {
|
int GUI::ClosePipe(int id) {
|
||||||
#ifdef DJGPP
|
#if defined(DJGPP) || defined(WATCOM)
|
||||||
if (id < 0 || id >= MAX_PIPES)
|
if (id < 0 || id >= MAX_PIPES)
|
||||||
return -1;
|
return -1;
|
||||||
if (Pipes[id].used == 0)
|
if (Pipes[id].used == 0)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#if defined(__DJGPP__) || defined(UNIX)
|
#if defined(__DJGPP__) || defined(UNIX) || defined(WATCOM)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|
Reference in a new issue