Mercurial > hg > xemacs-beta
comparison src/s/windowsnt.h @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 064ab7fed2e0 |
children | a86b2b5e0111 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
103 /* define MAIL_USE_FLOCK if the mailer uses flock | 103 /* define MAIL_USE_FLOCK if the mailer uses flock |
104 to interlock access to /usr/spool/mail/$USER. | 104 to interlock access to /usr/spool/mail/$USER. |
105 The alternative is that a lock file named | 105 The alternative is that a lock file named |
106 /usr/spool/mail/$USER.lock. */ | 106 /usr/spool/mail/$USER.lock. */ |
107 | 107 |
108 /* #define MAIL_USE_FLOCK */ | |
109 #define MAIL_USE_POP | 108 #define MAIL_USE_POP |
110 #define MAIL_USE_SYSTEM_LOCK | 109 #define HAVE_LOCKING |
110 #define MAIL_USE_LOCKING | |
111 | 111 |
112 /* If the character used to separate elements of the executable path | 112 /* If the character used to separate elements of the executable path |
113 is not ':', #define this to be the appropriate character constant. */ | 113 is not ':', #define this to be the appropriate character constant. */ |
114 #define SEPCHAR ';' | 114 #define SEPCHAR ';' |
115 | 115 |
123 (Which you should place, by convention, in sysdep.c). */ | 123 (Which you should place, by convention, in sysdep.c). */ |
124 | 124 |
125 /* XEmacs file I/O for DOS text files requires FILE_CODING */ | 125 /* XEmacs file I/O for DOS text files requires FILE_CODING */ |
126 #define FILE_CODING | 126 #define FILE_CODING |
127 | 127 |
128 #define DIRECTORY_SEP '\\' | 128 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char)) |
129 | 129 |
130 /* Define this to be the separator between devices and paths */ | 130 /* Define this to be the separator between devices and paths */ |
131 #define DEVICE_SEP ':' | 131 #define DEVICE_SEP ':' |
132 | 132 |
133 /* We'll support either convention on NT. */ | 133 /* We'll support either convention on NT. */ |
180 #define srandom(seed) (srand(seed)) | 180 #define srandom(seed) (srand(seed)) |
181 #define setpgrp(pid,gid) | 181 #define setpgrp(pid,gid) |
182 | 182 |
183 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") | 183 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B") |
184 | 184 |
185 /* get some redefinitions in place */ | 185 |
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 mktemp sys_mktemp | |
200 #define open sys_open | |
201 #define read sys_read | |
202 #define rename sys_rename | |
203 #define unlink sys_unlink | |
204 #define write sys_write | |
205 #define mkdir sys_mkdir | |
206 #define rmdir sys_rmdir | |
207 | |
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> | 186 #include <stdio.h> |
220 #ifdef MUST_UNDEF__STDC__ | 187 |
221 #undef __STDC__ | 188 /* subprocess calls that are emulated */ |
222 #undef MUST_UNDEF__STDC__ | 189 #ifndef DONT_ENCAPSULATE |
223 #endif | 190 #define spawnve sys_spawnve |
224 #endif | 191 int spawnve (int mode, const char *cmdname, |
225 | 192 const char * const *argv, const char *const *envp); |
226 #include <stdio.h> | 193 #endif |
227 | |
228 | 194 |
229 /* IO calls that are emulated or shadowed */ | 195 /* IO calls that are emulated or shadowed */ |
230 #define pipe sys_pipe | 196 #define pipe sys_pipe |
231 int sys_pipe (int * phandles); | 197 int sys_pipe (int * phandles); |
232 | 198 |
233 #ifndef HAVE_X_WINDOWS | 199 #ifndef HAVE_X_WINDOWS |
234 #define sleep sys_sleep | 200 #define sleep sys_sleep |
235 void sleep (int seconds); | 201 void sleep (int seconds); |
236 #endif | 202 #endif |
237 | 203 |
238 /* subprocess calls that are emulated */ | |
239 #define spawnve sys_spawnve | |
240 int spawnve (int mode, CONST char *cmdname, | |
241 CONST char * CONST *argv, CONST char *CONST *envp); | |
242 | |
243 #define wait sys_wait | 204 #define wait sys_wait |
244 int wait (int *status); | 205 int wait (int *status); |
245 | 206 |
246 #define kill sys_kill | 207 #define kill sys_kill |
247 int kill (int pid, int sig); | 208 int kill (int pid, int sig); |
248 | 209 |
249 /* map to MSVC names */ | 210 /* map to MSVC names */ |
250 #define popen _popen | 211 #define popen _popen |
251 #define pclose _pclose | 212 #define pclose _pclose |
252 | 213 |
253 #if 0 | 214 typedef int uid_t; |
254 #define chdir _chdir | 215 typedef int gid_t; |
255 #define execlp _execlp | 216 typedef int pid_t; |
256 #define execvp _execvp | 217 typedef int ssize_t; |
257 #define fcloseall _fcloseall | |
258 #define fdopen _fdopen | |
259 #define fgetchar _fgetchar | |
260 #define fileno _fileno | |
261 #define flushall _flushall | |
262 #define fputchar _fputchar | |
263 #define getw _getw | |
264 #define getpid _getpid | |
265 #define isatty _isatty | |
266 #define logb _logb | |
267 #define _longjmp longjmp | |
268 #define lseek _lseek | |
269 #define putw _putw | |
270 #define umask _umask | |
271 /* #define utime _utime */ | |
272 /* #define index strchr */ | |
273 /* #define rindex strrchr */ | |
274 #define read _read | |
275 #define write _write | |
276 #define getcwd _getcwd | |
277 | |
278 #ifdef HAVE_NTGUI | |
279 #define abort win32_abort | |
280 #endif | |
281 | |
282 #endif /* 0 */ | |
283 | 218 |
284 /* Encapsulation of system calls */ | 219 /* Encapsulation of system calls */ |
285 #ifndef DONT_ENCAPSULATE | 220 #ifndef DONT_ENCAPSULATE |
286 #define getpid sys_getpid | 221 #define getpid sys_getpid |
287 int getpid (void); | 222 pid_t getpid (void); |
288 #endif | 223 #endif |
289 | 224 |
290 /* Random global functions called everywhere. Implemented in nt.c */ | 225 /* Random global functions called everywhere. Implemented in nt.c */ |
291 /* #### Most of these are FSFisms and must be avoided */ | 226 /* #### Most of these are FSFisms and must be avoided */ |
292 /* #### All of these are FSFisms and must be avoided */ | 227 /* #### All of these are FSFisms and must be avoided */ |
297 char *getwd (char *dir); | 232 char *getwd (char *dir); |
298 | 233 |
299 void *sbrk (unsigned long increment); | 234 void *sbrk (unsigned long increment); |
300 | 235 |
301 struct passwd; | 236 struct passwd; |
302 struct passwd *getpwuid (int uid); | 237 struct passwd *getpwuid (uid_t uid); |
303 struct passwd *getpwnam (const char *name); | 238 struct passwd *getpwnam (const char *name); |
304 int getuid (); | 239 uid_t getuid (void); |
305 int geteuid (); | 240 uid_t geteuid (void); |
306 int getgid (void); | 241 gid_t getgid (void); |
307 int getegid (); | 242 gid_t getegid (void); |
308 | 243 |
309 /* Setitimer is emulated */ | 244 /* Setitimer is emulated */ |
310 #define HAVE_SETITIMER | 245 #define HAVE_SETITIMER |
311 | 246 |
312 /* We now have emulation for some signals */ | 247 /* We now have emulation for some signals */ |
313 #define HAVE_SIGHOLD | 248 #define HAVE_SIGHOLD |
314 #define sigset(s,h) msw_sigset(s,h) | 249 #define sigset(s,h) msw_sigset(s,h) |
315 #define sighold(s) msw_sighold(s) | 250 #define sighold(s) msw_sighold(s) |
316 #define sigrelse(s) msw_sigrelse(s) | 251 #define sigrelse(s) msw_sigrelse(s) |
317 #define sigpause(s) msw_sigpause(s) | 252 #define sigpause(s) msw_sigpause(s) |
318 #define signal sigset | |
319 | 253 |
320 /* Defines that we need that aren't in the standard signal.h */ | 254 /* Defines that we need that aren't in the standard signal.h */ |
321 #define SIGHUP 1 /* Hang up */ | 255 #define SIGHUP 1 /* Hang up */ |
322 #define SIGQUIT 3 /* Quit process */ | 256 #define SIGQUIT 3 /* Quit process */ |
323 #define SIGKILL 9 /* Die, die die */ | 257 #define SIGKILL 9 /* Die, die die */ |
325 #define SIGPROF 29 /* Profiling timer exp */ | 259 #define SIGPROF 29 /* Profiling timer exp */ |
326 | 260 |
327 /* For integration with MSDOS support. */ | 261 /* For integration with MSDOS support. */ |
328 #define getdisk() (_getdrive () - 1) | 262 #define getdisk() (_getdrive () - 1) |
329 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) | 263 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN) |
330 | |
331 #if 0 /* they do. -kkm */ | |
332 /* Define this so that winsock.h definitions don't get included when windows.h | |
333 is... I don't know if they do the right thing for emacs. For this to | |
334 have proper effect, config.h must always be included before windows.h. */ | |
335 #define _WINSOCKAPI_ 1 | |
336 #endif /* 0 */ | |
337 | 264 |
338 /* Defines size_t and alloca (). */ | 265 /* Defines size_t and alloca (). */ |
339 #include <malloc.h> | 266 #include <malloc.h> |
340 | 267 |
341 #include <sys/stat.h> | 268 #include <sys/stat.h> |
368 #endif | 295 #endif |
369 #ifdef DUMP_SEPARATE_SECTION | 296 #ifdef DUMP_SEPARATE_SECTION |
370 #pragma data_seg("xdata") | 297 #pragma data_seg("xdata") |
371 #pragma bss_seg("xdata") | 298 #pragma bss_seg("xdata") |
372 #endif | 299 #endif |
300 | |
301 #ifdef HAVE_SCROLLBARS | |
302 /* Ensure the NT 4 mouse definitions in winuser.h are available */ | |
303 #ifndef _WIN32_WINNT | |
304 #define _WIN32_WINNT 0x0400 | |
305 #endif | |
306 #endif |