annotate src/s/cygwin32.h @ 430:a5df635868b2 r21-2-23

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