comparison 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
comparison
equal deleted inserted replaced
171:b8e93557b2c7 172:0fc45e386376
1 /* $Id$ */ 1 /* $Id$ */
2 2
3 /* This header includes and defines everything needed for a given OS/compiler */ 3 /* This header includes and defines everything needed for a given OS/compiler */
4 #if !defined(__EMX__) && !defined(__IBMC__) && !defined(__WIN32__) && !defined(WINNT) 4 #ifdef __UNIX__
5 #include "config.h" 5 #include "config.h"
6 6
7 #include <sys/stat.h> 7 #include <sys/stat.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 void msleep(long period); 9 void msleep(long period);
33 33
34 #ifdef DIRSEP 34 #ifdef DIRSEP
35 #undef DIRSEP 35 #undef DIRSEP
36 #endif 36 #endif
37 37
38 #if defined(__EMX__) || defined(__IBMC__) || defined(__WIN32__) || defined(WINNT) 38 #if defined(__EMX__) || defined(__OS2__) || defined(__WIN32__) || defined(WINNT)
39 #include <io.h> 39 #include <io.h>
40 #include <process.h> 40 #include <process.h>
41 41
42 #define DIRSEP "\\" 42 #define DIRSEP "\\"
43 #define INIDIR "." 43 #define INIDIR "."
47 #define INIDIR "~/." __TARGET__ 47 #define INIDIR "~/." __TARGET__
48 #define TYPDIR "/usr/local/" __TARGET__ 48 #define TYPDIR "/usr/local/" __TARGET__
49 #endif 49 #endif
50 50
51 /* OS/2 */ 51 /* OS/2 */
52 #if defined(__EMX__) || defined(__IBMC__) 52 #if defined(__EMX__) || defined(__OS2__)
53 #define INCL_WIN 53 #define INCL_WIN
54 #define INCL_GPI 54 #define INCL_GPI
55 #define INCL_VIO 55 #define INCL_VIO
56 #define INCL_NLS 56 #define INCL_NLS
57 #define INCL_DOS 57 #define INCL_DOS
66 #define HAVE_PIPE 66 #define HAVE_PIPE
67 #ifdef FD_SETSIZE 67 #ifdef FD_SETSIZE
68 #undef FD_SETSIZE 68 #undef FD_SETSIZE
69 #endif 69 #endif
70 #define FD_SETSIZE 1024 70 #define FD_SETSIZE 1024
71 #endif /* __EMX__ */
72
73 #if defined(__EMX__) || defined(__WATCOMC__)
71 #define strcasecmp stricmp 74 #define strcasecmp stricmp
72 #define strncasecmp strnicmp 75 #define strncasecmp strnicmp
73 #endif /* __EMX__ */ 76 #endif
74 77
75 #ifndef OS2 78 #ifndef OS2
76 #define OS2 79 #define OS2
77 #endif /* OS2 */ 80 #endif /* OS2 */
78 81
87 #else 90 #else
88 #define PIPENAME "/tmp/" __TARGET__ "%d" 91 #define PIPENAME "/tmp/" __TARGET__ "%d"
89 #define TPIPENAME "/tmp/" __TARGET__ "%d" 92 #define TPIPENAME "/tmp/" __TARGET__ "%d"
90 #endif /* __EMX__ || __IBMC__ */ 93 #endif /* __EMX__ || __IBMC__ */
91 94
92 #ifdef __IBMC__ 95 #if defined(__OS2__) && (defined(__IBMC__) || defined(__WATCOMC__))
93 #define BSD_SELECT 96 #define BSD_SELECT
94 97
95 #include <types.h> 98 #include <types.h>
96 #include <time.h> 99 #include <time.h>
97 #include <sys/stat.h> 100 #include <sys/stat.h>
98 #include <sys/select.h> 101 #include <sys/select.h>
99 #include <sys/ioctl.h> 102 #include <sys/ioctl.h>
100 #include <direct.h> 103 #include <direct.h>
101 #include <stdarg.h> 104 #include <stdarg.h>
102 /* For VAC we are using the Mozilla dirent.c */ 105 /* For VAC we are using the Mozilla dirent.c */
106 #ifndef __WATCOMC__
103 #include "platform/dirent.h" 107 #include "platform/dirent.h"
108 #endif
104 #endif 109 #endif
105 110
106 /* Windows */ 111 /* Windows */
107 #if defined(__WIN32__) || defined(WINNT) 112 #if defined(__WIN32__) || defined(WINNT)
108 #include <windows.h> 113 #include <windows.h>
154 #include <sys/socket.h> 159 #include <sys/socket.h>
155 #include <sys/un.h> 160 #include <sys/un.h>
156 #include <netinet/in.h> 161 #include <netinet/in.h>
157 #include <netdb.h> 162 #include <netdb.h>
158 #include <arpa/nameser.h> 163 #include <arpa/nameser.h>
164 #if defined(__OS2__) && defined(RES_DEFAULT)
165 #undef RES_DEFAULT
166 #endif
159 #include <resolv.h> 167 #include <resolv.h>
160 #if defined(STDC_HEADERS) || defined(__EMX__) 168 #if defined(STDC_HEADERS) || defined(__EMX__)
161 #include <stdarg.h> 169 #include <stdarg.h>
162 #include <string.h> 170 #include <string.h>
163 #endif /* STDC_HEADERS */ 171 #endif /* STDC_HEADERS */