comparison src/s/mingw32.h @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 501cfd01ee6d
children 697ef44129c6
comparison
equal deleted inserted replaced
409:301b9ebbdf3b 410:de805c49cfc1
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* based on cygwin32.h by Andy Piper <andy@xemacs.org> */ 21 /* based on cygwin32.h by Andy Piper <andy@xemacs.org> */
22 22
23 #ifndef WINDOWSNT 23 /* Identify ourselves */
24 #define WINDOWSNT 24 #ifndef WIN32_NATIVE
25 #endif 25 #define WIN32_NATIVE
26 26 #endif
27 #ifndef DOS_NT 27
28 #define DOS_NT /* MSDOS or WINDOWSNT */ 28 #define MINGW
29 #endif
30
31 #ifdef HAVE_MS_WINDOWS
32 #define HAVE_NTGUI
33 #define HAVE_FACES
34 #endif
35 29
36 #ifndef ORDINARY_LINK 30 #ifndef ORDINARY_LINK
37 #define ORDINARY_LINK 31 #define ORDINARY_LINK
38 #endif 32 #endif
39 33
40 #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -Int/inc -I../nt/inc -DWINDOWSNT" 34 #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -DWIN32_NATIVE"
41 #define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32" 35 #define LIBS_SYSTEM "-mno-cygwin -mwindows -lwinmm -lwsock32"
42 #define WIN32_LEAN_AND_MEAN 36 #define WIN32_LEAN_AND_MEAN
43 37
44 #define TEXT_START -1 38 #define TEXT_START -1
45 #define TEXT_END -1 39 #define TEXT_END -1
46 #define DATA_END -1 40 #define DATA_END -1
60 #define strnicmp strncasecmp 54 #define strnicmp strncasecmp
61 /* #ifndef HAVE_SOCKETS */ 55 /* #ifndef HAVE_SOCKETS */
62 #define HAVE_SOCKETS 56 #define HAVE_SOCKETS
63 /* #endif */ 57 /* #endif */
64 #define OBJECTS_SYSTEM ntplay.o nt.o ntheap.o ntproc.o dired-msw.o 58 #define OBJECTS_SYSTEM ntplay.o nt.o ntheap.o ntproc.o dired-msw.o
65 #define HAVE_NATIVE_SOUND
66 59
67 #undef MAIL_USE_SYSTEM_LOCK 60 #undef MAIL_USE_SYSTEM_LOCK
68 #define MAIL_USE_POP
69 #define HAVE_MSW_C_DIRED 61 #define HAVE_MSW_C_DIRED
70 62
71 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a 63 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
72 * group of arguments and treat it as an array of the arguments. */ 64 * group of arguments and treat it as an array of the arguments. */
73 65
76 /* System calls that are encapsulated */ 68 /* System calls that are encapsulated */
77 #define ENCAPSULATE_RENAME 69 #define ENCAPSULATE_RENAME
78 #define ENCAPSULATE_OPEN 70 #define ENCAPSULATE_OPEN
79 #define ENCAPSULATE_FOPEN 71 #define ENCAPSULATE_FOPEN
80 #define ENCAPSULATE_MKDIR 72 #define ENCAPSULATE_MKDIR
73 #define ENCAPSULATE_STAT
74 #define ENCAPSULATE_FSTAT
81 75
82 /* Data type of load average, as read out of kmem. */ 76 /* Data type of load average, as read out of kmem. */
83 77
84 #define LOAD_AVE_TYPE long 78 #define LOAD_AVE_TYPE long
85 79
132 (Which you should place, by convention, in sysdep.c). */ 126 (Which you should place, by convention, in sysdep.c). */
133 127
134 /* Define this to be the separator between devices and paths */ 128 /* Define this to be the separator between devices and paths */
135 #define DEVICE_SEP ':' 129 #define DEVICE_SEP ':'
136 130
137 #define DIRECTORY_SEP '\\' 131 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char))
138 132
139 /* The null device on Windows NT. */ 133 /* The null device on Windows NT. */
140 #define NULL_DEVICE "NUL:" 134 #define NULL_DEVICE "NUL:"
141 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" 135 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
142 /* We'll support either convention on NT. */ 136 /* We'll support either convention on NT. */
215 209
216 /* Stuff that gets set wrongly or otherwise */ 210 /* Stuff that gets set wrongly or otherwise */
217 #define HAVE_SETITIMER 211 #define HAVE_SETITIMER
218 #define HAVE_GETTIMEOFDAY 212 #define HAVE_GETTIMEOFDAY
219 #define HAVE_SELECT 213 #define HAVE_SELECT
214 /* systime.h includes winsock.h which defines timeval */
215 #define HAVE_TIMEVAL
216 #define HAVE_GETPAGESIZE
217 #define getpagesize() 4096
220 /*#define HAVE_STRUCT_UTIMBUF*/ 218 /*#define HAVE_STRUCT_UTIMBUF*/
221 #ifndef HAVE_H_ERRNO 219 #ifndef HAVE_H_ERRNO
222 #define HAVE_H_ERRNO 220 #define HAVE_H_ERRNO
223 #endif 221 #endif
224 #ifndef HAVE_TZNAME 222 #ifndef HAVE_TZNAME
231 #undef SYSV_SYSTEM_DIR 229 #undef SYSV_SYSTEM_DIR
232 #undef CLASH_DETECTION 230 #undef CLASH_DETECTION
233 231
234 /* We now have emulation for some signals */ 232 /* We now have emulation for some signals */
235 #define HAVE_SIGHOLD 233 #define HAVE_SIGHOLD
236 #define sigset(s,h) msw_sigset(s,h) 234 #define sigset(s,h) mswindows_sigset(s,h)
237 #define sighold(s) msw_sighold(s) 235 #define sighold(s) mswindows_sighold(s)
238 #define sigrelse(s) msw_sigrelse(s) 236 #define sigrelse(s) mswindows_sigrelse(s)
239 #define sigpause(s) msw_sigpause(s) 237 #define sigpause(s) mswindows_sigpause(s)
240 #define signal sigset 238 #define signal sigset
241 239
242 /* Defines that we need that aren't in the standard signal.h */ 240 /* Defines that we need that aren't in the standard signal.h */
243 #define SIGHUP 1 /* Hang up */ 241 #define SIGHUP 1 /* Hang up */
244 #define SIGQUIT 3 /* Quit process */ 242 #define SIGQUIT 3 /* Quit process */
247 #define SIGPROF 29 /* Profiling timer exp */ 245 #define SIGPROF 29 /* Profiling timer exp */
248 246
249 #ifndef MAXPATHLEN 247 #ifndef MAXPATHLEN
250 #define MAXPATHLEN _MAX_PATH 248 #define MAXPATHLEN _MAX_PATH
251 #endif 249 #endif
252 250 #endif /* !NOT_C_CODE */
253 /* For integration with MSDOS support. */
254 #define getdisk() (_getdrive () - 1)
255 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
256 #endif
257 251
258 /* Define for those source files that do not include enough NT 252 /* Define for those source files that do not include enough NT
259 system files. */ 253 system files. */
260 #ifndef NULL 254 #ifndef NULL
261 #ifdef __cplusplus 255 #ifdef __cplusplus
266 #endif 260 #endif
267 261
268 /* Define process implementation */ 262 /* Define process implementation */
269 #define HAVE_WIN32_PROCESSES 263 #define HAVE_WIN32_PROCESSES
270 264
271 /* ============================================================ */ 265 #define CORRECT_DIR_SEPS(s) \
272 266 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
267 else unixtodos_filename (s); \
268 } while (0)