From 92e80aa11c501a71f34d8255a25731bd04970aac Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 31 Mar 2019 16:44:55 -0400 Subject: [PATCH] update certain #ifdef DJGPP to also include WATCOM define FTE now builds correctly and runs without crashing under dos/4gw. woot! --- con_dosx.cpp | 12 ++++++------ memicmp.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/con_dosx.cpp b/con_dosx.cpp index 18207f6..0e0a248 100644 --- a/con_dosx.cpp +++ b/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 // Original author: pacetti@fl-ngnet.army.mil @@ -859,7 +859,7 @@ int ConContinue() } int GetPipeEvent(TEvent *Event) { -#ifdef DJGPP +#if defined(DJGPP) || defined(WATCOM) int i; Event->What = evNone; @@ -1017,7 +1017,7 @@ static void PipeThread(void *p) { } int GUI::OpenPipe(char *Command, EModel *notify) { -#ifdef DJGPP +#if defined(DJGPP) || defined(WATCOM) int 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) { -#ifdef DJGPP +#if defined(DJGPP) || defined(WATCOM) if (id < 0 || id >= MAX_PIPES) return -1; 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) { -#ifdef DJGPP +#if defined(DJGPP) || defined(WATCOM) int rc; if (id < 0 || id >= MAX_PIPES) return -1; @@ -1074,7 +1074,7 @@ int GUI::ReadPipe(int id, void *buffer, int len) { } int GUI::ClosePipe(int id) { -#ifdef DJGPP +#if defined(DJGPP) || defined(WATCOM) if (id < 0 || id >= MAX_PIPES) return -1; if (Pipes[id].used == 0) diff --git a/memicmp.cpp b/memicmp.cpp index 8e7740b..6425829 100644 --- a/memicmp.cpp +++ b/memicmp.cpp @@ -3,7 +3,7 @@ #include #include -#if defined(__DJGPP__) || defined(UNIX) +#if defined(__DJGPP__) || defined(UNIX) || defined(WATCOM) #ifdef __cplusplus extern "C"