annotate src/s/mingw32.h @ 400:a86b2b5e0111 r21-2-30

Import from CVS: tag r21-2-30
author cvs
date Mon, 13 Aug 2007 11:14:34 +0200
parents 74fd4e045ea6
children 2f8bb876ab1d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
1 /* system description file for mingw32.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995, 1999 Free Software Foundation, Inc.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
3
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
5
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
9 any later version.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
10
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
14 GNU General Public License for more details.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
15
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
20
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
21 /* based on cygwin32.h by Andy Piper <andy@xemacs.org> */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
22
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
23 #ifndef WINDOWSNT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
24 #define WINDOWSNT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
25 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
26
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
27 #ifndef DOS_NT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
28 #define DOS_NT /* MSDOS or WINDOWSNT */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
29 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
30
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
31 #define PBS_SMOOTH 0x01
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
32
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33 #ifdef HAVE_MS_WINDOWS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34 #define HAVE_NTGUI
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
35 #define HAVE_FACES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
36 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
37
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
38 #ifndef ORDINARY_LINK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
39 #define ORDINARY_LINK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
40 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
41
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
42 #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -Int/inc -I../nt/inc -DWINDOWSNT"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
43 #define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
44
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
45 #define TEXT_START -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
46 #define TEXT_END -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
47 #define DATA_END -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
48 #define HEAP_IN_DATA
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
49 #define UNEXEC "unexcw.o"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
50
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
51 #define TIME_ONESHOT 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
52 #define TIME_PERIODIC 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
53 #define LOCALE_USE_CP_ACP 0x40000000
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
54 #define SHGFI_EXETYPE 0x2000
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
55 #define NSIG 23
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
56
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
57 #ifndef SPI_GETWHEELSCROLLLINES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
58 #define SPI_GETWHEELSCROLLLINES 104
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
59 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
60 #ifndef WHEEL_PAGESCROLL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
61 #define WHEEL_PAGESCROLL (UINT_MAX)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
62 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
63 #ifndef WHEEL_DELTA
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
64 #define WHEEL_DELTA 120
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
65 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
66 #ifndef WM_MOUSEWHEEL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
67 #define WM_MOUSEWHEEL 0x20A
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
68 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
69
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
70 /* translate NT world unexec stuff to our a.out definitions */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
71
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
72 #define strnicmp strncasecmp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
73 /* #ifndef HAVE_SOCKETS */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
74 #define HAVE_SOCKETS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
75 /* #endif */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
76 #define OBJECTS_SYSTEM ntplay.o nt.o ntheap.o ntproc.o dired-msw.o
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
77 #define HAVE_NATIVE_SOUND
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
78
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
79 #undef MAIL_USE_SYSTEM_LOCK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
80 #define MAIL_USE_POP
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
81 #define HAVE_MSW_C_DIRED
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
82
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
83 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
84 * group of arguments and treat it as an array of the arguments. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
85
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
86 #define NO_ARG_ARRAY
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
87
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
88 /* System calls that are encapsulated */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
89 #define ENCAPSULATE_RENAME
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
90 #define ENCAPSULATE_OPEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
91 #define ENCAPSULATE_FOPEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
92 #define ENCAPSULATE_MKDIR
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
93
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
94 /* Data type of load average, as read out of kmem. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
95
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
96 #define LOAD_AVE_TYPE long
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
97
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
98 /* Convert that into an integer that is 100 for a load average of 1.0 */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
99
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
100 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
101
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
102 /* Define VIRT_ADDR_VARIES if the virtual addresses of
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
103 pure and impure space as loaded can vary, and even their
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
104 relative order cannot be relied on.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
105
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
106 Otherwise Emacs assumes that text space precedes data space,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
107 numerically. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
108
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
109 /* Text does precede data space, but this is never a safe assumption. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
110 #define VIRT_ADDR_VARIES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
111
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
112 /* If you are compiling with a non-C calling convention but need to
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
113 declare vararg routines differently, put it here */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
114 #define _VARARGS_ __cdecl
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
115
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
116 /* If you are providing a function to something that will call the
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
117 function back (like a signal handler and signal, or main) its calling
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
118 convention must be whatever standard the libraries expect */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
119 #define _CALLBACK_ __cdecl
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
120
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
121 /* SYSTEM_TYPE should indicate the kind of system you are using.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
122 It sets the Lisp variable system-type. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
123
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
124 #define SYSTEM_TYPE "windows-nt"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
125
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
126 #define NO_MATHERR
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
127
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
128 /* define MAIL_USE_FLOCK if the mailer uses flock
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
129 to interlock access to /usr/spool/mail/$USER.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
130 The alternative is that a lock file named
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
131 /usr/spool/mail/$USER.lock. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
132
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
133 /* If the character used to separate elements of the executable path
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
134 is not ':', #define this to be the appropriate character constant. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
135 #define SEPCHAR ';'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
136
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
137 /* ============================================================ */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
138
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
139 /* Here, add any special hacks needed
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
140 to make Emacs work on this system. For example,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
141 you might define certain system call names that don't
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
142 exist on your system, or that do different things on
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
143 your system and must be used only through an encapsulation
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
144 (Which you should place, by convention, in sysdep.c). */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
145
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
146 /* Define this to be the separator between devices and paths */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
147 #define DEVICE_SEP ':'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
148
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
149 #define DIRECTORY_SEP '\\'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
150
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
151 /* The null device on Windows NT. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
152 #define NULL_DEVICE "NUL:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
153 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
154 /* We'll support either convention on NT. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
155 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
156 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
157 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
158
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
159 /* We need a little extra space, see ../../lisp/loadup.el */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
160 #define SYSTEM_PURESIZE_EXTRA 15000
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
161
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
162 #ifndef NOT_C_CODE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
163 #include <stdlib.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
164 #include <mingw32/process.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
165 #define mkdir __mkdir
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
166 #include <dir.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
167 #undef mkdir
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
168 #ifdef HAVE_CYGWIN_VERSION_H
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
169 #include <cygwin/version.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
170 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
171
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
172 typedef unsigned int MMRESULT;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
173 typedef struct timecaps_tag {
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
174 unsigned int wPeriodMin;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
175 unsigned int wPeriodMax;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
176 } TIMECAPS;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
177
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
178 /* IO calls that are emulated or shadowed */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
179 #define pipe sys_pipe
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
180 int sys_pipe (int * phandles);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
181
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
182 #ifndef HAVE_X_WINDOWS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
183 #define sleep sys_sleep
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
184 void sleep (int seconds);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
185 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
186
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
187 /* subprocess calls that are emulated */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
188 #define spawnve sys_spawnve
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
189 int spawnve (int mode, const char *cmdname,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
190 const char * const *argv, const char *const *envp);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
191
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
192 #define wait sys_wait
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
193 int wait (int *status);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
194
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
195 #define kill sys_kill
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
196 int kill (int pid, int sig);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
197
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
198 /* map to MSVC names */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
199 #define popen _popen
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
200 #define pclose _pclose
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
201
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
202 typedef int uid_t;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
203 typedef int gid_t;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
204 typedef int pid_t;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
205 typedef int ssize_t;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
206
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
207 /* Encapsulation of system calls */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
208 #ifndef DONT_ENCAPSULATE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
209 #define getpid sys_getpid
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
210 pid_t getpid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
211 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
212
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
213 #define DONT_USE_LITOUT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
214
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
215 /* Random global functions called everywhere. Implemented in nt.c */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
216 /* #### Most of these are FSFisms and must be avoided */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
217 /* #### All of these are FSFisms and must be avoided */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
218 void dostounix_filename (char *p);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
219 void unixtodos_filename (char *p);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
220 int crlf_to_lf (int n, unsigned char *buf, unsigned int *lf_count);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
221
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
222 char *getwd (char *dir);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
223
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
224 void *sbrk (unsigned long increment);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
225
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
226 struct passwd;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
227 struct passwd *getpwuid (uid_t uid);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
228 struct passwd *getpwnam (const char *name);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
229 uid_t getuid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
230 uid_t geteuid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
231 gid_t getgid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
232 gid_t getegid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
233 #define _timeb timeb
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
234
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
235 /* Stuff that gets set wrongly or otherwise */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
236 #define HAVE_SETITIMER
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
237 #define HAVE_GETTIMEOFDAY
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
238 #define HAVE_SELECT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
239 /*#define HAVE_STRUCT_UTIMBUF*/
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
240
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
241 #undef GETTIMEOFDAY_ONE_ARGUMENT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
242 #undef HAVE_SYS_WAIT_H
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
243 #undef HAVE_TERMIOS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
244 #undef SYSV_SYSTEM_DIR
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
245
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
246 /* We now have emulation for some signals */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
247 #define HAVE_SIGHOLD
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
248 #define sigset(s,h) msw_sigset(s,h)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
249 #define sighold(s) msw_sighold(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
250 #define sigrelse(s) msw_sigrelse(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
251 #define sigpause(s) msw_sigpause(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
252 #define signal sigset
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
253
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
254 /* Defines that we need that aren't in the standard signal.h */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
255 #define SIGHUP 1 /* Hang up */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
256 #define SIGQUIT 3 /* Quit process */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
257 #define SIGKILL 9 /* Die, die die */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
258 #define SIGALRM 14 /* Alarm */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
259 #define SIGPROF 29 /* Profiling timer exp */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
260
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
261 #ifndef MAXPATHLEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
262 #define MAXPATHLEN _MAX_PATH
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
263 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
264
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
265 /* For integration with MSDOS support. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
266 #define getdisk() (_getdrive () - 1)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
267 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
268 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
269
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
270 /* Define for those source files that do not include enough NT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
271 system files. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
272 #ifndef NULL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
273 #ifdef __cplusplus
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
274 #define NULL 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
275 #else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
276 #define NULL ((void *)0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
277 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
278 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
279
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
280 /* Define process implementation */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
281 #define HAVE_WIN32_PROCESSES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
282
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
283 /* ============================================================ */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
284