Commit | Line | Data |
---|---|---|
95ed0025 | 1 | /* System description file for Windows NT. |
3360970a | 2 | Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. |
95ed0025 RS |
3 | |
4 | This file is part of GNU Emacs. | |
5 | ||
6 | GNU Emacs is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GNU Emacs is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GNU Emacs; see the file COPYING. If not, write to | |
3b7ad313 EN |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. */ | |
95ed0025 RS |
20 | |
21 | /* | |
22 | * Define symbols to identify the version of Unix this is. | |
23 | * Define all the symbols that apply correctly. | |
24 | */ | |
25 | ||
26 | /* #define UNIPLUS */ | |
27 | /* #define USG5 */ | |
28 | /* #define USG */ | |
29 | /* #define HPUX */ | |
30 | /* #define UMAX */ | |
31 | /* #define BSD4_1 */ | |
32 | /* #define BSD4_2 */ | |
33 | /* #define BSD4_3 */ | |
8e4c450d | 34 | /* #define BSD_SYSTEM */ |
95ed0025 RS |
35 | /* #define VMS */ |
36 | #ifndef WINDOWSNT | |
37 | #define WINDOWSNT | |
38 | #endif | |
39 | #ifndef DOS_NT | |
40 | #define DOS_NT /* MSDOS or WINDOWSNT */ | |
41 | #endif | |
42 | ||
3360970a KH |
43 | /* If you are compiling with a non-C calling convention but need to |
44 | declare vararg routines differently, put it here */ | |
45 | #define _VARARGS_ __cdecl | |
46 | ||
47 | /* If you are providing a function to something that will call the | |
48 | function back (like a signal handler and signal, or main) its calling | |
49 | convention must be whatever standard the libraries expect */ | |
50 | #define _CALLBACK_ __cdecl | |
51 | ||
95ed0025 RS |
52 | /* SYSTEM_TYPE should indicate the kind of system you are using. |
53 | It sets the Lisp variable system-type. */ | |
54 | ||
55 | #define SYSTEM_TYPE "windows-nt" | |
56 | #define SYMS_SYSTEM syms_of_ntterm () | |
57 | ||
58 | #define NO_MATHERR | |
95ed0025 RS |
59 | |
60 | /* NOMULTIPLEJOBS should be defined if your system's shell | |
61 | does not have "job control" (the ability to stop a program, | |
62 | run some other program, then continue the first one). */ | |
63 | ||
64 | /* #define NOMULTIPLEJOBS */ | |
65 | ||
66 | /* Emacs can read input using SIGIO and buffering characters itself, | |
67 | or using CBREAK mode and making C-g cause SIGINT. | |
68 | The choice is controlled by the variable interrupt_input. | |
69 | ||
70 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
71 | ||
72 | Emacs uses the presence or absence of the SIGIO macro to indicate | |
73 | whether or not signal-driven I/O is possible. It uses | |
74 | INTERRUPT_INPUT to decide whether to use it by default. | |
75 | ||
76 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | |
77 | CBREAK mode has two disadvantages | |
78 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | |
79 | I hear that in system V this problem does not exist. | |
80 | 2) Control-G causes output to be discarded. | |
81 | I do not know whether this can be fixed in system V. | |
82 | ||
83 | Another method of doing input is planned but not implemented. | |
84 | It would have Emacs fork off a separate process | |
85 | to read the input and send it to the true Emacs process | |
86 | through a pipe. */ | |
87 | ||
88 | #define INTERRUPT_INPUT | |
89 | ||
90 | /* Letter to use in finding device name of first pty, | |
91 | if system supports pty's. 'a' means it is /dev/ptya0 */ | |
92 | ||
93 | #define FIRST_PTY_LETTER 'a' | |
94 | ||
95 | /* | |
96 | * Define HAVE_TERMIOS if the system provides POSIX-style | |
97 | * functions and macros for terminal control. | |
98 | * | |
99 | * Define HAVE_TERMIO if the system provides sysV-style ioctls | |
100 | * for terminal control. | |
101 | * | |
102 | * Do not define both. HAVE_TERMIOS is preferred, if it is | |
103 | * supported on your system. | |
104 | */ | |
105 | ||
106 | /* #define HAVE_TERMIOS */ | |
107 | /* #define HAVE_TERMIO */ | |
108 | ||
109 | /* | |
110 | * Define HAVE_TIMEVAL if the system supports the BSD style clock values. | |
111 | * Look in <sys/time.h> for a timeval structure. | |
112 | */ | |
113 | ||
3360970a | 114 | #define HAVE_TIMEVAL |
95ed0025 RS |
115 | |
116 | /* | |
117 | * Define HAVE_SELECT if the system supports the `select' system call. | |
118 | */ | |
119 | ||
120 | /* #define HAVE_SELECT */ | |
121 | ||
122 | /* | |
123 | * Define HAVE_PTYS if the system supports pty devices. | |
124 | */ | |
125 | ||
126 | /* #define HAVE_PTYS */ | |
127 | ||
128 | /* | |
129 | * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | |
130 | * The 4.2 opendir, etc., library functions. | |
131 | */ | |
132 | ||
133 | /* #define NONSYSTEM_DIR_LIBRARY */ | |
134 | ||
4e36126c GV |
135 | /* NT supports Winsock which is close enough (with some hacks) */ |
136 | ||
137 | #define HAVE_SOCKETS | |
138 | ||
95ed0025 RS |
139 | /* Define this symbol if your system has the functions bcopy, etc. */ |
140 | ||
141 | #define BSTRING | |
142 | #define bzero(b, l) memset(b, 0, l) | |
143 | #define bcopy(s, d, l) memcpy(d, s, l) | |
144 | #define bcmp(a, b, l) memcmp(a, b, l) | |
145 | ||
146 | /* subprocesses should be defined if you want to | |
147 | have code for asynchronous subprocesses | |
148 | (as used in M-x compile and M-x shell). | |
149 | This is generally OS dependent, and not supported | |
150 | under most USG systems. */ | |
151 | ||
152 | #define subprocesses | |
153 | ||
154 | /* If your system uses COFF (Common Object File Format) then define the | |
155 | preprocessor symbol "COFF". */ | |
156 | ||
157 | #define COFF | |
158 | ||
159 | /* define MAIL_USE_FLOCK if the mailer uses flock | |
160 | to interlock access to /usr/spool/mail/$USER. | |
161 | The alternative is that a lock file named | |
162 | /usr/spool/mail/$USER.lock. */ | |
163 | ||
164 | /* #define MAIL_USE_FLOCK */ | |
4e36126c GV |
165 | #define MAIL_USE_POP |
166 | #define MAIL_USE_SYSTEM_LOCK | |
95ed0025 RS |
167 | |
168 | /* Define CLASH_DETECTION if you want lock files to be written | |
169 | so that Emacs can tell instantly when you try to modify | |
170 | a file that someone else has modified in his Emacs. */ | |
171 | ||
172 | /* #define CLASH_DETECTION */ | |
173 | ||
174 | /* Define this if your operating system declares signal handlers to | |
175 | have a type other than the usual. `The usual' is `void' for ANSI C | |
176 | systems (i.e. when the __STDC__ macro is defined), and `int' for | |
177 | pre-ANSI systems. If you're using GCC on an older system, __STDC__ | |
178 | will be defined, but the system's include files will still say that | |
179 | signal returns int or whatever; in situations like that, define | |
180 | this to be what the system's include files want. */ | |
181 | /* #define SIGTYPE int */ | |
182 | ||
183 | /* If the character used to separate elements of the executable path | |
184 | is not ':', #define this to be the appropriate character constant. */ | |
185 | #define SEPCHAR ';' | |
186 | ||
187 | /* ============================================================ */ | |
188 | ||
189 | /* Here, add any special hacks needed | |
190 | to make Emacs work on this system. For example, | |
191 | you might define certain system call names that don't | |
192 | exist on your system, or that do different things on | |
193 | your system and must be used only through an encapsulation | |
194 | (Which you should place, by convention, in sysdep.c). */ | |
195 | ||
95ed0025 | 196 | /* Define this to be the separator between path elements */ |
4e36126c | 197 | #define DIRECTORY_SEP XINT (Vdirectory_sep_char) |
95ed0025 RS |
198 | |
199 | /* Define this to be the separator between devices and paths */ | |
200 | #define DEVICE_SEP ':' | |
201 | ||
202 | /* We'll support either convention on NT. */ | |
203 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | |
204 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | |
205 | ||
206 | /* The null device on Windows NT. */ | |
207 | #define NULL_DEVICE "NUL:" | |
4e36126c | 208 | #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:" |
95ed0025 RS |
209 | |
210 | #ifndef MAXPATHLEN | |
211 | #define MAXPATHLEN _MAX_PATH | |
212 | #endif | |
213 | ||
3360970a KH |
214 | #define LISP_FLOAT_TYPE |
215 | ||
2a741506 | 216 | #undef HAVE_SYS_SELECT_H |
4e36126c GV |
217 | #define HAVE_SYS_TIMEB_H |
218 | #define HAVE_SYS_TIME_H | |
219 | #define HAVE_UNISTD_H | |
2a741506 GV |
220 | #undef HAVE_UTIME_H |
221 | #undef HAVE_LINUX_VERSION_H | |
222 | #undef HAVE_SYS_SYSTEMINFO_H | |
223 | #undef HAVE_TERMIOS_H | |
224 | #define HAVE_LIMITS_H 1 | |
225 | #define STDC_HEADERS 1 | |
4e36126c GV |
226 | #define TIME_WITH_SYS_TIME |
227 | ||
228 | #define HAVE_GETTIMEOFDAY | |
229 | #define HAVE_GETHOSTNAME | |
2a741506 | 230 | #undef HAVE_GETDOMAINNAME |
4e36126c GV |
231 | #define HAVE_DUP2 |
232 | #define HAVE_RENAME | |
233 | #define HAVE_CLOSEDIR | |
234 | ||
2a741506 GV |
235 | #undef TM_IN_SYS_TIME |
236 | #undef HAVE_TM_ZONE | |
237 | #define HAVE_TZNAME 1 | |
4e36126c GV |
238 | |
239 | #define HAVE_LONG_FILE_NAMES | |
240 | ||
241 | #define HAVE_MKDIR | |
242 | #define HAVE_RMDIR | |
243 | #define HAVE_RANDOM | |
2a741506 GV |
244 | #undef HAVE_SYSINFO |
245 | #undef HAVE_LRAND48 | |
4e36126c GV |
246 | #define HAVE_BCOPY |
247 | #define HAVE_BCMP | |
248 | #define HAVE_LOGB | |
249 | #define HAVE_FREXP | |
250 | #define HAVE_FMOD | |
2a741506 GV |
251 | #undef HAVE_RINT |
252 | #undef HAVE_CBRT | |
4e36126c | 253 | #define HAVE_FTIME |
2a741506 GV |
254 | #undef HAVE_RES_INIT /* For -lresolv on Suns. */ |
255 | #undef HAVE_SETSID | |
256 | #undef HAVE_FPATHCONF | |
257 | #undef HAVE_SELECT | |
258 | #define HAVE_MKTIME 1 | |
259 | #undef HAVE_EUIDACCESS | |
260 | #define HAVE_GETPAGESIZE | |
261 | #define HAVE_TZSET 1 | |
262 | #define HAVE_SETLOCALE | |
263 | #undef HAVE_UTIMES | |
264 | #undef HAVE_SETRLIMIT | |
265 | #undef HAVE_SETPGID | |
266 | #undef HAVE_GETCWD | |
4d8c7bc3 | 267 | /* Some systems do not have this. */ |
2a741506 GV |
268 | #define HAVE_SHUTDOWN |
269 | ||
270 | #undef LOCALTIME_CACHE | |
271 | #undef HAVE_INET_SOCKETS | |
272 | ||
273 | #undef HAVE_AIX_SMT_EXP | |
274 | ||
275 | /* Define if you have the ANSI `strerror' function. | |
276 | Otherwise you must have the variable `char *sys_errlist[]'. */ | |
277 | #define HAVE_STRERROR | |
278 | ||
279 | /* Define if `struct utimbuf' is declared by <utime.h>. */ | |
280 | #undef HAVE_STRUCT_UTIMBUF | |
4e36126c GV |
281 | |
282 | #define HAVE_MOUSE | |
283 | #define HAVE_H_ERRNO | |
1cd47f14 | 284 | |
4a1ba222 GV |
285 | #ifdef HAVE_NTGUI |
286 | #define HAVE_WINDOW_SYSTEM | |
287 | #define HAVE_FACES | |
2a741506 | 288 | #define HAVE_MENUS |
4a1ba222 GV |
289 | #endif |
290 | ||
1cd47f14 | 291 | #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
95ed0025 | 292 | |
4e36126c GV |
293 | /* get some redefinitions in place */ |
294 | ||
295 | /* IO calls that are emulated or shadowed */ | |
296 | #define access sys_access | |
297 | #define chdir sys_chdir | |
298 | #define chmod sys_chmod | |
299 | #define close sys_close | |
300 | #define creat sys_creat | |
301 | #define ctime sys_ctime | |
302 | #define dup sys_dup | |
303 | #define dup2 sys_dup2 | |
304 | #define fopen sys_fopen | |
305 | #define link sys_link | |
306 | #define mkdir sys_mkdir | |
307 | #define mktemp sys_mktemp | |
308 | #define open sys_open | |
309 | #define pipe sys_pipe | |
310 | #define read sys_read | |
311 | #define rename sys_rename | |
312 | #define rmdir sys_rmdir | |
313 | #define select sys_select | |
314 | #define sleep sys_sleep | |
315 | #define unlink sys_unlink | |
316 | #define write sys_write | |
317 | ||
318 | /* this is hacky, but is necessary to avoid warnings about macro | |
319 | redefinitions using the SDK compilers */ | |
320 | #ifndef __STDC__ | |
321 | #define __STDC__ 1 | |
322 | #define MUST_UNDEF__STDC__ | |
323 | #endif | |
324 | #include <direct.h> | |
325 | #include <io.h> | |
326 | #include <stdio.h> | |
327 | #ifdef MUST_UNDEF__STDC__ | |
328 | #undef __STDC__ | |
329 | #undef MUST_UNDEF__STDC__ | |
330 | #endif | |
331 | ||
332 | /* subprocess calls that are emulated */ | |
333 | #define spawnve sys_spawnve | |
334 | #define wait sys_wait | |
335 | #define kill sys_kill | |
336 | #define signal sys_signal | |
337 | ||
338 | /* map to MSVC names */ | |
339 | #define execlp _execlp | |
340 | #define execvp _execvp | |
341 | #define fcloseall _fcloseall | |
342 | #define fdopen _fdopen | |
343 | #define fgetchar _fgetchar | |
344 | #define fileno _fileno | |
345 | #define flushall _flushall | |
346 | #define fputchar _fputchar | |
347 | #define getw _getw | |
348 | #define getpid _getpid | |
349 | #define isatty _isatty | |
350 | #define logb _logb | |
351 | #define _longjmp longjmp | |
352 | #define lseek _lseek | |
353 | #define popen _popen | |
354 | #define pclose _pclose | |
355 | #define putw _putw | |
356 | #define umask _umask | |
357 | #define utime _utime | |
358 | #define index strchr | |
359 | #define rindex strrchr | |
95ed0025 | 360 | |
4a1ba222 | 361 | #ifdef HAVE_NTGUI |
fbd6baed | 362 | #define abort w32_abort |
4a1ba222 GV |
363 | #endif |
364 | ||
95ed0025 RS |
365 | /* Defines that we need that aren't in the standard signal.h */ |
366 | #define SIGHUP 1 /* Hang up */ | |
367 | #define SIGQUIT 3 /* Quit process */ | |
368 | #define SIGTRAP 5 /* Trace trap */ | |
369 | #define SIGKILL 9 /* Die, die die */ | |
370 | #define SIGPIPE 13 /* Write on pipe with no readers */ | |
371 | #define SIGALRM 14 /* Alarm */ | |
372 | #define SIGCHLD 18 /* Death of child */ | |
373 | ||
374 | /* For integration with MSDOS support. */ | |
375 | #define getdisk() (_getdrive () - 1) | |
376 | #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) | |
377 | ||
3360970a KH |
378 | #define EMACS_CONFIGURATION get_emacs_configuration () |
379 | #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */ | |
380 | ||
4e36126c GV |
381 | /* Define this so that winsock.h definitions don't get included with |
382 | windows.h. For this to have proper effect, config.h must always be | |
383 | included before windows.h. */ | |
95ed0025 RS |
384 | #define _WINSOCKAPI_ 1 |
385 | ||
1cd47f14 KH |
386 | /* Defines size_t and alloca (). */ |
387 | #include <malloc.h> | |
388 | ||
3360970a | 389 | #include <sys/stat.h> |
3360970a KH |
390 | |
391 | /* Define for those source files that do not include enough NT | |
392 | system files. */ | |
393 | #ifndef NULL | |
394 | #ifdef __cplusplus | |
395 | #define NULL 0 | |
396 | #else | |
397 | #define NULL ((void *)0) | |
398 | #endif | |
399 | #endif | |
896c0d8b | 400 | |
4a1ba222 GV |
401 | /* For proper declaration of environ. */ |
402 | #include <stdlib.h> | |
4e36126c | 403 | #include <string.h> |
4a1ba222 GV |
404 | |
405 | /* Emacs takes care of ensuring that these are defined. */ | |
406 | #ifdef max | |
407 | #undef max | |
408 | #undef min | |
409 | #endif | |
410 | ||
e3be3bfd | 411 | /* We need a little extra space, see ../../lisp/loadup.el */ |
2a741506 | 412 | #define SYSTEM_PURESIZE_EXTRA 25000 |
e3be3bfd | 413 | |
3360970a | 414 | /* ============================================================ */ |