Mercurial > emacs
annotate src/s/ms-w32.h @ 13872:e79f2b570509
(mouse-menu-buffer-maxlen): New variable.
(mouse-buffer-menu): Use it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 26 Dec 1995 19:43:51 +0000 |
parents | b3cefdfb34a9 |
children | ee40177f6c68 |
rev | line source |
---|---|
9803 | 1 /* System description file for Windows NT. |
11390 | 2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. |
9803 | 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 GNU Emacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | |
20 /* | |
21 * Define symbols to identify the version of Unix this is. | |
22 * Define all the symbols that apply correctly. | |
23 */ | |
24 | |
25 /* #define UNIPLUS */ | |
26 /* #define USG5 */ | |
27 /* #define USG */ | |
28 /* #define HPUX */ | |
29 /* #define UMAX */ | |
30 /* #define BSD4_1 */ | |
31 /* #define BSD4_2 */ | |
32 /* #define BSD4_3 */ | |
33 /* #define BSD */ | |
34 /* #define VMS */ | |
35 #ifndef WINDOWSNT | |
36 #define WINDOWSNT | |
37 #endif | |
38 #ifndef DOS_NT | |
39 #define DOS_NT /* MSDOS or WINDOWSNT */ | |
40 #endif | |
41 | |
11390 | 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 | |
45 | |
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 | |
50 | |
9803 | 51 /* SYSTEM_TYPE should indicate the kind of system you are using. |
52 It sets the Lisp variable system-type. */ | |
53 | |
54 #define SYSTEM_TYPE "windows-nt" | |
55 #define SYMS_SYSTEM syms_of_ntterm () | |
56 | |
57 #define NO_MATHERR | |
58 #define HAVE_FREXP | |
59 #define HAVE_FMOD | |
60 | |
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). */ | |
64 | |
65 /* #define NOMULTIPLEJOBS */ | |
66 | |
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. | |
70 | |
71 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
72 | |
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. | |
76 | |
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. | |
83 | |
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 | |
87 through a pipe. */ | |
88 | |
89 #define INTERRUPT_INPUT | |
90 | |
91 /* Letter to use in finding device name of first pty, | |
92 if system supports pty's. 'a' means it is /dev/ptya0 */ | |
93 | |
94 #define FIRST_PTY_LETTER 'a' | |
95 | |
96 /* | |
97 * Define HAVE_TERMIOS if the system provides POSIX-style | |
98 * functions and macros for terminal control. | |
99 * | |
100 * Define HAVE_TERMIO if the system provides sysV-style ioctls | |
101 * for terminal control. | |
102 * | |
103 * Do not define both. HAVE_TERMIOS is preferred, if it is | |
104 * supported on your system. | |
105 */ | |
106 | |
107 /* #define HAVE_TERMIOS */ | |
108 /* #define HAVE_TERMIO */ | |
109 | |
110 /* | |
111 * Define HAVE_TIMEVAL if the system supports the BSD style clock values. | |
112 * Look in <sys/time.h> for a timeval structure. | |
113 */ | |
114 | |
11390 | 115 #define HAVE_TIMEVAL |
116 struct timeval | |
117 { | |
118 long tv_sec; /* seconds */ | |
119 long tv_usec; /* microseconds */ | |
120 }; | |
121 struct timezone | |
122 { | |
123 int tz_minuteswest; /* minutes west of Greenwich */ | |
124 int tz_dsttime; /* type of dst correction */ | |
125 }; | |
126 | |
127 void gettimeofday (struct timeval *, struct timezone *); | |
128 | |
9803 | 129 |
130 /* | |
131 * Define HAVE_SELECT if the system supports the `select' system call. | |
132 */ | |
133 | |
134 /* #define HAVE_SELECT */ | |
135 | |
136 /* | |
137 * Define HAVE_PTYS if the system supports pty devices. | |
138 */ | |
139 | |
140 /* #define HAVE_PTYS */ | |
141 | |
142 /* | |
143 * Define NONSYSTEM_DIR_LIBRARY to make Emacs emulate | |
144 * The 4.2 opendir, etc., library functions. | |
145 */ | |
146 | |
147 /* #define NONSYSTEM_DIR_LIBRARY */ | |
148 | |
149 /* Define this symbol if your system has the functions bcopy, etc. */ | |
150 | |
151 #define BSTRING | |
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) | |
155 | |
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. */ | |
161 | |
162 #define subprocesses | |
163 | |
164 /* If your system uses COFF (Common Object File Format) then define the | |
165 preprocessor symbol "COFF". */ | |
166 | |
167 #define COFF | |
168 | |
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. */ | |
173 | |
174 /* #define MAIL_USE_FLOCK */ | |
175 | |
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. */ | |
179 | |
180 /* #define CLASH_DETECTION */ | |
181 | |
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 */ | |
190 | |
191 /* If the character used to separate elements of the executable path | |
192 is not ':', #define this to be the appropriate character constant. */ | |
193 #define SEPCHAR ';' | |
194 | |
195 /* ============================================================ */ | |
196 | |
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). */ | |
203 | |
204 /* Define this to be the separator between path elements */ | |
205 #define DIRECTORY_SEP '\\' | |
206 | |
207 /* Define this to be the separator between devices and paths */ | |
208 #define DEVICE_SEP ':' | |
209 | |
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_)) | |
213 | |
214 /* The null device on Windows NT. */ | |
215 #define NULL_DEVICE "NUL:" | |
216 #define EXEC_SUFFIXES ".exe:.com:.bat:" | |
217 | |
218 #ifndef MAXPATHLEN | |
219 #define MAXPATHLEN _MAX_PATH | |
220 #endif | |
221 | |
11390 | 222 #define LISP_FLOAT_TYPE |
223 | |
224 #define HAVE_DUP2 1 | |
225 #define HAVE_RENAME 1 | |
226 #define HAVE_RMDIR 1 | |
227 #define HAVE_MKDIR 1 | |
9803 | 228 #define HAVE_GETHOSTNAME 1 |
11390 | 229 #define HAVE_RANDOM 1 |
230 #define USE_UTIME 1 | |
231 #define HAVE_MOUSE 1 | |
232 #define HAVE_TZNAME 1 | |
9818 | 233 |
13422
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
234 #ifdef HAVE_NTGUI |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
235 #define HAVE_WINDOW_SYSTEM |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
236 #define HAVE_FACES |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
237 #endif |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
238 |
9818 | 239 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
9803 | 240 |
241 /* These have to be defined because our compilers treat __STDC__ as being | |
242 defined (most of them anyway). */ | |
243 | |
244 #define access _access | |
245 #define chdir _chdir | |
246 #define chmod _chmod | |
247 #define close _close | |
248 #define creat _creat | |
249 #define dup _dup | |
250 #define dup2 _dup2 | |
251 #define execlp _execlp | |
252 #define execvp _execvp | |
253 #define getpid _getpid | |
254 #define index strchr | |
255 #define isatty _isatty | |
256 #define link _link | |
257 #define lseek _lseek | |
258 #define mkdir _mkdir | |
259 #define mktemp _mktemp | |
260 #define open _open | |
261 #define pipe _pipe | |
262 #define read _read | |
263 #define rmdir _rmdir | |
264 #define sleep nt_sleep | |
265 #define unlink _unlink | |
266 #define umask _umask | |
11390 | 267 #define utime _utime |
9803 | 268 #define write _write |
269 #define _longjmp longjmp | |
270 #define spawnve win32_spawnve | |
271 #define wait win32_wait | |
272 #define signal win32_signal | |
273 #define rindex strrchr | |
11390 | 274 #define ctime nt_ctime /* Place a wrapper around ctime (see nt.c). */ |
9803 | 275 |
13422
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
276 #ifdef HAVE_NTGUI |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
277 #define abort win32_abort |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
278 #endif |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
279 |
9803 | 280 /* Defines that we need that aren't in the standard signal.h */ |
281 #define SIGHUP 1 /* Hang up */ | |
282 #define SIGQUIT 3 /* Quit process */ | |
283 #define SIGTRAP 5 /* Trace trap */ | |
284 #define SIGKILL 9 /* Die, die die */ | |
285 #define SIGPIPE 13 /* Write on pipe with no readers */ | |
286 #define SIGALRM 14 /* Alarm */ | |
287 #define SIGCHLD 18 /* Death of child */ | |
288 | |
289 /* For integration with MSDOS support. */ | |
290 #define getdisk() (_getdrive () - 1) | |
291 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) | |
292 | |
11390 | 293 #define EMACS_CONFIGURATION get_emacs_configuration () |
294 #define EMACS_CONFIG_OPTIONS "NT" /* Not very meaningful yet. */ | |
295 | |
9803 | 296 /* Define this so that winsock.h definitions don't get included when windows.h |
297 is... I don't know if they do the right thing for emacs. For this to | |
298 have proper effect, config.h must always be included before windows.h. */ | |
299 #define _WINSOCKAPI_ 1 | |
300 | |
9818 | 301 /* Defines size_t and alloca (). */ |
302 #include <malloc.h> | |
303 | |
11390 | 304 /* We have to handle stat specially. However, #defining stat to |
305 something else not only redefines uses of the function, but also | |
306 redefines uses of the type struct stat. What unfortunate parallel | |
307 naming. */ | |
308 #include <sys/stat.h> | |
309 struct nt_stat | |
310 { | |
311 struct _stat statbuf; | |
312 }; | |
9804
f98b24714f01
(SYSTEM_PURESIZE_EXTRA): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
9803
diff
changeset
|
313 |
11390 | 314 #ifdef stat |
315 #undef stat | |
316 #endif | |
317 #define stat nt_stat | |
318 #define st_dev statbuf.st_dev | |
319 #define st_ino statbuf.st_ino | |
320 #define st_mode statbuf.st_mode | |
321 #define st_nlink statbuf.st_nlink | |
322 #define st_uid statbuf.st_uid | |
323 #define st_gid statbuf.st_gid | |
324 #define st_rdev statbuf.st_rdev | |
325 #define st_size statbuf.st_size | |
326 #define st_atime statbuf.st_atime | |
327 #define st_mtime statbuf.st_mtime | |
328 #define st_ctime statbuf.st_ctime | |
9804
f98b24714f01
(SYSTEM_PURESIZE_EXTRA): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
9803
diff
changeset
|
329 |
11390 | 330 /* Define for those source files that do not include enough NT |
331 system files. */ | |
332 #ifndef NULL | |
333 #ifdef __cplusplus | |
334 #define NULL 0 | |
335 #else | |
336 #define NULL ((void *)0) | |
337 #endif | |
338 #endif | |
339 | |
13422
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
340 /* For proper declaration of environ. */ |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
341 #include <stdlib.h> |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
342 |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
343 /* Emacs takes care of ensuring that these are defined. */ |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
344 #ifdef max |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
345 #undef max |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
346 #undef min |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
347 #endif |
b3cefdfb34a9
[HAVE_NTGUI] (abort): New macro.
Geoff Voelker <voelker@cs.washington.edu>
parents:
11390
diff
changeset
|
348 |
11390 | 349 /* ============================================================ */ |