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, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
22 * Define symbols to identify the version of Unix this is.
23 * Define all the symbols that apply correctly.
40 #define DOS_NT /* MSDOS or WINDOWSNT */
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
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
52 /* SYSTEM_TYPE should indicate the kind of system you are using.
53 It sets the Lisp variable system-type. */
55 #define SYSTEM_TYPE "windows-nt"
56 #define SYMS_SYSTEM syms_of_ntterm ()
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). */
66 /* #define NOMULTIPLEJOBS */
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.
72 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO)
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.
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.
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
90 #define INTERRUPT_INPUT
92 /* Letter to use in finding device name of first pty,
93 if system supports pty's. 'a' means it is /dev/ptya0 */
95 #define FIRST_PTY_LETTER 'a'
98 * Define HAVE_TERMIOS if the system provides POSIX-style
99 * functions and macros for terminal control.
101 * Define HAVE_TERMIO if the system provides sysV-style ioctls
102 * for terminal control.
104 * Do not define both. HAVE_TERMIOS is preferred, if it is
105 * supported on your system.
108 /* #define HAVE_TERMIOS */
109 /* #define HAVE_TERMIO */
112 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
113 * Look in <sys/time.h> for a timeval structure.
119 long tv_sec
; /* seconds */
120 long tv_usec
; /* microseconds */
124 int tz_minuteswest
; /* minutes west of Greenwich */
125 int tz_dsttime
; /* type of dst correction */
128 void gettimeofday (struct timeval
*, struct timezone
*);
132 * Define HAVE_SELECT if the system supports the `select' system call.
135 /* #define HAVE_SELECT */
138 * Define HAVE_PTYS if the system supports pty devices.
141 /* #define HAVE_PTYS */
144 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate
145 * The 4.2 opendir, etc., library functions.
148 /* #define NONSYSTEM_DIR_LIBRARY */
150 /* Define this symbol if your system has the functions bcopy, etc. */
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)
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. */
165 /* If your system uses COFF (Common Object File Format) then define the
166 preprocessor symbol "COFF". */
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. */
175 /* #define MAIL_USE_FLOCK */
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. */
181 /* #define CLASH_DETECTION */
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 */
192 /* If the character used to separate elements of the executable path
193 is not ':', #define this to be the appropriate character constant. */
196 /* ============================================================ */
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). */
205 /* Define this to be the separator between path elements */
206 #define DIRECTORY_SEP '\\'
208 /* Define this to be the separator between devices and paths */
209 #define DEVICE_SEP ':'
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_))
215 /* The null device on Windows NT. */
216 #define NULL_DEVICE "NUL:"
217 #define EXEC_SUFFIXES ".exe:.com:.bat:"
220 #define MAXPATHLEN _MAX_PATH
223 #define LISP_FLOAT_TYPE
226 #define HAVE_RENAME 1
229 #define HAVE_GETHOSTNAME 1
230 #define HAVE_RANDOM 1
233 #define HAVE_TZNAME 1
236 #define HAVE_WINDOW_SYSTEM
240 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
242 /* These have to be defined because our compilers treat __STDC__ as being
243 defined (most of them anyway). */
245 #define access _access
252 #define execlp _execlp
253 #define execvp _execvp
254 #define getpid _getpid
256 #define isatty _isatty
260 #define mktemp _mktemp
265 #define sleep nt_sleep
266 #define unlink _unlink
270 #define _longjmp longjmp
271 #define spawnve win32_spawnve
272 #define wait win32_wait
273 #define signal win32_signal
274 #define rindex strrchr
275 #define ctime nt_ctime /* Place a wrapper around ctime (see nt.c). */
278 #define abort win32_abort
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 */
290 /* For integration with MSDOS support. */
291 #define getdisk() (_getdrive () - 1)
292 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
294 #define EMACS_CONFIGURATION get_emacs_configuration ()
295 #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */
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
302 /* Defines size_t and alloca (). */
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
309 #include <sys/stat.h>
312 struct _stat statbuf
;
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
331 /* Define for those source files that do not include enough NT
337 #define NULL ((void *)0)
341 /* For proper declaration of environ. */
344 /* Emacs takes care of ensuring that these are defined. */
350 /* ============================================================ */