From 23ae53015e8da1fbcc73257f4b251b61ebaa88ee Mon Sep 17 00:00:00 2001 From: Nishi Date: Sun, 13 Oct 2024 01:23:22 +0000 Subject: [PATCH] attempting to add os/2 git-svn-id: file:///raid/svn-personal/tewi/trunk@311 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Platform/os2.mk | 17 +++++++++++++++++ Server/config.c | 2 +- Server/main.c | 6 +++--- Server/server.c | 2 +- Server/tw_config.h | 2 +- config.h.tmpl | 2 +- 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 Platform/os2.mk diff --git a/Platform/os2.mk b/Platform/os2.mk new file mode 100644 index 0000000..e4292f6 --- /dev/null +++ b/Platform/os2.mk @@ -0,0 +1,17 @@ +# $Id$ + +PREFIX = C:/Tewi + +PLATFORM_IDENT = OS2_WATCOM +CC = owcc +AR = wlib +AR_FLAGS = -q -b -n -fo +CFLAGS = -b os2v2$(END) -I $(WATCOM)/h/os2 -g -std=c99 -DPREFIX=\"$(PREFIX)\" -I ../Common -fPIC +LDFLAGS = -b os2v2$(END) +LIBS = +EXEC = .exe +STATIC = lib +LIBSUF = .dll +OBJ = obj +REQOBJS = concat.rc +SERVADD = wrc -bt=nt -i=$(WATCOM)/h/nt concat.rc tewi.exe diff --git a/Server/config.c b/Server/config.c index c42109d..a998d67 100644 --- a/Server/config.c +++ b/Server/config.c @@ -15,7 +15,7 @@ #include #endif -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) #ifdef USE_WINSOCK1 #include #else diff --git a/Server/main.c b/Server/main.c index 8e17104..6eb6136 100644 --- a/Server/main.c +++ b/Server/main.c @@ -30,7 +30,7 @@ #include "tw_server.h" #include "tw_version.h" -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) #include #endif @@ -88,7 +88,7 @@ char tw_server[2048]; int startup(int argc, char** argv); -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__)) || defined(__BORLANDC__) char* get_registry(const char* main, const char* sub) { DWORD bufsize = 512; HKEY handle; @@ -717,7 +717,7 @@ int main(int argc, char** argv) { int startup(int argc, char** argv) { int i; char* r; -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__)) || defined(__BORLANDC__) char* confpath = cm_strdup(PREFIX "/etc/tewi.conf"); char* regpath = get_registry("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Tewi HTTPd", "InstallDir"); if(regpath != NULL) { diff --git a/Server/server.c b/Server/server.c index 0d7cea4..2069b6a 100644 --- a/Server/server.c +++ b/Server/server.c @@ -32,7 +32,7 @@ #include #include -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) #ifndef NO_GETNAMEINFO #include #include diff --git a/Server/tw_config.h b/Server/tw_config.h index 498edb5..7d25563 100644 --- a/Server/tw_config.h +++ b/Server/tw_config.h @@ -14,7 +14,7 @@ extern "C" { #include #include -#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) +#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__)) #ifdef USE_WINSOCK1 #include #else diff --git a/config.h.tmpl b/config.h.tmpl index dc6b83a..5025b2f 100644 --- a/config.h.tmpl +++ b/config.h.tmpl @@ -19,7 +19,7 @@ #define SSL void #endif -#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)) && defined(BUILD_GUI) && !defined(SERVICE) +#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))) && defined(BUILD_GUI) && !defined(SERVICE) #define BUILD_GUI_VALID #endif -- 2.45.2