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