diff compat.h @ 172:0fc45e386376

Get Dynamic Windows building with Watcom.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 01 Dec 2002 11:11:41 +0000
parents a5da1ac53b34
children 75bf3051235f
line wrap: on
line diff
--- a/compat.h	Sat Nov 30 16:25:06 2002 +0000
+++ b/compat.h	Sun Dec 01 11:11:41 2002 +0000
@@ -1,7 +1,7 @@
 /* $Id$ */
 
 /* This header includes and defines everything needed for a given OS/compiler */
-#if !defined(__EMX__) && !defined(__IBMC__) && !defined(__WIN32__) && !defined(WINNT)
+#ifdef __UNIX__
 #include "config.h"
 
 #include <sys/stat.h>
@@ -35,7 +35,7 @@
 #undef DIRSEP
 #endif
 
-#if defined(__EMX__) || defined(__IBMC__) || defined(__WIN32__) || defined(WINNT)
+#if defined(__EMX__) || defined(__OS2__) || defined(__WIN32__) || defined(WINNT)
 #include <io.h>
 #include <process.h>
 
@@ -49,7 +49,7 @@
 #endif
 
 /* OS/2 */
-#if defined(__EMX__) || defined(__IBMC__)
+#if defined(__EMX__) || defined(__OS2__)
 #define INCL_WIN
 #define INCL_GPI
 #define INCL_VIO
@@ -68,9 +68,12 @@
 #undef FD_SETSIZE
 #endif
 #define FD_SETSIZE 1024
+#endif /* __EMX__ */
+
+#if defined(__EMX__) || defined(__WATCOMC__)
 #define strcasecmp stricmp
 #define strncasecmp strnicmp
-#endif /* __EMX__ */
+#endif
 
 #ifndef OS2
 #define OS2
@@ -89,7 +92,7 @@
 #define TPIPENAME "/tmp/" __TARGET__ "%d"
 #endif /* __EMX__ || __IBMC__ */
 
-#ifdef __IBMC__
+#if defined(__OS2__) && (defined(__IBMC__) || defined(__WATCOMC__))
 #define BSD_SELECT
 
 #include <types.h>
@@ -100,8 +103,10 @@
 #include <direct.h>
 #include <stdarg.h>
 /* For VAC we are using the Mozilla dirent.c */
+#ifndef __WATCOMC__
 #include "platform/dirent.h"
 #endif
+#endif
 
 /* Windows */
 #if defined(__WIN32__) || defined(WINNT)
@@ -156,6 +161,9 @@
 #include <netinet/in.h>
 #include <netdb.h>
 #include <arpa/nameser.h>
+#if defined(__OS2__) && defined(RES_DEFAULT)
+#undef RES_DEFAULT
+#endif
 #include <resolv.h>
 #if defined(STDC_HEADERS) || defined(__EMX__)
 #include <stdarg.h>