annotate src/s/mingw32.h @ 524:1f4790508db6

[xemacs-hg @ 2001-05-09 13:46:55 by ben] once and for all
author ben
date Wed, 09 May 2001 13:46:55 +0000
parents 0784d089fdc9
children 666d73d6ac56
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 mingw32.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995, 1999 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 /* based on cygwin32.h by Andy Piper <andy@xemacs.org> */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
23 /* Identify ourselves */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
24 #ifndef WIN32_NATIVE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
25 #define WIN32_NATIVE
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
28 #define MINGW
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 #ifndef ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 #define ORDINARY_LINK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
34 #define C_SWITCH_SYSTEM "-mno-cygwin -Wno-sign-compare -fno-caller-saves -DWIN32_NATIVE"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
35 #define LIBS_SYSTEM "-mno-cygwin -mwindows -lwinmm -lwsock32"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
36 #define WIN32_LEAN_AND_MEAN
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 #define TEXT_START -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 #define TEXT_END -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 #define DATA_END -1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 #define HEAP_IN_DATA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 #define UNEXEC "unexcw.o"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 #define TIME_ONESHOT 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 #define TIME_PERIODIC 1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 #define LOCALE_USE_CP_ACP 0x40000000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 #define NSIG 23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
49 /* this is necessary to get the TCS_* definitions in <commctrl.h> */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
50 #define _WIN32_IE 0x0400
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 /* translate NT world unexec stuff to our a.out definitions */
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 strnicmp strncasecmp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 /* #ifndef HAVE_SOCKETS */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #define HAVE_SOCKETS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 /* #endif */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 #define OBJECTS_SYSTEM ntplay.o nt.o ntheap.o ntproc.o dired-msw.o
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 #undef MAIL_USE_SYSTEM_LOCK
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 #define HAVE_MSW_C_DIRED
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 /* System calls that are encapsulated */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 #define ENCAPSULATE_RENAME
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 #define ENCAPSULATE_OPEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 #define ENCAPSULATE_FOPEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 #define ENCAPSULATE_MKDIR
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
68 #define ENCAPSULATE_STAT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
69 #define ENCAPSULATE_FSTAT
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
71 /* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
72 since there is no load average available. */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 /* Define VIRT_ADDR_VARIES if the virtual addresses of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 pure and impure space as loaded can vary, and even their
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 relative order cannot be relied on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 Otherwise Emacs assumes that text space precedes data space,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 numerically. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 /* Text does precede data space, but this is never a safe assumption. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 #define VIRT_ADDR_VARIES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 /* 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
85 declare vararg routines differently, put it here */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 #define _VARARGS_ __cdecl
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 /* If you are providing a function to something that will call the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 function back (like a signal handler and signal, or main) its calling
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 convention must be whatever standard the libraries expect */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 #define _CALLBACK_ __cdecl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 /* SYSTEM_TYPE should indicate the kind of system you are using.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 It sets the Lisp variable system-type. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 #define SYSTEM_TYPE "windows-nt"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 #define NO_MATHERR
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 /* define MAIL_USE_FLOCK if the mailer uses flock
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 to interlock access to /usr/spool/mail/$USER.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 The alternative is that a lock file named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 /usr/spool/mail/$USER.lock. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 /* If the character used to separate elements of the executable path
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 is not ':', #define this to be the appropriate character constant. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 #define SEPCHAR ';'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 /* ============================================================ */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 /* Here, add any special hacks needed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 to make Emacs work on this system. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 you might define certain system call names that don't
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 exist on your system, or that do different things on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 your system and must be used only through an encapsulation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 (Which you should place, by convention, in sysdep.c). */
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 /* Define this to be the separator between devices and paths */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 #define DEVICE_SEP ':'
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
121 #define DIRECTORY_SEP ((char)XCHAR(Vdirectory_sep_char))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 /* The null device on Windows NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 #define NULL_DEVICE "NUL:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 /* We'll support either convention on NT. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 #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
129 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 /* We need a little extra space, see ../../lisp/loadup.el */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 #define SYSTEM_PURESIZE_EXTRA 15000
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 #ifndef NOT_C_CODE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 #include <stdlib.h>
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents: 460
diff changeset
136 #include <mingw/process.h>
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 #define mkdir __mkdir
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 #include <dir.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 #undef mkdir
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 #ifdef HAVE_CYGWIN_VERSION_H
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 #include <cygwin/version.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 /* IO calls that are emulated or shadowed */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 #define pipe sys_pipe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 int sys_pipe (int * phandles);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 #ifndef HAVE_X_WINDOWS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 #define sleep sys_sleep
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 void sleep (int seconds);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151 #endif
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 /* subprocess calls that are emulated */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 #define spawnve sys_spawnve
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
155 int spawnve (int mode, const char *cmdname,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
156 const char * const *argv, const char *const *envp);
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 #define wait sys_wait
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 int wait (int *status);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 #define kill sys_kill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 int kill (int pid, int sig);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 /* map to MSVC names */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 #define popen _popen
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 #define pclose _pclose
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 /* Encapsulation of system calls */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 #ifndef DONT_ENCAPSULATE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 #define getpid sys_getpid
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 pid_t getpid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 #define DONT_USE_LITOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 /* Random global functions called everywhere. Implemented in nt.c */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 /* #### Most of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 /* #### All of these are FSFisms and must be avoided */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 void dostounix_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 void unixtodos_filename (char *p);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 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
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 char *getwd (char *dir);
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 void *sbrk (unsigned long increment);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 struct passwd;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 struct passwd *getpwuid (uid_t uid);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 struct passwd *getpwnam (const char *name);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 uid_t getuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 uid_t geteuid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192 gid_t getgid (void);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 gid_t getegid (void);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
194
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
195 #if CYGWIN_VERSION_DLL_MAJOR <= 21
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
196 #define _ftime ftime
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 #define _timeb timeb
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
198 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 /* Stuff that gets set wrongly or otherwise */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 #define HAVE_SETITIMER
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 #define HAVE_GETTIMEOFDAY
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 #define HAVE_SELECT
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
204 /* systime.h includes winsock.h which defines timeval */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
205 #define HAVE_TIMEVAL
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
206 #define HAVE_GETPAGESIZE
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
207 #define getpagesize() 4096
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
208 #ifndef HAVE_H_ERRNO
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
209 #define HAVE_H_ERRNO
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
210 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
211 #ifndef HAVE_TZNAME
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
212 #define HAVE_TZNAME
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
213 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 #undef GETTIMEOFDAY_ONE_ARGUMENT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 #undef HAVE_SYS_WAIT_H
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 #undef HAVE_TERMIOS
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 #undef SYSV_SYSTEM_DIR
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
219 #undef CLASH_DETECTION
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 /* We now have emulation for some signals */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 #define HAVE_SIGHOLD
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
223 #define sigset(s,h) mswindows_sigset(s,h)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
224 #define sighold(s) mswindows_sighold(s)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
225 #define sigrelse(s) mswindows_sigrelse(s)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
226 #define sigpause(s) mswindows_sigpause(s)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 #define signal sigset
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 /* Defines that we need that aren't in the standard signal.h */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 #define SIGHUP 1 /* Hang up */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 #define SIGQUIT 3 /* Quit process */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 #define SIGKILL 9 /* Die, die die */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 #define SIGALRM 14 /* Alarm */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 #define SIGPROF 29 /* Profiling timer exp */
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 #ifndef MAXPATHLEN
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 #define MAXPATHLEN _MAX_PATH
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
239 #endif /* !NOT_C_CODE */
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 /* Define for those source files that do not include enough NT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 system files. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 #ifndef NULL
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 #ifdef __cplusplus
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 #define NULL 0
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 #define NULL ((void *)0)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 /* Define process implementation */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 #define HAVE_WIN32_PROCESSES
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
254 #define CORRECT_DIR_SEPS(s) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
255 do { if ('/' == DIRECTORY_SEP) dostounix_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
256 else unixtodos_filename (s); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 428
diff changeset
257 } while (0)