1 /* System description file for Windows NT.
2 Copyright (C) 1993, 1994, 1995 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 /* If you are compiling with a non-C calling convention but need to
43 declare vararg routines differently, put it here */
44 #define _VARARGS_ __cdecl
46 /* If you are providing a function to something that will call the
47 function back (like a signal handler and signal, or main) its calling
48 convention must be whatever standard the libraries expect */
49 #define _CALLBACK_ __cdecl
51 /* SYSTEM_TYPE should indicate the kind of system you are using.
52 It sets the Lisp variable system-type. */
54 #define SYSTEM_TYPE "windows-nt"
55 #define SYMS_SYSTEM syms_of_ntterm ()
61 /* NOMULTIPLEJOBS should be defined if your system's shell
62 does not have "job control" (the ability to stop a program,
63 run some other program, then continue the first one). */
65 /* #define NOMULTIPLEJOBS */
67 /* Emacs can read input using SIGIO and buffering characters itself,
68 or using CBREAK mode and making C-g cause SIGINT.
69 The choice is controlled by the variable interrupt_input.
71 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
73 Emacs uses the presence or absence of the SIGIO macro to indicate
74 whether or not signal-driven I/O is possible. It uses
75 INTERRUPT_INPUT to decide whether to use it by default.
77 SIGIO can be used only on systems that implement it (4.2 and 4.3).
78 CBREAK mode has two disadvantages
79 1) At least in 4.2, it is impossible to handle the Meta key properly.
80 I hear that in system V this problem does not exist.
81 2) Control-G causes output to be discarded.
82 I do not know whether this can be fixed in system V.
84 Another method of doing input is planned but not implemented.
85 It would have Emacs fork off a separate process
86 to read the input and send it to the true Emacs process
89 #define INTERRUPT_INPUT
91 /* Letter to use in finding device name of first pty,
92 if system supports pty's. 'a' means it is /dev/ptya0 */
94 #define FIRST_PTY_LETTER 'a'
97 * Define HAVE_TERMIOS if the system provides POSIX-style
98 * functions and macros for terminal control.
100 * Define HAVE_TERMIO if the system provides sysV-style ioctls
101 * for terminal control.
103 * Do not define both. HAVE_TERMIOS is preferred, if it is
104 * supported on your system.
107 /* #define HAVE_TERMIOS */
108 /* #define HAVE_TERMIO */
111 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
112 * Look in <sys/time.h> for a timeval structure.
118 long tv_sec
; /* seconds */
119 long tv_usec
; /* microseconds */
123 int tz_minuteswest
; /* minutes west of Greenwich */
124 int tz_dsttime
; /* type of dst correction */
127 void gettimeofday (struct timeval
*, struct timezone
*);
131 * Define HAVE_SELECT if the system supports the `select' system call.
134 /* #define HAVE_SELECT */
137 * Define HAVE_PTYS if the system supports pty devices.
140 /* #define HAVE_PTYS */
143 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
144 * The 4.2 opendir, etc., library functions.
147 /* #define NONSYSTEM_DIR_LIBRARY */
149 /* Define this symbol if your system has the functions bcopy, etc. */
152 #define bzero(b, l) memset(b, 0, l)
153 #define bcopy(s, d, l) memcpy(d, s, l)
154 #define bcmp(a, b, l) memcmp(a, b, l)
156 /* subprocesses should be defined if you want to
157 have code for asynchronous subprocesses
158 (as used in M-x compile and M-x shell).
159 This is generally OS dependent, and not supported
160 under most USG systems. */
164 /* If your system uses COFF (Common Object File Format) then define the
165 preprocessor symbol "COFF". */
169 /* define MAIL_USE_FLOCK if the mailer uses flock
170 to interlock access to /usr/spool/mail/$USER.
171 The alternative is that a lock file named
172 /usr/spool/mail/$USER.lock. */
174 /* #define MAIL_USE_FLOCK */
176 /* Define CLASH_DETECTION if you want lock files to be written
177 so that Emacs can tell instantly when you try to modify
178 a file that someone else has modified in his Emacs. */
180 /* #define CLASH_DETECTION */
182 /* Define this if your operating system declares signal handlers to
183 have a type other than the usual. `The usual' is `void' for ANSI C
184 systems (i.e. when the __STDC__ macro is defined), and `int' for
185 pre-ANSI systems. If you're using GCC on an older system, __STDC__
186 will be defined, but the system's include files will still say that
187 signal returns int or whatever; in situations like that, define
188 this to be what the system's include files want. */
189 /* #define SIGTYPE int */
191 /* If the character used to separate elements of the executable path
192 is not ':', #define this to be the appropriate character constant. */
195 /* ============================================================ */
197 /* Here, add any special hacks needed
198 to make Emacs work on this system. For example,
199 you might define certain system call names that don't
200 exist on your system, or that do different things on
201 your system and must be used only through an encapsulation
202 (Which you should place, by convention, in sysdep.c). */
204 /* Define this to be the separator between path elements */
205 #define DIRECTORY_SEP '\\'
207 /* Define this to be the separator between devices and paths */
208 #define DEVICE_SEP ':'
210 /* We'll support either convention on NT. */
211 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
212 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
214 /* The null device on Windows NT. */
215 #define NULL_DEVICE "NUL:"
216 #define EXEC_SUFFIXES ".exe:.com:.bat:"
219 #define MAXPATHLEN _MAX_PATH
222 #define LISP_FLOAT_TYPE
225 #define HAVE_RENAME 1
228 #define HAVE_GETHOSTNAME 1
229 #define HAVE_RANDOM 1
232 #define HAVE_TZNAME 1
234 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
236 /* These have to be defined because our compilers treat __STDC__ as being
237 defined (most of them anyway). */
239 #define access _access
246 #define execlp _execlp
247 #define execvp _execvp
248 #define getpid _getpid
250 #define isatty _isatty
254 #define mktemp _mktemp
259 #define sleep nt_sleep
260 #define unlink _unlink
264 #define _longjmp longjmp
265 #define spawnve win32_spawnve
266 #define wait win32_wait
267 #define signal win32_signal
268 #define rindex strrchr
269 #define ctime nt_ctime /* Place a wrapper around ctime (see nt.c). */
271 /* Defines that we need that aren't in the standard signal.h */
272 #define SIGHUP 1 /* Hang up */
273 #define SIGQUIT 3 /* Quit process */
274 #define SIGTRAP 5 /* Trace trap */
275 #define SIGKILL 9 /* Die, die die */
276 #define SIGPIPE 13 /* Write on pipe with no readers */
277 #define SIGALRM 14 /* Alarm */
278 #define SIGCHLD 18 /* Death of child */
280 /* For integration with MSDOS support. */
281 #define getdisk() (_getdrive () - 1)
282 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
284 #define EMACS_CONFIGURATION get_emacs_configuration ()
285 #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */
287 /* Define this so that winsock.h definitions don't get included when windows.h
288 is... I don't know if they do the right thing for emacs. For this to
289 have proper effect, config.h must always be included before windows.h. */
290 #define _WINSOCKAPI_ 1
292 /* Defines size_t and alloca (). */
295 /* We have to handle stat specially. However, #defining stat to
296 something else not only redefines uses of the function, but also
297 redefines uses of the type struct stat. What unfortunate parallel
299 #include <sys/stat.h>
302 struct _stat statbuf
;
309 #define st_dev statbuf.st_dev
310 #define st_ino statbuf.st_ino
311 #define st_mode statbuf.st_mode
312 #define st_nlink statbuf.st_nlink
313 #define st_uid statbuf.st_uid
314 #define st_gid statbuf.st_gid
315 #define st_rdev statbuf.st_rdev
316 #define st_size statbuf.st_size
317 #define st_atime statbuf.st_atime
318 #define st_mtime statbuf.st_mtime
319 #define st_ctime statbuf.st_ctime
321 /* Define for those source files that do not include enough NT
327 #define NULL ((void *)0)
331 /* ============================================================ */