annotate src/s/cygwin32.h @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 501cfd01ee6d
children 697ef44129c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
296
5a79be0ef6a8 Import from CVS: tag r21-0b46
cvs
parents: 288
diff changeset
1 /* system description file for cygwin32.
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
3
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
4 This file is part of GNU Emacs.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
5
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
9 any later version.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
10
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
14 GNU General Public License for more details.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
15
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
20
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
21 /* Building under cygwin
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
22 *
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
23 * The approach I have taken with this port is to use primarily the
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
24 * UNIX code base adding stuff that is MS-Windows specific. This works
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
25 * quite well, and is in keeping with my perception of the cygwin
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
26 * philosophy. Note that if you make changes to this file you do NOT
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
27 * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
28 * not define this, it will break everything horribly. What does get
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
29 * defined is HAVE_MS_WINDOWS, but this is done by configure and only
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
30 * applies to the window system.
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
31 *
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 377
diff changeset
32 * When building make sure your HOME path is unix style - i.e. without
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 377
diff changeset
33 * a drive letter.
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
34 *
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 377
diff changeset
35 * once you have done this, configure and make.
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
36 *
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
37 * windows '95 - I haven't tested this under '95, it will probably
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
38 * build but I konw there are some limitations with cygwin under 95 so
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
39 * YMMV. I build with NT4 SP3.
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
40 *
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 377
diff changeset
41 * Andy Piper <andy@xemacs.org> 8/1/98
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 392
diff changeset
42 * http://www.xemacs.freeserve.co.uk/ */
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
43
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
44 /* Identify ourselves */
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
45 #define CYGWIN
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
46
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
47 /* cheesy way to determine cygwin version */
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
48 #ifndef NOT_C_CODE
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
49 # include <signal.h>
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
50 # ifdef HAVE_CYGWIN_VERSION_H
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
51 # include <cygwin/version.h>
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
52 # else
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
53 # ifdef SIGIO
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
54 # define CYGWIN_VERSION_DLL_MAJOR 19
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
55 # define CYGWIN_VERSION_DLL_MINOR 0
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
56 # define CYGWIN_B19
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
57 # else
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
58 # define CYGWIN_VERSION_DLL_MAJOR 18
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
59 # define CYGWIN_VERSION_DLL_MINOR 0
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
60 # define BROKEN_CYGWIN
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
61 # endif
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
62 # endif
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
63
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
64 void cygwin32_win32_to_posix_path_list (const char*, char*);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
65 int cygwin32_win32_to_posix_path_list_buf_size (const char*);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
66 void cygwin32_posix_to_win32_path_list (const char*, char*);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
67 int cygwin32_posix_to_win32_path_list_buf_size (const char*);
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
68 # if CYGWIN_VERSION_DLL_MAJOR < 20
263
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
69 struct timeval;
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
70 struct timezone;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
71 struct itimerval;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
72 struct stat;
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
73 int gettimeofday (struct timeval *tp, struct timezone *tzp);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
74 int gethostname (char* name, int namelen);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
75 char* mktemp (char *);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
76 double logb (double);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
77 void sync (void);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
78 int ioctl (int, int, ...);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
79 /* sys/stat.h */
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
80 int lstat (const char *path, struct stat *buf);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
81 /* unistd.h */
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
82 int readlink (const char *path, void *buf, unsigned int bufsiz);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
83 int symlink (const char *name1, const char *name2);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
84 /* sys/time.h */
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
85 int setitimer (int which, const struct itimerval *value,
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
86 struct itimerval *ovalue);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
87 int utimes (char *file, struct timeval *tvp);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
88
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
89 int srandom (unsigned seed);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
90 long random (void);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
91
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
92 # endif /* CYGWIN_VERSION_DLL_MAJOR < 20 */
373
6240c7796c7a Import from CVS: tag r21-2b2
cvs
parents: 371
diff changeset
93
410
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
94 # if CYGWIN_VERSION_DLL_MAJOR <= 20
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
95 char *getpass (const char *prompt);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
96 double logb (double);
de805c49cfc1 Import from CVS: tag r21-2-35
cvs
parents: 408
diff changeset
97 # endif /* CYGWIN_VERSION_DLL_MAJOR <= 20 */
355
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
98
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
99 #endif
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
100
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
101 #ifndef ORDINARY_LINK
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
102 #define ORDINARY_LINK
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
103 #endif
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
104
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
105 #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
106 #define LIBS_SYSTEM -lwinmm
408
501cfd01ee6d Import from CVS: tag r21-2-34
cvs
parents: 404
diff changeset
107 #define WIN32_LEAN_AND_MEAN
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
108
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
109 #define TEXT_START -1
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
110 #define TEXT_END -1
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
111 #define DATA_END -1
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
112 #define HEAP_IN_DATA
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 400
diff changeset
113 #define NO_LIM_DATA
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
114 #define UNEXEC "unexcw.o"
377
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
115
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
116 #ifdef CYGWIN_VERSION_DLL_MAJOR
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 388
diff changeset
117 #if 0
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 392
diff changeset
118 /* #### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 388
diff changeset
119 behavior, bugs in cygwin mean that xemacs locks up frequently if
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 388
diff changeset
120 this is defined. */
377
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
121 #define BROKEN_SIGIO
392
1f50e6fe4f3f Import from CVS: tag r21-2-11
cvs
parents: 388
diff changeset
122 #endif
377
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
123 #else
296
5a79be0ef6a8 Import from CVS: tag r21-0b46
cvs
parents: 288
diff changeset
124 #define PROCESS_IO_BLOCKING
377
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
125 #endif
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
126 #define strnicmp strncasecmp
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
127 #ifndef HAVE_SOCKETS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
128 #define HAVE_SOCKETS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
129 #endif
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
130 #define OBJECTS_SYSTEM ntplay.o
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
131
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
132 #undef MAIL_USE_SYSTEM_LOCK
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
133
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
134 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
135 * group of arguments and treat it as an array of the arguments. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
136
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
137 #define NO_ARG_ARRAY
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
138
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
139 /* Data type of load average, as read out of kmem. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
140
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
141 #define LOAD_AVE_TYPE long
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
142
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
143 /* Convert that into an integer that is 100 for a load average of 1.0 */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
144
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
145 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
146
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
147 /* Define VIRT_ADDR_VARIES if the virtual addresses of
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
148 pure and impure space as loaded can vary, and even their
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
149 relative order cannot be relied on.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
150
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
151 Otherwise Emacs assumes that text space precedes data space,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
152 numerically. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
153
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
154 /* Text does precede data space, but this is never a safe assumption. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
155 #define VIRT_ADDR_VARIES
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
156
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
157 /* If you are compiling with a non-C calling convention but need to
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
158 declare vararg routines differently, put it here */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
159 #define _VARARGS_ __cdecl
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
160
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
161 /* If you are providing a function to something that will call the
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
162 function back (like a signal handler and signal, or main) its calling
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
163 convention must be whatever standard the libraries expect */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
164 #define _CALLBACK_ __cdecl
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
165
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
166 /* SYSTEM_TYPE should indicate the kind of system you are using.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
167 It sets the Lisp variable system-type. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
168
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
169 #define SYSTEM_TYPE "cygwin32"
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
170
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
171 #define NO_MATHERR
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
172
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
173 /* define MAIL_USE_FLOCK if the mailer uses flock
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
174 to interlock access to /usr/spool/mail/$USER.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
175 The alternative is that a lock file named
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
176 /usr/spool/mail/$USER.lock. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
177
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
178 /* If the character used to separate elements of the executable path
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
179 is not ':', #define this to be the appropriate character constant. */
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
180 #define SEPCHAR ':'
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
181
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
182 /* ============================================================ */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
183
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
184 /* Here, add any special hacks needed
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
185 to make Emacs work on this system. For example,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
186 you might define certain system call names that don't
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
187 exist on your system, or that do different things on
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
188 your system and must be used only through an encapsulation
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
189 (Which you should place, by convention, in sysdep.c). */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
190
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
191 /* Define this to be the separator between path elements */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
192 /* #define DIRECTORY_SEP XINT (Vdirectory_sep_char) */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
193
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
194 /* Define this to be the separator between devices and paths */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
195 #define DEVICE_SEP ':'
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
196
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
197 /* We'll support either convention on NT. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
198 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
199 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
200 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
201
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
202 /* We need a little extra space, see ../../lisp/loadup.el */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
203 #define SYSTEM_PURESIZE_EXTRA 15000
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
204
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
205 #define CYGWIN_CONV_PATH(src, dst) \
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
206 dst = alloca (cygwin32_win32_to_posix_path_list_buf_size(src)); \
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
207 cygwin32_win32_to_posix_path_list(src, dst)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
208 #define CYGWIN_WIN32_PATH(src, dst) \
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
209 dst = alloca (cygwin32_posix_to_win32_path_list_buf_size(src)); \
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
210 cygwin32_posix_to_win32_path_list(src, dst)
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
211
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
212 /*
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
213 * stolen from usg.
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
214 */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
215 #define HAVE_PTYS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
216 #define FIRST_PTY_LETTER 'z'
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
217
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
218 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
219
388
aabb7f5b1c81 Import from CVS: tag r21-2-9
cvs
parents: 377
diff changeset
220 #define PTY_ITERATION for (i = 0, c = 0; i < 1; i++)
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
221
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
222 /* This sets the name of the master side of the PTY. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
223
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
224 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
225
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
226 /* This sets the name of the slave side of the PTY. On SysVr4,
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
227 grantpt(3) forks a subprocess, so keep sigchld_handler() from
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
228 intercepting that death. If any child but grantpt's should die
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
229 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
230
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
231 #define PTY_OPEN \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
232 fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
233
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
234 #define PTY_TTY_NAME_SPRINTF \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
235 { \
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
236 extern char* ptsname(int); \
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
237 char *ptyname; \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
238 \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
239 if (!(ptyname = ptsname (fd))) \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
240 { close (fd); return -1; } \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
241 strncpy (pty_name, ptyname, sizeof (pty_name)); \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
242 pty_name[sizeof (pty_name) - 1] = 0; \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
243 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
244
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
245 /* ============================================================ */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
246