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