annotate src/s/mingw32.h @ 404:2f8bb876ab1d r21-2-32

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