]> Git repositories of Nishi - tewi.git/commitdiff
wip
authorNishi <nishi@nishi.boats>
Mon, 14 Oct 2024 10:01:02 +0000 (10:01 +0000)
committerNishi <nishi@nishi.boats>
Mon, 14 Oct 2024 10:01:02 +0000 (10:01 +0000)
git-svn-id: file:///raid/svn-personal/tewi/trunk@315 8739d7e6-ffea-ec47-b151-bdff447c6205

19 files changed:
Common/dir.c
Makefile
Module/Makefile
Module/mod_cgi.c
Module/mod_example.c
Module/mod_proxy.c
README
README.tmpl
Server/Makefile
Server/config.c
Server/http.c
Server/main.c
Server/module.c
Server/server.c
Server/strptime.c
Server/strptime.h
Server/tw_config.h
Server/tw_module.h
config.h.tmpl

index 0a276874d237db85f1b3077b1d2f389fd8889ba1..77fef96d77f391096c4987d45c6e4635e34ef88e 100644 (file)
@@ -7,6 +7,8 @@
 #include <sys/stat.h>
 #if !defined(_MSC_VER) && !defined(__WATCOMC__)
 #include <dirent.h>
+#elif defined(__NETWARE__)
+#include <dirent.h>
 #elif defined(__WATCOMC__) || defined(_MSC_VER)
 #include <direct.h>
 #endif
index f86e025d768c1f742a9a02831c01753cc2a4addd..bddd35e95a4dbf008b4ba2a6aaa593365a675899 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -44,8 +44,10 @@ install: all ./Tool/genconf ./Tool/itworks
        if [ ! -e $(DESTDIR)$(PREFIX)/www/pbtewi.gif ]; then ( cp Binary/pbtewi.gif $(DESTDIR)$(PREFIX)/www/ || ( rm $(DESTDIR)$(PREFIX)/www/pbtewi.gif ; exit 1 ) ) ; fi
        -cp ./Server/tewi $(DESTDIR)$(PREFIX)/bin/
        -cp ./Server/tewi.exe $(DESTDIR)$(PREFIX)/bin/
+       -cp ./Server/tewi.nlm $(DESTDIR)$(PREFIX)/bin/
        -cp ./Module/*.so $(DESTDIR)$(PREFIX)/lib/tewi/
        -cp ./Module/*.dll $(DESTDIR)$(PREFIX)/lib/tewi/
+       -cp ./Module/*.nlm $(DESTDIR)$(PREFIX)/lib/tewi/
 
 format:
        clang-format --verbose -i `find ./Server ./Common ./Module ./Tool "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` config.h
index 2f7070fe181d22583bd66fc2c7c48c2abc9b6113..3790510722e1e619519df3db807a5e6053731691 100644 (file)
@@ -12,7 +12,7 @@ include $(PWD)/Platform/$(PLATFORM).mk
 all: mod_cgi$(LIBSUF) mod_proxy$(LIBSUF)
 
 .$(OBJ)$(LIBSUF):
-       $(CC) $(LDFLAGS) $(SHARED) -o $@ $< ../Common/common.$(STATIC) $(LIBS)
+       $(CC) $(LDFLAGS) $(SHARED) -o $@ $< $(LIBEXTRA) ../Common/common.$(STATIC) $(LIBS)
 
 .c.$(OBJ):
        $(CC) $(CFLAGS) -I ../Server -c -o $@ $<
index da9e232951640790476922f6fd08429e3ce4c171..e3003077e70945fab8fe320109a70245b8e88bd7 100644 (file)
@@ -21,3 +21,7 @@ int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req,
        res->status = 403;
        return TW_MODULE_STOP;
 }
+
+#ifdef __NETWARE__
+int main() { return 0; }
+#endif
index 6472128d1840679c8068ee47a820d297437867bd..7b7ce0f14c976f408ec466e3d110b753cceae2a8 100644 (file)
@@ -12,3 +12,7 @@ int MODULE_DECL mod_init(struct tw_config* config, struct tw_tool* tools) {
 int MODULE_DECL mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_PARSED; }
 
 int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_ERROR(403); }
+
+#ifdef __NETWARE__
+int main() { return 0; }
+#endif
index ab26a42443be01e9412318c8aad0e8ebeb78656c..ac276b0a485e6376613f1e7665df6839500cbb9e 100644 (file)
@@ -13,3 +13,7 @@ int MODULE_DECL mod_init(struct tw_config* config, struct tw_tool* tools) {
 int MODULE_DECL mod_config(struct tw_tool* tools, char** argv, int argc) { return TW_CONFIG_NOTME; }
 
 int MODULE_DECL mod_request(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res) { return TW_MODULE_PASS; }
+
+#ifdef __NETWARE__
+int main() { return 0; }
+#endif
diff --git a/README b/README
index 064721e07241ae32b6fc360fa3248c7e6eb6b6f4..2199757c8082dfc9ecab17d920b338a52cfc0d5a 100644 (file)
--- a/README
+++ b/README
@@ -44,7 +44,8 @@ OpenBSD                  Working
 Haiku                    Working
 Minix                    Working
 UnixWare                 Working on 7.1.1
-OS/2                     Mostly working, module is broken. Help required!
+OS/2                     Working
+NetWare                  WIP
 PlayStation Portable     Working, missing module support
                          TODO: Get multi-threading working (maybe)
 PlayStation 2            Not working
index a91c3ee85727fc2dc7f4a4c06bf1c659b7b4acce..36a2ae542e68ca573bc3785e76260492c7ab0498 100644 (file)
@@ -45,7 +45,7 @@ Haiku                    Working
 Minix                    Working
 UnixWare                 Working on 7.1.1
 OS/2                     Working
-NetWare                  WIP
+NetWare                  WIP, cannot run fopen somehow
 PlayStation Portable     Working, missing module support
                          TODO: Get multi-threading working (maybe)
 PlayStation 2            Not working
index f9876081ff0d4ee18da496cb74ccf857f0d142bf..ef480adf0f6aba9ad2eb47a60ba32ba207a749cf 100644 (file)
@@ -59,4 +59,4 @@ concat.rc: tewi.rc gui.rc
        cat tewi.rc gui.rc > concat.rc
 
 clean:
-       rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj concat.rc *.tds
+       rm -f *.o tewi *.exe *.res *.elf *.sfo *.pbp *.self *.pkg *.obj concat.rc *.tds *.nlm
index fdcbc063deea88f613222a1f4930b44dadb88d82..bf5c23685c7d0013b6bf3d2efd462088dae8b35b 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
+#include <errno.h>
 
 #if !defined(_MSC_VER) && !defined(__BORLANDC__)
 #include <unistd.h>
@@ -124,6 +125,8 @@ void tw_config_init(void) {
        strcpy(config.hostname, "ps3");
 #elif defined(__ps2sdk__)
        strcpy(config.hostname, "ps2");
+#elif defined(__NETWARE__)
+       strcpy(config.hostname, "netware");
 #else
        gethostname(config.hostname, 1024);
 #endif
@@ -583,6 +586,7 @@ int tw_config_read(const char* path) {
                        return stop;
                }
        } else {
+               printf("%d\n", errno);
                cm_log("Config", "Could not open the file");
                return 1;
        }
index b875c185a077415dbad7d87730b4b057466f100e..10713f1590e8c8184321a90491903bf68691e361 100644 (file)
 #include <tcpustd.h>
 #endif
 
-#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
 #ifdef USE_WINSOCK1
 #include <winsock.h>
 #else
 #include <winsock2.h>
 #endif
+#elif defined(__NETWARE__)
+#include <sys/socket.h>
 #else
 #ifdef USE_POLL
 #ifdef __PPU__
index 7b8abe2592937684375d4e35debfc3c7e073e372..a14fd8cdf20c0fb11603e9d631c7fad5464490e3 100644 (file)
 #include "tw_server.h"
 #include "tw_version.h"
 
-#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
 #include <windows.h>
+#elif defined(__NETWARE__)
+#include <nwconio.h>
+#include <nwthread.h>
 #endif
 
 #ifdef _PSP
@@ -92,7 +95,7 @@ char tw_server[2048];
 
 int startup(int argc, char** argv);
 
-#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__)) || defined(__BORLANDC__)
+#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || defined(__BORLANDC__)
 char* get_registry(const char* main, const char* sub) {
        DWORD bufsize = 512;
        HKEY handle;
@@ -532,8 +535,32 @@ void show_png(void) {
 #endif
 
 #if !defined(BUILD_GUI_VALID)
+void thread_stuff(void* pargs);
+
+struct arg_struct {
+       int argc;
+       char** argv;
+};
+
 int main(int argc, char** argv) {
        int st;
+#ifdef __NETWARE__
+       struct arg_struct* parg = malloc(sizeof(*parg));
+       parg->argc = argc;
+       parg->argv = argv;
+       DestroyScreen(GetCurrentScreen());
+       SetCurrentScreen(CreateScreen("Tewi Console", 0));
+       BeginThread(thread_stuff, NULL, 0, parg);
+       ThreadSwitch();
+       ExitThread(EXIT_THREAD, 0);
+       return 0;
+}
+
+void thread_stuff(void* pargs) {
+       int st;
+       int argc = ((struct arg_struct*)pargs)->argc;
+       char** argv = ((struct arg_struct*)pargs)->argv;
+#endif
 #ifdef SERVICE
        SERVICE_TABLE_ENTRY table[] = {{"Tewi HTTPd", servmain}, {NULL, NULL}};
        logfile = stderr;
@@ -706,7 +733,11 @@ int main(int argc, char** argv) {
                while(1)
                        ;
 #endif
+#ifdef __NETWARE__
+               return;
+#else
                return st;
+#endif
 #endif
        }
        tw_server_loop();
@@ -714,14 +745,18 @@ int main(int argc, char** argv) {
 #ifdef _PSP
        sceKernelExitGame();
 #endif
+#ifdef __NETWARE__
+       return;
+#else
        return 0;
+#endif
 }
 #endif
 
 int startup(int argc, char** argv) {
        int i;
        char* r;
-#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__)) || defined(__BORLANDC__)
+#if defined(__MINGW32__) || defined(_MSC_VER) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__)) || 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) {
@@ -805,7 +840,7 @@ int startup(int argc, char** argv) {
 #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(__BORLANDC__) && !defined(__WATCOMC__)
        signal(SIGCHLD, SIG_IGN);
        signal(SIGPIPE, SIG_IGN);
-#elif !defined(BUILD_GUI) && !defined(__OS2__)
+#elif !defined(BUILD_GUI) && !defined(__OS2__) && !defined(__NETWARE__)
        SetConsoleTitle(tw_server);
 #endif
        return -1;
index e92aece5cf03d962eabbe3352f07f4f73443aed1..28a597d0195d541c949d14b2c9734fcb3a0da2cd 100644 (file)
@@ -31,6 +31,9 @@ int tw_module_init(void* mod) { return 1; }
 #define INCL_DOSMODULEMGR
 #define INCL_DOSERRORS
 #include <os2.h>
+#elif defined(__NETWARE__)
+#include <nwadv.h>
+#include <nwthread.h>
 #else
 #include <windows.h>
 #include <direct.h>
@@ -45,14 +48,19 @@ void* tw_module_load(const char* path) {
        char tmp[512];
 #ifdef __OS2__
        HMODULE mod;
+#elif defined(__NETWARE__)
+       unsigned int* hnd = malloc(sizeof(*hnd));
 #endif
        chdir(config.server_root);
 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
 #ifdef __OS2__
-       if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR){
+       if(DosLoadModule(tmp, 512, path, &mod) != NO_ERROR) {
                return NULL;
        }
        lib = (void*)mod;
+#elif defined(__NETWARE__)
+       *hnd = FindNLMHandle(path);
+       lib = (void*)hnd;
 #else
        lib = LoadLibraryA(path);
 #endif
@@ -72,11 +80,13 @@ void* tw_module_symbol(void* mod, const char* sym) {
 #ifdef __OS2__
        void* ret;
        APIRET rc;
-       if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR){
+       if((rc = DosQueryProcAddr((HMODULE)mod, 0, sym, (PFN*)&ret)) != NO_ERROR) {
                cm_log("Module", "OS/2 error %d", (int)rc);
                return NULL;
        }
        return ret;
+#elif defined(__NETWARE__)
+       return ImportSymbol(*(unsigned int*)mod, sym);
 #else
        return GetProcAddress(mod, sym);
 #endif
index 05236d631a23c0316a95bad09b3da4d00befb8da..ffa6d7877ae1158c9ae69adaeb0110a4692cfd3e 100644 (file)
@@ -47,7 +47,7 @@ typedef int socklen_t;
 #include <tcpustd.h>
 #endif
 
-#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
 #ifndef NO_GETNAMEINFO
 #include <ws2tcpip.h>
 #include <wspiapi.h>
@@ -62,6 +62,15 @@ typedef int socklen_t;
 
 #include "strptime.h"
 typedef int socklen_t;
+#elif defined(__NETWARE__)
+#include <sys/socket.h>
+#include <nwthread.h>
+
+typedef int socklen_t;
+#define IPPROTO_TCP 0
+#define INADDR_ANY 0
+#define htons(x) x
+#include "strptime.h"
 #else
 #ifdef USE_POLL
 #ifdef __PPU__
@@ -136,6 +145,8 @@ int tw_wildcard_match(const char* wildcard, const char* target) {
 void close_socket(int sock) {
 #ifdef __OS2__
        soclose(sock);
+#elif defined(__NETWARE__)
+       shutdown(sock, 2);
 #elif defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
        closesocket(sock);
 #else
@@ -145,7 +156,7 @@ void close_socket(int sock) {
 
 int tw_server_init(void) {
        int i;
-#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
        WSADATA wsa;
 #ifdef USE_WINSOCK1
        WSAStartup(MAKEWORD(1, 1), &wsa);
@@ -521,10 +532,12 @@ int tw_server_pass(void* ptr) {
 #ifndef NO_GETNAMEINFO
        struct sockaddr* sa = (struct sockaddr*)&addr;
        getnameinfo(sa, sizeof(addr), address, 512, NULL, 0, NI_NUMERICHOST);
+#elif defined(__NETWARE__)
+               address[0] = 0;
 #else
-               addrstr = inet_ntoa(addr.sin_addr);
-               strcpy(address, addrstr);
-               address[strlen(addrstr)] = 0;
+       addrstr = inet_ntoa(addr.sin_addr);
+       strcpy(address, addrstr);
+       address[strlen(addrstr)] = 0;
 #endif
 #ifdef FREE_PTR
        free(ptr);
@@ -631,7 +644,7 @@ int tw_server_pass(void* ptr) {
 #ifdef __OS2__
                        tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "MOD_REQUEST");
 #else
-                       tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "mod_request");
+                               tw_mod_request_t mod_req = (tw_mod_request_t)tw_module_symbol(config.modules[i], "mod_request");
 #endif
                        if(mod_req != NULL) {
                                int ret = mod_req(&tools, &req, &res);
@@ -940,7 +953,11 @@ cleanup:
 #endif
        close_socket(sock);
 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
+#ifdef __NETWARE__
+       ExitThread(EXIT_THREAD, 0);
+#else
        _endthread();
+#endif
 #elif defined(__HAIKU__)
                exit_thread(0);
 #endif
@@ -958,6 +975,8 @@ extern SERVICE_STATUS_HANDLE status_handle;
 struct thread_entry {
 #ifdef __HAIKU__
        thread_id thread;
+#elif defined(__NETWARE__)
+       int thread;
 #else
        HANDLE handle;
 #endif
@@ -1045,6 +1064,8 @@ void tw_server_loop(void) {
 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
 #ifdef __OS2__
                                        _beginthread(tw_server_pass, 0, 0, e);
+#elif defined(__NETWARE__)
+                                       BeginThread(tw_server_pass, 0, 0, e);
 #else
                                        _beginthread(tw_server_pass, 0, e);
 #endif
index 02dbe55d8d7a5743eae5fe958a59da40c297614f..b809da9a29b3769cdfbc945fa8ba5e5a00b9c54e 100644 (file)
 
 #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
 
+#include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
 #include <time.h>
 #include <stdint.h>
 
 #ifdef __WATCOMC__
+#ifndef __NETWARE__
 #include <strings.h>
 #endif
+#endif
 
 static const unsigned char *conv_num(const unsigned char *, int *, unsigned int, unsigned int);
 static const unsigned char *find_string(const unsigned char *, int *, const char * const *, const char * const *, int);
@@ -116,14 +119,18 @@ static const unsigned char *find_string(const unsigned char *, int *, const char
 #define _tzset tzset
 #endif
 
-#ifdef __BORLANDC__
+#if defined(__BORLANDC__) || defined(__NETWARE__)
 char* cm_strdup(const char* str);
 
+#ifdef __NETWARE__
+#define strncasecmp _strnicmp
+#endif
+
 int _strnicmp(const char* _a, const char* _b, int len){
        char* a = cm_strdup(_a);
        char* b = cm_strdup(_b);
        int i;
-       char* r;
+       int r;
        for(i = 0; a[i] != 0; i++){
                a[i] = tolower(a[i]);
        }
@@ -428,7 +435,7 @@ recurse:
             continue;
 
 #ifndef TIME_MAX
-#if defined(_MSC_VER) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__NETWARE__)
 #define TIME_MAX       INT32_MAX
 #else
 #define TIME_MAX       INT64_MAX
index da44d6a4585551d1f2a2f58aeaa68fcb047bdecf..e33979a34b50a8060cc99d2e503889c1bdd8ab40 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 
 #include <time.h>
 
-#if defined(_WIN32) || defined(_PSP) || defined(__ps2sdk__) || defined(__OS2__)
+#if defined(_WIN32) || defined(_PSP) || defined(__ps2sdk__) || defined(__OS2__) || defined(__NETWARE__)
 char* strptime(const char *buf, const char *fmt, struct tm *tm);
 #endif
 
index 93cefb978f9094a27ecfff5e6578aa5e19d66468..80c93c5241534897a15b2c538ad8ffec76b14713 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
 #include <stdint.h>
 #include <stdbool.h>
 
-#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))
 #ifdef USE_WINSOCK1
 #include <winsock.h>
 #else
@@ -25,7 +25,7 @@ extern "C" {
 #ifdef __PPU__
 #include <net/net.h>
 #endif
-#if !defined(__OS2__)
+#if !defined(__OS2__) && !defined(__NETWARE__)
 #include <netinet/in.h>
 #endif
 #ifdef __HAIKU__
@@ -33,6 +33,19 @@ extern "C" {
 #endif
 #endif
 
+#ifdef __NETWARE__
+struct in_addr {
+       unsigned int s_addr;
+};
+
+struct sockaddr_in {
+       unsigned short sin_family;
+       unsigned short sin_port;
+       struct in_addr sin_addr;
+       char sin_zero[8];
+};
+#endif
+
 #if defined(NO_IPV6)
 #define SOCKADDR struct sockaddr_in
 #else
index 1c345d6d679379c137e972f2fda8022ce7d2ed55..346d48c0607f28e33f107913842e9736fd03a929 100644 (file)
@@ -15,6 +15,8 @@ extern "C" {
 #define INCL_DOSERRORS
 #include <os2.h>
 #define MODULE_DECL __export APIENTRY
+#elif defined(__WATCOMC__)
+#define MODULE_DECL __export
 #else
 #define MODULE_DECL
 #endif
@@ -46,9 +48,9 @@ enum TW_MODULE_RETURN {
 #define TW_CONFIG_NOTME _TW_CONFIG_NOTME
 #define TW_CONFIG_ERROR _TW_CONFIG_ERROR
 
-typedef int (MODULE_DECL *tw_mod_init_t)(struct tw_config* config, struct tw_tool* tools);
-typedef int (MODULE_DECL *tw_mod_request_t)(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res);
-typedef int (MODULE_DECL *tw_mod_config_t)(struct tw_tool* tools, char** argv, int argc);
+typedef int(MODULE_DECL* tw_mod_init_t)(struct tw_config* config, struct tw_tool* tools);
+typedef int(MODULE_DECL* tw_mod_request_t)(struct tw_tool* tools, struct tw_http_request* req, struct tw_http_response* res);
+typedef int(MODULE_DECL* tw_mod_config_t)(struct tw_tool* tools, char** argv, int argc);
 
 #ifdef SOURCE
 void* tw_module_load(const char* path);
index 5323cf4eb7178ac71e5861f74b6ffb044e59b997..5ad6089e142fe1173a3111a6b3a122fdd40e4759 100644 (file)
@@ -19,7 +19,7 @@
 #define SSL void
 #endif
 
-#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__))) && defined(BUILD_GUI) && !defined(SERVICE)
+#if (defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__) || (defined(__WATCOMC__) && !defined(__OS2__) && !defined(__NETWARE__))) && defined(BUILD_GUI) && !defined(SERVICE)
 #define BUILD_GUI_VALID
 #endif
 
 #define NO_IPV6
 #endif
 
+#if defined(__WATCOMC__) && defined(__NETWARE__) && !defined(NO_IPV6)
+#define NO_IPV6
+#endif
+
 #endif
 
 /*