annotate src/s/mingw32.h @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 2f8bb876ab1d
children de805c49cfc1
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 #ifdef HAVE_MS_WINDOWS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
32 #define HAVE_NTGUI
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33 #define HAVE_FACES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
35
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
36 #ifndef ORDINARY_LINK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
37 #define ORDINARY_LINK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
38 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
39
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
40 #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
41 #define LIBS_SYSTEM "-mno-cygwin -lwinmm -lwsock32"
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
42 #define WIN32_LEAN_AND_MEAN
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
43
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
44 #define TEXT_START -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
45 #define TEXT_END -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
46 #define DATA_END -1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
47 #define HEAP_IN_DATA
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
48 #define UNEXEC "unexcw.o"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
49
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
50 #define TIME_ONESHOT 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
51 #define TIME_PERIODIC 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
52 #define LOCALE_USE_CP_ACP 0x40000000
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
53 #define NSIG 23
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
54
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
55 /* this is necessary to get the TCS_* definitions in <commctrl.h> */
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
56 #define _WIN32_IE 0x0400
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
57
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
58 /* translate NT world unexec stuff to our a.out definitions */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
59
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
60 #define strnicmp strncasecmp
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
61 /* #ifndef HAVE_SOCKETS */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
62 #define HAVE_SOCKETS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
63 /* #endif */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
64 #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
65 #define HAVE_NATIVE_SOUND
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
66
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
67 #undef MAIL_USE_SYSTEM_LOCK
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
68 #define MAIL_USE_POP
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
69 #define HAVE_MSW_C_DIRED
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
70
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
71 /* 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
72 * group of arguments and treat it as an array of the arguments. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
73
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
74 #define NO_ARG_ARRAY
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
75
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
76 /* System calls that are encapsulated */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
77 #define ENCAPSULATE_RENAME
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
78 #define ENCAPSULATE_OPEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
79 #define ENCAPSULATE_FOPEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
80 #define ENCAPSULATE_MKDIR
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
81
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
82 /* Data type of load average, as read out of kmem. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
83
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
84 #define LOAD_AVE_TYPE long
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 /* 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
87
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
88 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
89
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
90 /* Define VIRT_ADDR_VARIES if the virtual addresses of
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
91 pure and impure space as loaded can vary, and even their
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
92 relative order cannot be relied on.
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 Otherwise Emacs assumes that text space precedes data space,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
95 numerically. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
96
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
97 /* Text does precede data space, but this is never a safe assumption. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
98 #define VIRT_ADDR_VARIES
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 /* 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
101 declare vararg routines differently, put it here */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
102 #define _VARARGS_ __cdecl
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
103
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
104 /* If you are providing a function to something that will call the
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
105 function back (like a signal handler and signal, or main) its calling
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
106 convention must be whatever standard the libraries expect */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
107 #define _CALLBACK_ __cdecl
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 /* SYSTEM_TYPE should indicate the kind of system you are using.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
110 It sets the Lisp variable system-type. */
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 #define SYSTEM_TYPE "windows-nt"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
113
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
114 #define NO_MATHERR
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 /* define MAIL_USE_FLOCK if the mailer uses flock
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
117 to interlock access to /usr/spool/mail/$USER.
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
118 The alternative is that a lock file named
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
119 /usr/spool/mail/$USER.lock. */
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 /* If the character used to separate elements of the executable path
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
122 is not ':', #define this to be the appropriate character constant. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
123 #define SEPCHAR ';'
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
124
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
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
127 /* Here, add any special hacks needed
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
128 to make Emacs work on this system. For example,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
129 you might define certain system call names that don't
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
130 exist on your system, or that do different things on
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
131 your system and must be used only through an encapsulation
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
132 (Which you should place, by convention, in sysdep.c). */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
133
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
134 /* Define this to be the separator between devices and paths */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
135 #define DEVICE_SEP ':'
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 #define DIRECTORY_SEP '\\'
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 /* The null device on Windows NT. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
140 #define NULL_DEVICE "NUL:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
141 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
142 /* We'll support either convention on NT. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
143 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
144 #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
145 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
146
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
147 /* We need a little extra space, see ../../lisp/loadup.el */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
148 #define SYSTEM_PURESIZE_EXTRA 15000
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
149
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
150 #ifndef NOT_C_CODE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
151 #include <stdlib.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
152 #include <mingw32/process.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
153 #define mkdir __mkdir
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
154 #include <dir.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
155 #undef mkdir
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
156 #ifdef HAVE_CYGWIN_VERSION_H
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
157 #include <cygwin/version.h>
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
158 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
159
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
160 /* IO calls that are emulated or shadowed */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
161 #define pipe sys_pipe
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
162 int sys_pipe (int * phandles);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
163
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
164 #ifndef HAVE_X_WINDOWS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
165 #define sleep sys_sleep
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
166 void sleep (int seconds);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
167 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
168
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
169 /* subprocess calls that are emulated */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
170 #define spawnve sys_spawnve
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
171 int spawnve (int mode, const char *cmdname,
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
172 const char * const *argv, const char *const *envp);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
173
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
174 #define wait sys_wait
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
175 int wait (int *status);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
176
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
177 #define kill sys_kill
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
178 int kill (int pid, int sig);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
179
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
180 /* map to MSVC names */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
181 #define popen _popen
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
182 #define pclose _pclose
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
183
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
184 /* Encapsulation of system calls */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
185 #ifndef DONT_ENCAPSULATE
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
186 #define getpid sys_getpid
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
187 pid_t getpid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
188 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
189
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
190 #define DONT_USE_LITOUT
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 /* Random global functions called everywhere. Implemented in nt.c */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
193 /* #### Most of these are FSFisms and must be avoided */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
194 /* #### All of these are FSFisms and must be avoided */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
195 void dostounix_filename (char *p);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
196 void unixtodos_filename (char *p);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
197 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
198
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
199 char *getwd (char *dir);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
200
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
201 void *sbrk (unsigned long increment);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
202
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
203 struct passwd;
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
204 struct passwd *getpwuid (uid_t uid);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
205 struct passwd *getpwnam (const char *name);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
206 uid_t getuid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
207 uid_t geteuid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
208 gid_t getgid (void);
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
209 gid_t getegid (void);
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
210
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
211 #if CYGWIN_VERSION_DLL_MAJOR <= 21
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
212 #define _ftime ftime
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
213 #define _timeb timeb
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
214 #endif
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
215
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
216 /* Stuff that gets set wrongly or otherwise */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
217 #define HAVE_SETITIMER
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
218 #define HAVE_GETTIMEOFDAY
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
219 #define HAVE_SELECT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
220 /*#define HAVE_STRUCT_UTIMBUF*/
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
221 #ifndef HAVE_H_ERRNO
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
222 #define HAVE_H_ERRNO
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
223 #endif
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
224 #ifndef HAVE_TZNAME
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
225 #define HAVE_TZNAME
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
226 #endif
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
227
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
228 #undef GETTIMEOFDAY_ONE_ARGUMENT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
229 #undef HAVE_SYS_WAIT_H
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
230 #undef HAVE_TERMIOS
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
231 #undef SYSV_SYSTEM_DIR
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
232 #undef CLASH_DETECTION
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
233
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
234 /* We now have emulation for some signals */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
235 #define HAVE_SIGHOLD
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
236 #define sigset(s,h) msw_sigset(s,h)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
237 #define sighold(s) msw_sighold(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
238 #define sigrelse(s) msw_sigrelse(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
239 #define sigpause(s) msw_sigpause(s)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
240 #define signal sigset
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
241
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
242 /* Defines that we need that aren't in the standard signal.h */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
243 #define SIGHUP 1 /* Hang up */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
244 #define SIGQUIT 3 /* Quit process */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
245 #define SIGKILL 9 /* Die, die die */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
246 #define SIGALRM 14 /* Alarm */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
247 #define SIGPROF 29 /* Profiling timer exp */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
248
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
249 #ifndef MAXPATHLEN
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
250 #define MAXPATHLEN _MAX_PATH
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
251 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
252
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
253 /* For integration with MSDOS support. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
254 #define getdisk() (_getdrive () - 1)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
255 #define getdefdir(_drv, _buf) _getdcwd (_drv, _buf, MAXPATHLEN)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
256 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
257
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
258 /* Define for those source files that do not include enough NT
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
259 system files. */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
260 #ifndef NULL
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
261 #ifdef __cplusplus
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
262 #define NULL 0
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
263 #else
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
264 #define NULL ((void *)0)
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
265 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
266 #endif
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
267
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
268 /* Define process implementation */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
269 #define HAVE_WIN32_PROCESSES
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
270
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
271 /* ============================================================ */
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
272