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 */ | |
34 | /* #define BSD */ | |
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 | |
59 | #define HAVE_FREXP | |
60 | #define HAVE_FMOD | |
61 | ||
62 | /* NOMULTIPLEJOBS should be defined if your system's shell | |
63 | does not have "job control" (the ability to stop a program, | |
64 | run some other program, then continue the first one). */ | |
65 | ||
66 | /* #define NOMULTIPLEJOBS */ | |
67 | ||
68 | /* Emacs can read input using SIGIO and buffering characters itself, | |
69 | or using CBREAK mode and making C-g cause SIGINT. | |
70 | The choice is controlled by the variable interrupt_input. | |
71 | ||
72 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
73 | ||
74 | Emacs uses the presence or absence of the SIGIO macro to indicate | |
75 | whether or not signal-driven I/O is possible. It uses | |
76 | INTERRUPT_INPUT to decide whether to use it by default. | |
77 | ||
78 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | |
79 | CBREAK mode has two disadvantages | |
80 | 1) At least in 4.2, it is impossible to handle the Meta key properly. | |
81 | I hear that in system V this problem does not exist. | |
82 | 2) Control-G causes output to be discarded. | |
83 | I do not know whether this can be fixed in system V. | |
84 | ||
85 | Another method of doing input is planned but not implemented. | |
86 | It would have Emacs fork off a separate process | |
87 | to read the input and send it to the true Emacs process | |
88 | through a pipe. */ | |
89 | ||
90 | #define INTERRUPT_INPUT | |
91 | ||
92 | /* Letter to use in finding device name of first pty, | |
93 | if system supports pty's. 'a' means it is /dev/ptya0 */ | |
94 | ||
95 | #define FIRST_PTY_LETTER 'a' | |
96 | ||
97 | /* | |
98 | * Define HAVE_TERMIOS if the system provides POSIX-style | |
99 | * functions and macros for terminal control. | |
100 | * | |
101 | * Define HAVE_TERMIO if the system provides sysV-style ioctls | |
102 | * for terminal control. | |
103 | * | |
104 | * Do not define both. HAVE_TERMIOS is preferred, if it is | |
105 | * supported on your system. | |
106 | */ | |
107 | ||
108 | /* #define HAVE_TERMIOS */ | |
109 | /* #define HAVE_TERMIO */ | |
110 | ||
111 | /* | |
112 | * Define HAVE_TIMEVAL if the system supports the BSD style clock values. | |
113 | * Look in <sys/time.h> for a timeval structure. | |
114 | */ | |
115 | ||
3360970a KH |
116 | #define HAVE_TIMEVAL |
117 | struct timeval | |
118 | { | |
119 | long tv_sec; /* seconds */ | |
120 | long tv_usec; /* microseconds */ | |
121 | }; | |
122 | struct timezone | |
123 | { | |
124 | int tz_minuteswest; /* minutes west of Greenwich */ | |
125 | int tz_dsttime; /* type of dst correction */ | |
126 | }; | |
127 | ||
128 | void gettimeofday (struct timeval *, struct timezone *); | |
129 | ||
95ed0025 RS |
130 | |
131 | /* | |
132 | * Define HAVE_SELECT if the system supports the `select' system call. | |
133 | */ | |
134 | ||
135 | /* #define HAVE_SELECT */ | |
136 | ||
137 | /* | |
138 | * Define HAVE_PTYS if the system supports pty devices. | |
139 | */ | |
140 | ||
141 | /* #define HAVE_PTYS */ | |
142 | ||
143 | /* | |
144 | * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | |
145 | * The 4.2 opendir, etc., library functions. | |
146 | */ | |
147 | ||
148 | /* #define NONSYSTEM_DIR_LIBRARY */ | |
149 | ||
150 | /* Define this symbol if your system has the functions bcopy, etc. */ | |
151 | ||
152 | #define BSTRING | |
153 | #define bzero(b, l) memset(b, 0, l) | |
154 | #define bcopy(s, d, l) memcpy(d, s, l) | |
155 | #define bcmp(a, b, l) memcmp(a, b, l) | |
156 | ||
157 | /* subprocesses should be defined if you want to | |
158 | have code for asynchronous subprocesses | |
159 | (as used in M-x compile and M-x shell). | |
160 | This is generally OS dependent, and not supported | |
161 | under most USG systems. */ | |
162 | ||
163 | #define subprocesses | |
164 | ||
165 | /* If your system uses COFF (Common Object File Format) then define the | |
166 | preprocessor symbol "COFF". */ | |
167 | ||
168 | #define COFF | |
169 | ||
170 | /* define MAIL_USE_FLOCK if the mailer uses flock | |
171 | to interlock access to /usr/spool/mail/$USER. | |
172 | The alternative is that a lock file named | |
173 | /usr/spool/mail/$USER.lock. */ | |
174 | ||
175 | /* #define MAIL_USE_FLOCK */ | |
176 | ||
177 | /* Define CLASH_DETECTION if you want lock files to be written | |
178 | so that Emacs can tell instantly when you try to modify | |
179 | a file that someone else has modified in his Emacs. */ | |
180 | ||
181 | /* #define CLASH_DETECTION */ | |
182 | ||
183 | /* Define this if your operating system declares signal handlers to | |
184 | have a type other than the usual. `The usual' is `void' for ANSI C | |
185 | systems (i.e. when the __STDC__ macro is defined), and `int' for | |
186 | pre-ANSI systems. If you're using GCC on an older system, __STDC__ | |
187 | will be defined, but the system's include files will still say that | |
188 | signal returns int or whatever; in situations like that, define | |
189 | this to be what the system's include files want. */ | |
190 | /* #define SIGTYPE int */ | |
191 | ||
192 | /* If the character used to separate elements of the executable path | |
193 | is not ':', #define this to be the appropriate character constant. */ | |
194 | #define SEPCHAR ';' | |
195 | ||
196 | /* ============================================================ */ | |
197 | ||
198 | /* Here, add any special hacks needed | |
199 | to make Emacs work on this system. For example, | |
200 | you might define certain system call names that don't | |
201 | exist on your system, or that do different things on | |
202 | your system and must be used only through an encapsulation | |
203 | (Which you should place, by convention, in sysdep.c). */ | |
204 | ||
95ed0025 RS |
205 | /* Define this to be the separator between path elements */ |
206 | #define DIRECTORY_SEP '\\' | |
207 | ||
208 | /* Define this to be the separator between devices and paths */ | |
209 | #define DEVICE_SEP ':' | |
210 | ||
211 | /* We'll support either convention on NT. */ | |
212 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | |
213 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | |
214 | ||
215 | /* The null device on Windows NT. */ | |
216 | #define NULL_DEVICE "NUL:" | |
217 | #define EXEC_SUFFIXES ".exe:.com:.bat:" | |
218 | ||
219 | #ifndef MAXPATHLEN | |
220 | #define MAXPATHLEN _MAX_PATH | |
221 | #endif | |
222 | ||
3360970a KH |
223 | #define LISP_FLOAT_TYPE |
224 | ||
225 | #define HAVE_DUP2 1 | |
226 | #define HAVE_RENAME 1 | |
227 | #define HAVE_RMDIR 1 | |
228 | #define HAVE_MKDIR 1 | |
95ed0025 | 229 | #define HAVE_GETHOSTNAME 1 |
3360970a KH |
230 | #define HAVE_RANDOM 1 |
231 | #define USE_UTIME 1 | |
232 | #define HAVE_MOUSE 1 | |
233 | #define HAVE_TZNAME 1 | |
1cd47f14 | 234 | |
4a1ba222 GV |
235 | #ifdef HAVE_NTGUI |
236 | #define HAVE_WINDOW_SYSTEM | |
237 | #define HAVE_FACES | |
238 | #endif | |
239 | ||
1cd47f14 | 240 | #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
95ed0025 RS |
241 | |
242 | /* These have to be defined because our compilers treat __STDC__ as being | |
243 | defined (most of them anyway). */ | |
244 | ||
245 | #define access _access | |
246 | #define chdir _chdir | |
247 | #define chmod _chmod | |
248 | #define close _close | |
249 | #define creat _creat | |
250 | #define dup _dup | |
251 | #define dup2 _dup2 | |
252 | #define execlp _execlp | |
253 | #define execvp _execvp | |
254 | #define getpid _getpid | |
255 | #define index strchr | |
256 | #define isatty _isatty | |
257 | #define link _link | |
258 | #define lseek _lseek | |
259 | #define mkdir _mkdir | |
260 | #define mktemp _mktemp | |
261 | #define open _open | |
262 | #define pipe _pipe | |
95ed0025 RS |
263 | #define read _read |
264 | #define rmdir _rmdir | |
265 | #define sleep nt_sleep | |
95ed0025 RS |
266 | #define unlink _unlink |
267 | #define umask _umask | |
3360970a | 268 | #define utime _utime |
95ed0025 RS |
269 | #define write _write |
270 | #define _longjmp longjmp | |
271 | #define spawnve win32_spawnve | |
272 | #define wait win32_wait | |
273 | #define signal win32_signal | |
274 | #define rindex strrchr | |
3360970a | 275 | #define ctime nt_ctime /* Place a wrapper around ctime (see nt.c). */ |
95ed0025 | 276 | |
4a1ba222 GV |
277 | #ifdef HAVE_NTGUI |
278 | #define abort win32_abort | |
279 | #endif | |
280 | ||
95ed0025 RS |
281 | /* Defines that we need that aren't in the standard signal.h */ |
282 | #define SIGHUP 1 /* Hang up */ | |
283 | #define SIGQUIT 3 /* Quit process */ | |
284 | #define SIGTRAP 5 /* Trace trap */ | |
285 | #define SIGKILL 9 /* Die, die die */ | |
286 | #define SIGPIPE 13 /* Write on pipe with no readers */ | |
287 | #define SIGALRM 14 /* Alarm */ | |
288 | #define SIGCHLD 18 /* Death of child */ | |
289 | ||
290 | /* For integration with MSDOS support. */ | |
291 | #define getdisk() (_getdrive () - 1) | |
292 | #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) | |
293 | ||
3360970a KH |
294 | #define EMACS_CONFIGURATION get_emacs_configuration () |
295 | #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */ | |
296 | ||
95ed0025 RS |
297 | /* Define this so that winsock.h definitions don't get included when windows.h |
298 | is... I don't know if they do the right thing for emacs. For this to | |
299 | have proper effect, config.h must always be included before windows.h. */ | |
300 | #define _WINSOCKAPI_ 1 | |
301 | ||
1cd47f14 KH |
302 | /* Defines size_t and alloca (). */ |
303 | #include <malloc.h> | |
304 | ||
3360970a KH |
305 | /* We have to handle stat specially. However, #defining stat to |
306 | something else not only redefines uses of the function, but also | |
307 | redefines uses of the type struct stat. What unfortunate parallel | |
308 | naming. */ | |
309 | #include <sys/stat.h> | |
310 | struct nt_stat | |
311 | { | |
312 | struct _stat statbuf; | |
313 | }; | |
314 | ||
315 | #ifdef stat | |
316 | #undef stat | |
317 | #endif | |
318 | #define stat nt_stat | |
319 | #define st_dev statbuf.st_dev | |
320 | #define st_ino statbuf.st_ino | |
321 | #define st_mode statbuf.st_mode | |
322 | #define st_nlink statbuf.st_nlink | |
323 | #define st_uid statbuf.st_uid | |
324 | #define st_gid statbuf.st_gid | |
325 | #define st_rdev statbuf.st_rdev | |
326 | #define st_size statbuf.st_size | |
327 | #define st_atime statbuf.st_atime | |
328 | #define st_mtime statbuf.st_mtime | |
329 | #define st_ctime statbuf.st_ctime | |
330 | ||
331 | /* Define for those source files that do not include enough NT | |
332 | system files. */ | |
333 | #ifndef NULL | |
334 | #ifdef __cplusplus | |
335 | #define NULL 0 | |
336 | #else | |
337 | #define NULL ((void *)0) | |
338 | #endif | |
339 | #endif | |
896c0d8b | 340 | |
4a1ba222 GV |
341 | /* For proper declaration of environ. */ |
342 | #include <stdlib.h> | |
343 | ||
344 | /* Emacs takes care of ensuring that these are defined. */ | |
345 | #ifdef max | |
346 | #undef max | |
347 | #undef min | |
348 | #endif | |
349 | ||
3360970a | 350 | /* ============================================================ */ |