1 /* System description file for Windows NT.
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
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)
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.
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
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 * Define symbols to identify the version of Unix this is.
22 * Define all the symbols that apply correctly.
39 #define DOS_NT /* MSDOS or WINDOWSNT */
42 /* SYSTEM_TYPE should indicate the kind of system you are using.
43 It sets the Lisp variable system-type. */
45 #define SYSTEM_TYPE "windows-nt"
46 #define SYMS_SYSTEM syms_of_ntterm ()
52 /* NOMULTIPLEJOBS should be defined if your system's shell
53 does not have "job control" (the ability to stop a program,
54 run some other program, then continue the first one). */
56 /* #define NOMULTIPLEJOBS */
58 /* Emacs can read input using SIGIO and buffering characters itself,
59 or using CBREAK mode and making C-g cause SIGINT.
60 The choice is controlled by the variable interrupt_input.
62 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
64 Emacs uses the presence or absence of the SIGIO macro to indicate
65 whether or not signal-driven I/O is possible. It uses
66 INTERRUPT_INPUT to decide whether to use it by default.
68 SIGIO can be used only on systems that implement it (4.2 and 4.3).
69 CBREAK mode has two disadvantages
70 1) At least in 4.2, it is impossible to handle the Meta key properly.
71 I hear that in system V this problem does not exist.
72 2) Control-G causes output to be discarded.
73 I do not know whether this can be fixed in system V.
75 Another method of doing input is planned but not implemented.
76 It would have Emacs fork off a separate process
77 to read the input and send it to the true Emacs process
80 #define INTERRUPT_INPUT
82 /* Letter to use in finding device name of first pty,
83 if system supports pty's. 'a' means it is /dev/ptya0 */
85 #define FIRST_PTY_LETTER 'a'
88 * Define HAVE_TERMIOS if the system provides POSIX-style
89 * functions and macros for terminal control.
91 * Define HAVE_TERMIO if the system provides sysV-style ioctls
92 * for terminal control.
94 * Do not define both. HAVE_TERMIOS is preferred, if it is
95 * supported on your system.
98 /* #define HAVE_TERMIOS */
99 /* #define HAVE_TERMIO */
102 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
103 * Look in <sys/time.h> for a timeval structure.
106 /* #define HAVE_TIMEVAL */
109 * Define HAVE_SELECT if the system supports the `select' system call.
112 /* #define HAVE_SELECT */
115 * Define HAVE_PTYS if the system supports pty devices.
118 /* #define HAVE_PTYS */
121 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
122 * The 4.2 opendir, etc., library functions.
125 /* #define NONSYSTEM_DIR_LIBRARY */
127 /* Define this symbol if your system has the functions bcopy, etc. */
130 #define bzero(b, l) memset(b, 0, l)
131 #define bcopy(s, d, l) memcpy(d, s, l)
132 #define bcmp(a, b, l) memcmp(a, b, l)
134 /* subprocesses should be defined if you want to
135 have code for asynchronous subprocesses
136 (as used in M-x compile and M-x shell).
137 This is generally OS dependent, and not supported
138 under most USG systems. */
142 /* If your system uses COFF (Common Object File Format) then define the
143 preprocessor symbol "COFF". */
147 /* define MAIL_USE_FLOCK if the mailer uses flock
148 to interlock access to /usr/spool/mail/$USER.
149 The alternative is that a lock file named
150 /usr/spool/mail/$USER.lock. */
152 /* #define MAIL_USE_FLOCK */
154 /* Define CLASH_DETECTION if you want lock files to be written
155 so that Emacs can tell instantly when you try to modify
156 a file that someone else has modified in his Emacs. */
158 /* #define CLASH_DETECTION */
160 /* Define this if your operating system declares signal handlers to
161 have a type other than the usual. `The usual' is `void' for ANSI C
162 systems (i.e. when the __STDC__ macro is defined), and `int' for
163 pre-ANSI systems. If you're using GCC on an older system, __STDC__
164 will be defined, but the system's include files will still say that
165 signal returns int or whatever; in situations like that, define
166 this to be what the system's include files want. */
167 /* #define SIGTYPE int */
169 /* If the character used to separate elements of the executable path
170 is not ':', #define this to be the appropriate character constant. */
173 /* ============================================================ */
175 /* Here, add any special hacks needed
176 to make Emacs work on this system. For example,
177 you might define certain system call names that don't
178 exist on your system, or that do different things on
179 your system and must be used only through an encapsulation
180 (Which you should place, by convention, in sysdep.c). */
182 /* Define this to be the separator between path elements */
183 #define DIRECTORY_SEP '\\'
185 /* Define this to be the separator between devices and paths */
186 #define DEVICE_SEP ':'
188 /* We'll support either convention on NT. */
189 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
190 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
192 /* The null device on Windows NT. */
193 #define NULL_DEVICE "NUL:"
194 #define EXEC_SUFFIXES ".exe:.com:.bat:"
197 #define MAXPATHLEN _MAX_PATH
201 #define HAVE_RENAME 1
204 #define HAVE_GETHOSTNAME 1
207 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
209 /* These have to be defined because our compilers treat __STDC__ as being
210 defined (most of them anyway). */
212 #define access _access
219 #define execlp _execlp
220 #define execvp _execvp
221 #define getpid _getpid
223 #define isatty _isatty
227 #define mktemp _mktemp
233 #define sleep nt_sleep
234 #define srandom srand
235 #define unlink _unlink
238 #define _longjmp longjmp
239 #define spawnve win32_spawnve
240 #define wait win32_wait
241 #define signal win32_signal
242 #define rindex strrchr
244 /* Defines that we need that aren't in the standard signal.h */
245 #define SIGHUP 1 /* Hang up */
246 #define SIGQUIT 3 /* Quit process */
247 #define SIGTRAP 5 /* Trace trap */
248 #define SIGKILL 9 /* Die, die die */
249 #define SIGPIPE 13 /* Write on pipe with no readers */
250 #define SIGALRM 14 /* Alarm */
251 #define SIGCHLD 18 /* Death of child */
253 /* For integration with MSDOS support. */
254 #define getdisk() (_getdrive () - 1)
255 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
257 /* Define this so that winsock.h definitions don't get included when windows.h
258 is... I don't know if they do the right thing for emacs. For this to
259 have proper effect, config.h must always be included before windows.h. */
260 #define _WINSOCKAPI_ 1
262 /* Defines size_t and alloca (). */
265 /* ============================================================ */
267 /* Give us extra pure storage. */
269 #define SYSTEM_PURESIZE_EXTRA 52000