annotate src/s/windowsnt.h @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* System description file for Windows NT.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 any later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 GNU General Public License for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: FSF 19.31. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 #ifndef WINDOWSNT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 #define WINDOWSNT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 #ifndef DOS_NT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #define DOS_NT /* MSDOS or WINDOWSNT */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 /* In case non-Microsoft compiler is used, we fake _MSC_VER */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #ifndef _MSC_VER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 #define _MSC_VER 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 typedef unsigned short mode_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 /* typedef long ptrdiff_t; -kkm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #include <stddef.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 /* If you are compiling with a non-C calling convention but need to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 declare vararg routines differently, put it here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #define _VARARGS_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 /* If you are providing a function to something that will call the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 function back (like a signal handler and signal, or main) its calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 convention must be whatever standard the libraries expect */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 #define _CALLBACK_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 /* SYSTEM_TYPE should indicate the kind of system you are using.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 It sets the Lisp variable system-type. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 #define SYSTEM_TYPE "windows-nt"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #define NO_MATHERR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 #define SIZEOF_SHORT 2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #define SIZEOF_INT 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 #define SIZEOF_LONG 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 #define SIZEOF_LONG_LONG 8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #define SIZEOF_VOID_P 4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 /* NOMULTIPLEJOBS should be defined if your system's shell
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 does not have "job control" (the ability to stop a program,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 run some other program, then continue the first one). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 /* #define NOMULTIPLEJOBS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 /* Letter to use in finding device name of first pty,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 if system supports pty's. 'a' means it is /dev/ptya0 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #define FIRST_PTY_LETTER 'a'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 * Define HAVE_TIMEVAL if the system supports the BSD style clock values.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 * Look in <sys/time.h> for a timeval structure.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 #define HAVE_TIMEVAL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 * Define HAVE_SELECT if the system supports the `select' system call.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 /* #define HAVE_SELECT */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 /*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 * Define HAVE_PTYS if the system supports pty devices.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 /* #define HAVE_PTYS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 /* If your system uses COFF (Common Object File Format) then define the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 preprocessor symbol "COFF". */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 #define COFF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 /* NT supports Winsock which is close enough (with some hacks) */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 #define HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 #define MAIL_USE_POP
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
109 #define HAVE_LOCKING
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 434
diff changeset
110 #define MAIL_USE_LOCKING
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 /* If the character used to separate elements of the executable path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 is not ':', #define this to be the appropriate character constant. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 #define SEPCHAR ';'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 /* Here, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 (Which you should place, by convention, in sysdep.c). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 /* XEmacs file I/O for DOS text files requires FILE_CODING */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 #define FILE_CODING
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
434
9d177e8d4150 Import from CVS: tag r21-2-25
cvs
parents: 432
diff changeset
128 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 /* Define this to be the separator between devices and paths */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 #define DEVICE_SEP ':'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 /* We'll support either convention on NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 /* The null device on Windows NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 #define NULL_DEVICE "NUL:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #ifndef MAXPATHLEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 #define MAXPATHLEN _MAX_PATH
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 #define LISP_FLOAT_TYPE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 #define HAVE_GETTIMEOFDAY
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 #define HAVE_GETHOSTNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 #define HAVE_DUP2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 #define HAVE_RENAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 #define HAVE_CLOSEDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 #define HAVE_TZNAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 #define HAVE_LONG_FILE_NAMES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 #define HAVE_MKDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 #define HAVE_RMDIR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 #define HAVE_RANDOM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 #define HAVE_LOGB
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 #define HAVE_FREXP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 #define HAVE_FMOD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 #define HAVE_FTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 #define HAVE_MKTIME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 #define HAVE_MOUSE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 #define HAVE_H_ERRNO
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 #define HAVE_STRUCT_UTIMBUF
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 #ifdef HAVE_NTGUI
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 #define HAVE_WINDOW_SYSTEM
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 #define HAVE_FACES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 #define HAVE_STRCASECMP
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* Compatibility macros. Some used to be routines in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 #define strcasecmp(x,y) _stricmp(x,y)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 #define random() (rand() << 15 | rand())
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 #define srandom(seed) (srand(seed))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 #define setpgrp(pid,gid)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 #define MODE_LINE_BINARY_TEXT(_b_) (NILP ((_b_)->buffer_file_type) ? "T" : "B")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 #include <stdio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
188 /* subprocess calls that are emulated */
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
189 #ifndef DONT_ENCAPSULATE
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
190 #define spawnve sys_spawnve
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
191 int spawnve (int mode, CONST char *cmdname,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
192 CONST char * CONST *argv, CONST char *CONST *envp);
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
193 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195 /* IO calls that are emulated or shadowed */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 #define pipe sys_pipe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 int sys_pipe (int * phandles);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 #ifndef HAVE_X_WINDOWS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 #define sleep sys_sleep
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 void sleep (int seconds);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 #define wait sys_wait
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 int wait (int *status);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 #define kill sys_kill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 int kill (int pid, int sig);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 /* map to MSVC names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 #define popen _popen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 #define pclose _pclose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 typedef int uid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 typedef int gid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 typedef int pid_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 typedef int ssize_t;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 /* Encapsulation of system calls */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 #ifndef DONT_ENCAPSULATE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 #define getpid sys_getpid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 pid_t getpid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 /* Random global functions called everywhere. Implemented in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 /* #### Most of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 /* #### All of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 void dostounix_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 void unixtodos_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 int crlf_to_lf (int n, unsigned char *buf, unsigned int *lf_count);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 char *getwd (char *dir);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 void *sbrk (unsigned long increment);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 struct passwd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 struct passwd *getpwuid (uid_t uid);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 struct passwd *getpwnam (const char *name);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 uid_t getuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 uid_t geteuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 gid_t getgid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 gid_t getegid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 /* Setitimer is emulated */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 #define HAVE_SETITIMER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 /* We now have emulation for some signals */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 #define HAVE_SIGHOLD
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #define sigset(s,h) msw_sigset(s,h)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 #define sighold(s) msw_sighold(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 #define sigrelse(s) msw_sigrelse(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 #define sigpause(s) msw_sigpause(s)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 /* Defines that we need that aren't in the standard signal.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 #define SIGHUP 1 /* Hang up */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 #define SIGQUIT 3 /* Quit process */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 #define SIGKILL 9 /* Die, die die */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258 #define SIGALRM 14 /* Alarm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 #define SIGPROF 29 /* Profiling timer exp */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 /* For integration with MSDOS support. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 #define getdisk() (_getdrive () - 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 /* Defines size_t and alloca (). */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 #include <malloc.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 #include <sys/stat.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 /* Define for those source files that do not include enough NT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 system files. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 #ifndef NULL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 #ifdef __cplusplus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 #define NULL 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 #define NULL ((void *)0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 /* For proper declaration of environ. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 #include <stdlib.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 #include <string.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 /* Define process implementation */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285 #define HAVE_WIN32_PROCESSES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 /* We need a little extra space, see ../../lisp/loadup.el */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 #define SYSTEM_PURESIZE_EXTRA 15000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 /* See unexnt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 #if (_MSC_VER >= 1100)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 #define DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 #ifdef DUMP_SEPARATE_SECTION
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 #pragma data_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 #pragma bss_seg("xdata")
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 #ifdef HAVE_SCROLLBARS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 /* Ensure the NT 4 mouse definitions in winuser.h are available */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 #ifndef _WIN32_WINNT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 #define _WIN32_WINNT 0x0400
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 #endif