100
|
1 /* System description file for Windows NT.
|
|
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
|
|
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 XEmacs; 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. */
|
|
20
|
|
21 /* Synched up with: FSF 19.31. */
|
|
22
|
|
23 /*
|
|
24 * Define symbols to identify the version of Unix this is.
|
|
25 * Define all the symbols that apply correctly.
|
|
26 */
|
|
27
|
|
28 /* #define UNIPLUS */
|
|
29 /* #define USG5 */
|
|
30 /* #define USG */
|
|
31 /* #define HPUX */
|
|
32 /* #define UMAX */
|
|
33 /* #define BSD4_1 */
|
|
34 /* #define BSD4_2 */
|
|
35 /* #define BSD4_3 */
|
|
36 /* #define BSD */
|
|
37 /* #define VMS */
|
|
38 #ifndef WINDOWSNT
|
|
39 #define WINDOWSNT
|
|
40 #endif
|
|
41 #ifndef DOS_NT
|
|
42 #define DOS_NT /* MSDOS or WINDOWSNT */
|
|
43 #endif
|
|
44
|
|
45 /* If you are compiling with a non-C calling convention but need to
|
|
46 declare vararg routines differently, put it here */
|
|
47 #define _VARARGS_ __cdecl
|
|
48
|
|
49 /* If you are providing a function to something that will call the
|
|
50 function back (like a signal handler and signal, or main) its calling
|
|
51 convention must be whatever standard the libraries expect */
|
|
52 #define _CALLBACK_ __cdecl
|
|
53
|
|
54 /* SYSTEM_TYPE should indicate the kind of system you are using.
|
|
55 It sets the Lisp variable system-type. */
|
|
56
|
|
57 #define SYSTEM_TYPE "windows-nt"
|
|
58
|
|
59 #define NO_MATHERR
|
|
60
|
|
61 #define SIZEOF_LONG 4
|
|
62 #define SIZEOF_INT 4
|
|
63 #define SIZEOF_SHORT 4
|
|
64
|
|
65 /* NOMULTIPLEJOBS should be defined if your system's shell
|
|
66 does not have "job control" (the ability to stop a program,
|
|
67 run some other program, then continue the first one). */
|
|
68
|
|
69 /* #define NOMULTIPLEJOBS */
|
|
70
|
|
71 /* Letter to use in finding device name of first pty,
|
|
72 if system supports pty's. 'a' means it is /dev/ptya0 */
|
|
73
|
|
74 #define FIRST_PTY_LETTER 'a'
|
|
75
|
|
76 /*
|
|
77 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
|
|
78 * Look in <sys/time.h> for a timeval structure.
|
|
79 */
|
|
80
|
|
81 #define HAVE_TIMEVAL
|
|
82
|
|
83 /*
|
|
84 * Define HAVE_SELECT if the system supports the `select' system call.
|
|
85 */
|
|
86
|
|
87 /* #define HAVE_SELECT */
|
|
88
|
|
89 /*
|
|
90 * Define HAVE_PTYS if the system supports pty devices.
|
|
91 */
|
|
92
|
|
93 /* #define HAVE_PTYS */
|
|
94
|
|
95 /* If your system uses COFF (Common Object File Format) then define the
|
|
96 preprocessor symbol "COFF". */
|
|
97
|
|
98 #define COFF
|
|
99
|
|
100 /* NT supports Winsock which is close enough (with some hacks) */
|
|
101
|
|
102 #define HAVE_SOCKETS
|
|
103
|
|
104 /* define MAIL_USE_FLOCK if the mailer uses flock
|
|
105 to interlock access to /usr/spool/mail/$USER.
|
|
106 The alternative is that a lock file named
|
|
107 /usr/spool/mail/$USER.lock. */
|
|
108
|
|
109 /* #define MAIL_USE_FLOCK */
|
|
110 #define MAIL_USE_POP
|
|
111 #define MAIL_USE_SYSTEM_LOCK
|
|
112
|
|
113 /* If the character used to separate elements of the executable path
|
|
114 is not ':', #define this to be the appropriate character constant. */
|
|
115 #define SEPCHAR ';'
|
|
116
|
|
117 /* ============================================================ */
|
|
118
|
|
119 /* Here, add any special hacks needed
|
|
120 to make Emacs work on this system. For example,
|
|
121 you might define certain system call names that don't
|
|
122 exist on your system, or that do different things on
|
|
123 your system and must be used only through an encapsulation
|
|
124 (Which you should place, by convention, in sysdep.c). */
|
|
125
|
|
126 #if 0
|
|
127 /* Define this to be the separator between path elements */
|
|
128 #define DIRECTORY_SEP XINT (Vdirectory_sep_char)
|
|
129 #endif
|
|
130
|
|
131 /* Define this to be the separator between devices and paths */
|
|
132 #define DEVICE_SEP ':'
|
|
133
|
|
134 /* We'll support either convention on NT. */
|
|
135 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
|
|
136 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
|
|
137
|
|
138 /* The null device on Windows NT. */
|
|
139 #define NULL_DEVICE "NUL:"
|
|
140 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
|
|
141
|
|
142 #ifndef MAXPATHLEN
|
|
143 #define MAXPATHLEN _MAX_PATH
|
|
144 #endif
|
|
145
|
|
146 #define LISP_FLOAT_TYPE
|
|
147
|
|
148 #define HAVE_SYS_TIMEB_H
|
|
149 #undef HAVE_SYS_TIME_H
|
|
150 #undef HAVE_UNISTD_H
|
|
151 #undef STDC_HEADERS
|
|
152 #undef TIME_WITH_SYS_TIME
|
|
153
|
|
154 #define HAVE_GETTIMEOFDAY
|
|
155 #define HAVE_GETHOSTNAME
|
|
156 #define HAVE_DUP2
|
|
157 #define HAVE_RENAME
|
|
158 #define HAVE_CLOSEDIR
|
|
159
|
|
160 #define HAVE_TZNAME
|
|
161
|
|
162 #define HAVE_LONG_FILE_NAMES
|
|
163
|
|
164 #define HAVE_MKDIR
|
|
165 #define HAVE_RMDIR
|
|
166 #define HAVE_RANDOM
|
|
167 #define HAVE_BCOPY
|
|
168 #define HAVE_BCMP
|
|
169 #define HAVE_LOGB
|
|
170 #define HAVE_FREXP
|
|
171 #define HAVE_FMOD
|
|
172 #define HAVE_FTIME
|
|
173 #define HAVE_MKTIME
|
|
174
|
|
175 #define HAVE_MOUSE
|
|
176 #define HAVE_H_ERRNO
|
|
177
|
|
178 #ifdef HAVE_NTGUI
|
|
179 #define HAVE_WINDOW_SYSTEM
|
|
180 #define HAVE_FACES
|
|
181 #endif
|
|
182
|
|
183 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
|
|
184
|
|
185 /* get some redefinitions in place */
|
|
186
|
|
187 #if 0
|
|
188 /* IO calls that are emulated or shadowed */
|
|
189 #define access sys_access
|
|
190 #define chdir sys_chdir
|
|
191 #define chmod sys_chmod
|
|
192 #define close sys_close
|
|
193 #define creat sys_creat
|
|
194 #define ctime sys_ctime
|
|
195 #define dup sys_dup
|
|
196 #define dup2 sys_dup2
|
|
197 #define fopen sys_fopen
|
|
198 #define link sys_link
|
|
199 #define mkdir sys_mkdir
|
|
200 #define mktemp sys_mktemp
|
|
201 #define open sys_open
|
|
202 #define read sys_read
|
|
203 #define rename sys_rename
|
|
204 #define rmdir sys_rmdir
|
|
205 #define select sys_select
|
|
206 #define unlink sys_unlink
|
|
207 #define write sys_write
|
|
208 #endif
|
|
209
|
|
210 #if 0
|
|
211 /* this is hacky, but is necessary to avoid warnings about macro
|
|
212 redefinitions using the SDK compilers */
|
|
213 #ifndef __STDC__
|
|
214 #define __STDC__ 1
|
|
215 #define MUST_UNDEF__STDC__
|
|
216 #endif
|
|
217 #include <direct.h>
|
|
218 #include <io.h>
|
|
219 #include <stdio.h>
|
|
220 #ifdef MUST_UNDEF__STDC__
|
|
221 #undef __STDC__
|
|
222 #undef MUST_UNDEF__STDC__
|
|
223 #endif
|
|
224 #endif
|
|
225
|
|
226
|
|
227 /* IO calls that are emulated or shadowed */
|
|
228 #define pipe sys_pipe
|
|
229 #define sleep sys_sleep
|
|
230
|
|
231 /* subprocess calls that are emulated */
|
|
232 #define spawnve sys_spawnve
|
|
233 #define wait sys_wait
|
|
234 #define kill sys_kill
|
|
235 #define signal sys_signal
|
|
236
|
|
237 /* map to MSVC names */
|
|
238 #define execlp _execlp
|
|
239 #define execvp _execvp
|
|
240 #define fcloseall _fcloseall
|
|
241 #define fdopen _fdopen
|
|
242 #define fgetchar _fgetchar
|
|
243 #define fileno _fileno
|
|
244 #define flushall _flushall
|
|
245 #define fputchar _fputchar
|
|
246 #define getw _getw
|
|
247 #define getpid _getpid
|
|
248 #define isatty _isatty
|
|
249 #define logb _logb
|
|
250 #define _longjmp longjmp
|
|
251 #define lseek _lseek
|
|
252 #define popen _popen
|
|
253 #define pclose _pclose
|
|
254 #define putw _putw
|
|
255 #define umask _umask
|
|
256 #define utime _utime
|
|
257 #define index strchr
|
|
258 #define rindex strrchr
|
|
259 #define read _read
|
|
260 #define write _write
|
|
261
|
|
262 #ifdef HAVE_NTGUI
|
|
263 #define abort win32_abort
|
|
264 #endif
|
|
265
|
|
266 /* Defines that we need that aren't in the standard signal.h */
|
|
267 #define SIGHUP 1 /* Hang up */
|
|
268 #define SIGQUIT 3 /* Quit process */
|
|
269 #define SIGTRAP 5 /* Trace trap */
|
|
270 #define SIGKILL 9 /* Die, die die */
|
|
271 #define SIGPIPE 13 /* Write on pipe with no readers */
|
|
272 #define SIGALRM 14 /* Alarm */
|
|
273 #define SIGCHLD 18 /* Death of child */
|
|
274
|
|
275 /* For integration with MSDOS support. */
|
|
276 #define getdisk() (_getdrive () - 1)
|
|
277 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
|
|
278
|
|
279 #define EMACS_CONFIGURATION get_emacs_configuration ()
|
|
280 #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */
|
|
281
|
|
282 /* Define this so that winsock.h definitions don't get included when windows.h
|
|
283 is... I don't know if they do the right thing for emacs. For this to
|
|
284 have proper effect, config.h must always be included before windows.h. */
|
|
285 #define _WINSOCKAPI_ 1
|
|
286
|
|
287 /* Defines size_t and alloca (). */
|
|
288 #include <malloc.h>
|
|
289
|
|
290 #include <sys/stat.h>
|
|
291
|
|
292 /* Define for those source files that do not include enough NT
|
|
293 system files. */
|
|
294 #ifndef NULL
|
|
295 #ifdef __cplusplus
|
|
296 #define NULL 0
|
|
297 #else
|
|
298 #define NULL ((void *)0)
|
|
299 #endif
|
|
300 #endif
|
|
301
|
|
302 /* For proper declaration of environ. */
|
|
303 #include <stdlib.h>
|
|
304 #include <string.h>
|
|
305
|
|
306 /* Emacs takes care of ensuring that these are defined. */
|
|
307 #ifdef max
|
|
308 #undef max
|
|
309 #undef min
|
|
310 #endif
|
|
311
|
|
312 /* We need a little extra space, see ../../lisp/loadup.el */
|
|
313 #define SYSTEM_PURESIZE_EXTRA 15000
|
|
314
|
|
315 /* ============================================================ */
|