annotate src/s/cygwin32.h @ 357:4711e16a8e49 r21-1-8

Import from CVS: tag r21-1-8
author cvs
date Mon, 13 Aug 2007 10:57:04 +0200
parents 182f72e8cd0d
children cc15677e0335
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 *
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
23 * The approach I have taken with this port is to use primarily the UNIX
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
24 * code base adding stuff that is MS-Windows specific. This works quite
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
25 * well, and is in keeping with my perception of the cygwin philosophy.
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
26 * Note that if you make changes to this file you do NOT want to define
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
27 * WINDOWSNT, I repeat - do not define this, it will break everything
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
28 * horribly. What does get defined is HAVE_MS_WINDOWS, but this is
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
29 * done by configure and only applies to the window system.
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
30 *
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
31 * The important thing about building is that it is done on a binary
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
32 * mounted filesystem. i.e. something mounted like: mount -b c:
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
33 * /binary. If you do not do this then compilation of el files may
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
34 * produce garbage. As of b24 there are fixes in xemacs to make
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
35 * building on text mounts but I don't generally do this. Make sure
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
36 * you have installed cygwin32 b18 + patched dll (which can be found
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
37 * at http://www.lexa.ru/sos or on my home page
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
38 * http://www.parallax.co.uk/~andyp. Alternatively when b19 comes out
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
39 * the patched dll will be unnecessary. Also make sure your HOME path
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
40 * is unix style - i.e. without a drive letter.
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
41 *
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
42 * Note that some people have reported problems with the patched
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
43 * cygwin.dll on Sergey's home page so you may want to use the one on
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
44 * mine which I *know* works.
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
45 *
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
46 * once you have done this, configure and make. If you want unexec
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
47 * support you need to download a.out.h from my web page or use cygwin
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
48 * b19. You probably want to build with mule support since this
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
49 * addresses crlf issues in a sensible way.
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
50 *
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
51 * windows '95 - I haven't tested this under '95, it will probably
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
52 * 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
53 * YMMV. I build with NT4 SP3.
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
54 *
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
55 * What I want to do:
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
56 *
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
57 * the fileio stuff merely uses the unix system calls this means that
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
58 * the mount type of your fs will determine how files are edited. This
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
59 * is fine except in the instance that you want to convert one to the
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
60 * other. In this instance I would like to bring the buffer_file_type
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
61 * code into the picture without all the other windows-nt
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
62 * cruft. Apparently the best way to do this is use the mule coding
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
63 * stuff.
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
64 *
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
65 * process support needs fixing although basic support works (a la
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
66 * make-docfile)
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
67 *
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
68 * Andy Piper <andyp@parallax.co.uk> 8/1/98
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
69 * http://www.parallax.co.uk/~andyp */
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
70
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
71 /* cheesy way to determine cygwin version */
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
72 #ifndef NOT_C_CODE
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
73 #include <signal.h>
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
74 #ifdef HAVE_CYGWIN_VERSION_H
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
75 #include <cygwin/version.h>
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
76 #else
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
77 #ifdef SIGIO
357
4711e16a8e49 Import from CVS: tag r21-1-8
cvs
parents: 355
diff changeset
78 #define CYGWIN_VERSION_DLL_MAJOR 19
4711e16a8e49 Import from CVS: tag r21-1-8
cvs
parents: 355
diff changeset
79 #define CYGWIN_VERSION_DLL_MINOR 0
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
80 #define CYGWIN_B19
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
81 #else
357
4711e16a8e49 Import from CVS: tag r21-1-8
cvs
parents: 355
diff changeset
82 #define CYGWIN_VERSION_DLL_MAJOR 18
4711e16a8e49 Import from CVS: tag r21-1-8
cvs
parents: 355
diff changeset
83 #define CYGWIN_VERSION_DLL_MINOR 0
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
84 #define BROKEN_CYGWIN
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
85 #endif
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
86 #endif
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
87
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
88 extern void cygwin32_win32_to_posix_path_list(const char*, char*);
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
89 extern int cygwin32_win32_to_posix_path_list_buf_size(const char*);
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
90 extern void cygwin32_posix_to_win32_path_list(const char*, char*);
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
91 extern int cygwin32_posix_to_win32_path_list_buf_size(const char*);
357
4711e16a8e49 Import from CVS: tag r21-1-8
cvs
parents: 355
diff changeset
92 #if CYGWIN_VERSION_DLL_MAJOR < 20
263
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
93 struct timeval;
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
94 struct timezone;
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
95 struct itimerval;
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
96 struct stat;
263
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
97 extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
98 extern int gethostname (char* name, int namelen);
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
99 extern char* mktemp(char *);
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
100 extern double logb(double);
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
101 extern void sync();
727739f917cb Import from CVS: tag r20-5b30
cvs
parents: 259
diff changeset
102 extern int ioctl(int, int, ...);
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
103 /* sys/stat.h */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
104 extern int lstat(const char *path, struct stat *buf);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
105 /* unistd.h */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
106 extern int readlink(const char *path, void *buf, unsigned int bufsiz);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
107 extern int symlink(const char *name1, const char *name2);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
108 /* sys/time.h */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
109 extern int setitimer(int which, const struct itimerval *value,
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
110 struct itimerval *ovalue);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
111 extern int utimes(char *file, struct timeval *tvp);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
112
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
113 extern int srandom( unsigned seed);
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
114 extern long random();
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
115
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
116 #define SND_ASYNC 1
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
117 #define SND_NODEFAULT 2
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
118 #define SND_MEMORY 4
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
119 #define SND_FILENAME 0x2000L
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
120 #define VK_APPS 0x5D
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
121 #define SIF_TRACKPOS 0x0010
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
122 #define ICC_BAR_CLASSES 4
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
123 #define FW_BLACK FW_HEAVY
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
124 #define FW_ULTRABOLD FW_EXTRABOLD
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
125 #define FW_DEMIBOLD FW_SEMIBOLD
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
126 #define FW_ULTRALIGHT FW_EXTRALIGHT
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
127 #define APPCMD_FILTERINITS 0x20L
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
128 #define CBF_FAIL_SELFCONNECTIONS 0x1000
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
129 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
130 #define CBF_FAIL_ADVISES 0x4000
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
131 #define CBF_FAIL_POKES 0x10000
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
132 #define CBF_FAIL_REQUESTS 0x20000
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
133 #define SZDDESYS_TOPIC "System"
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
134 #define JOHAB_CHARSET 130
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
135 #define MAC_CHARSET 77
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
136
318
afd57c14dfc8 Import from CVS: tag r21-0b57
cvs
parents: 296
diff changeset
137 #endif
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
138 #endif
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
139
355
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
140 #ifndef SPI_GETWHEELSCROLLLINES
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
141 #define SPI_GETWHEELSCROLLLINES 104
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
142 #endif
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
143 #ifndef WHEEL_PAGESCROLL
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
144 #define WHEEL_PAGESCROLL (UINT_MAX)
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
145 #endif
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
146 #ifndef WHEEL_DELTA
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
147 #define WHEEL_DELTA 120
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
148 #endif
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
149 #ifndef WM_MOUSEWHEEL
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
150 #define WM_MOUSEWHEEL 0x20A
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
151 #endif
182f72e8cd0d Import from CVS: tag r21-1-7
cvs
parents: 333
diff changeset
152
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
153 #ifdef HAVE_MS_WINDOWS
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
154 #define HAVE_NTGUI
239
41f2f0e326e9 Import from CVS: tag r20-5b18
cvs
parents: 231
diff changeset
155 #define HAVE_FACES
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
156 #endif
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
157
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
158 #ifndef ORDINARY_LINK
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
159 #define ORDINARY_LINK
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
160 #endif
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
161
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
162 #define C_SWITCH_SYSTEM -Wno-sign-compare -fno-caller-saves
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
163 #define LIBS_SYSTEM -lwinmm
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
164
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
165
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
166 #define TEXT_START -1
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
167 #define TEXT_END -1
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
168 #define DATA_END -1
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
169 #define HEAP_IN_DATA
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
170 #define UNEXEC "unexcw.o"
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
171
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
172 #ifdef CYGWIN_VERSION_DLL_MAJOR
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents: 321
diff changeset
173 #if 0
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents: 321
diff changeset
174 /* ### FIXME: although defining BROKEN_SIGIO is correct for proper ^G
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents: 321
diff changeset
175 behavior, bugs in cygwin mean that xemacs locks up frequently if
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents: 321
diff changeset
176 this is defined. */
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
177 #define BROKEN_SIGIO
333
4f79e16b1112 Import from CVS: tag r21-0-64
cvs
parents: 321
diff changeset
178 #endif
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
179 #else
296
5a79be0ef6a8 Import from CVS: tag r21-0b46
cvs
parents: 288
diff changeset
180 #define PROCESS_IO_BLOCKING
321
19dcec799385 Import from CVS: tag r21-0-58
cvs
parents: 318
diff changeset
181 #endif
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
182 #define strnicmp strncasecmp
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
183 #ifndef HAVE_SOCKETS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
184 #define HAVE_SOCKETS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
185 #endif
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
186 #define OBJECTS_SYSTEM ntplay.o
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
187 #define HAVE_NATIVE_SOUND
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
188
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
189 #undef MAIL_USE_SYSTEM_LOCK
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
190 #define MAIL_USE_POP
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
191
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
192 /* 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
193 * group of arguments and treat it as an array of the arguments. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
194
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
195 #define NO_ARG_ARRAY
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
196
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
197 /* Define WORD_MACHINE if addresses and such have
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
198 * to be corrected before they can be used as byte counts. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
199
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
200 #define WORD_MACHINE
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
201
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
202 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
203 the 24-bit bit field into an int. In other words, if bit fields
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
204 are always unsigned.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
205
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
206 If you use NO_UNION_TYPE, this flag does not matter. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
207
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
208 #define EXPLICIT_SIGN_EXTEND
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
209
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
210 /* Data type of load average, as read out of kmem. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
211
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
212 #define LOAD_AVE_TYPE long
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
213
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
214 /* 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
215
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
216 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
217
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
218 /* Define VIRT_ADDR_VARIES if the virtual addresses of
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
219 pure and impure space as loaded can vary, and even their
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
220 relative order cannot be relied on.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
221
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
222 Otherwise Emacs assumes that text space precedes data space,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
223 numerically. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
224
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
225 /* Text does precede data space, but this is never a safe assumption. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
226 #define VIRT_ADDR_VARIES
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
227
278
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
228 /* set this if you have a new version of cygwin
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
229 #define DATA_SEG_BITS 0x10000000
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
230 */
90d73dddcdc4 Import from CVS: tag r21-0b37
cvs
parents: 267
diff changeset
231
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
232 /* If you are compiling with a non-C calling convention but need to
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
233 declare vararg routines differently, put it here */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
234 #define _VARARGS_ __cdecl
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
235
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
236 /* If you are providing a function to something that will call the
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
237 function back (like a signal handler and signal, or main) its calling
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
238 convention must be whatever standard the libraries expect */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
239 #define _CALLBACK_ __cdecl
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
240
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
241 /* SYSTEM_TYPE should indicate the kind of system you are using.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
242 It sets the Lisp variable system-type. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
243
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
244 #define SYSTEM_TYPE "cygwin32"
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
245
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
246 #define NO_MATHERR
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
247
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
248 /* define MAIL_USE_FLOCK if the mailer uses flock
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
249 to interlock access to /usr/spool/mail/$USER.
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
250 The alternative is that a lock file named
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
251 /usr/spool/mail/$USER.lock. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
252
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
253 /* If the character used to separate elements of the executable path
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
254 is not ':', #define this to be the appropriate character constant. */
245
51092a27c943 Import from CVS: tag r20-5b21
cvs
parents: 239
diff changeset
255 #define SEPCHAR ':'
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
256
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
257 /* ============================================================ */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
258
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
259 /* Here, add any special hacks needed
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
260 to make Emacs work on this system. For example,
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
261 you might define certain system call names that don't
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
262 exist on your system, or that do different things on
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
263 your system and must be used only through an encapsulation
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
264 (Which you should place, by convention, in sysdep.c). */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
265
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
266 /* Define this to be the separator between path elements */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
267 /* #define DIRECTORY_SEP XINT (Vdirectory_sep_char) */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
268
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
269 /* Define this to be the separator between devices and paths */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
270 #define DEVICE_SEP ':'
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
271
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
272 /* We'll support either convention on NT. */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
273 #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
274 #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
275 #define EXEC_SUFFIXES ".exe:.com:.bat:.cmd:"
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
276
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
277 /* We need a little extra space, see ../../lisp/loadup.el */
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
278 #define SYSTEM_PURESIZE_EXTRA 15000
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
279
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
280 #define CYGWIN_CONV_PATH(src, dst) \
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
281 dst = alloca (cygwin32_win32_to_posix_path_list_buf_size(src)); \
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
282 cygwin32_win32_to_posix_path_list(src, dst)
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
283 #define CYGWIN_WIN32_PATH(src, dst) \
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
284 dst = alloca (cygwin32_posix_to_win32_path_list_buf_size(src)); \
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
285 cygwin32_posix_to_win32_path_list(src, dst)
259
11cf20601dec Import from CVS: tag r20-5b28
cvs
parents: 251
diff changeset
286
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
287 /*
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
288 * stolen from usg.
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
289 */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
290 #define HAVE_PTYS
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
291 #define FIRST_PTY_LETTER 'z'
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
292
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
293 /* Pseudo-terminal support under SVR4 only loops to deal with errors. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
294
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
295 #define PTY_ITERATION for (i = 0; i < 1; i++)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
296
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
297 /* This sets the name of the master side of the PTY. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
298
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
299 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
300
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
301 /* 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
302 grantpt(3) forks a subprocess, so keep sigchld_handler() from
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
303 intercepting that death. If any child but grantpt's should die
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
304 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
305
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
306 #define PTY_OPEN \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
307 fd = open (pty_name, O_RDWR | O_NONBLOCK | OPEN_BINARY, 0)
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
308
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
309 #define PTY_TTY_NAME_SPRINTF \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
310 { \
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents: 263
diff changeset
311 extern char* ptsname(int); \
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
312 char *ptyname; \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
313 \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
314 if (!(ptyname = ptsname (fd))) \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
315 { close (fd); return -1; } \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
316 strncpy (pty_name, ptyname, sizeof (pty_name)); \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
317 pty_name[sizeof (pty_name) - 1] = 0; \
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
318 }
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
319
231
557eaa0339bf Import from CVS: tag r20-5b14
cvs
parents:
diff changeset
320 /* ============================================================ */
251
677f6a0ee643 Import from CVS: tag r20-5b24
cvs
parents: 245
diff changeset
321