aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1992-02-06 01:02:59 +0000
committerJim Blandy1992-02-06 01:02:59 +0000
commit77d78be1714a34f0225850fadb997ca5fa80fe99 (patch)
treed6b4883d6bccb4ec2bfff3d1218b4d6b3e655c14
parent6da5831969214acd256e624c5ad45c7400eac8a0 (diff)
downloademacs-77d78be1714a34f0225850fadb997ca5fa80fe99.tar.gz
emacs-77d78be1714a34f0225850fadb997ca5fa80fe99.zip
*** empty log message ***
-rw-r--r--etc/MACHINES341
-rw-r--r--src/callproc.c90
2 files changed, 254 insertions, 177 deletions
diff --git a/etc/MACHINES b/etc/MACHINES
index 01eebd5a2ee..377872976fe 100644
--- a/etc/MACHINES
+++ b/etc/MACHINES
@@ -1,19 +1,26 @@
1This is a list of the status of GNU Emacs on various machines and systems. 1This is a list of the status of GNU Emacs on various machines and systems.
2Last updated 27 December 1990. 2Last updated 4 March 1991.
3
4For each system and machine, we give the `-opsystem' and `-machine'
5options you should pass to config.emacs to prepare to build Emacs for
6that system/machine.
7
8These options tell Emacs which machine- and system-descriptive files
9to include. For each `-machine=MACHNAME' option, there exists a file
10`src/m/MACHNAME.h', and for each `-opsystem=OSNAME' option, there
11exists a file `src/s/OSNAME.h'.
3 12
4Systems: 13Systems:
5 For each type of system, the name of the appropriate s- header file
6 is given.
7 14
8Berkeley 4.1 (s-bsd4-1.h) 15Berkeley 4.1 (-opsystem=bsd4-1)
9 16
10 Works on vaxes. 17 Works on vaxes.
11 18
12Berkeley 4.2 (s-bsd4-2.h) 19Berkeley 4.2 (-opsystem=bsd4-2)
13 20
14 Works on several machines. 21 Works on several machines.
15 22
16Berkeley 4.3 (s-bsd4-3.h) 23Berkeley 4.3 (-opsystem=bsd4-3)
17 24
18 Works, on Vaxes at least. 25 Works, on Vaxes at least.
19 26
@@ -21,27 +28,27 @@ Microport
21 28
22 See under "Intel 386". 29 See under "Intel 386".
23 30
24System V rel 0 (s-usg5-0.h) 31System V rel 0 (-opsystem=usg5-0)
25 32
26 Works, on Vaxes and 3bxxx's. 33 Works, on Vaxes and 3bxxx's.
27 There are some problems in 18.37 due to shortnames/cccp problems: 34 There are some problems in 18.37 due to shortnames/cccp problems:
28 use the emacs 17 cpp if you have it. 35 use the emacs 17 cpp if you have it.
29 36
30System V rel 2 (s-usg5-2.h) 37System V rel 2 (-opsystem=usg5-2)
31 38
32 Works on various machines. 39 Works on various machines.
33 On some (maybe all) machines the library -lPW exists and contains 40 On some (maybe all) machines the library -lPW exists and contains
34 a version of `alloca'. On these machines, to use it, put 41 a version of `alloca'. On these machines, to use it, put
35 #define HAVE_ALLOCA 42 #define HAVE_ALLOCA
36 #define LIB_STANDARD -lPW -lc 43 #define LIB_STANDARD -lPW -lc
37 in the m-...h file for the machine. 44 in the src/m/MACHINENAME.h file for the machine.
38 45
39 If you find that the character Meta-DEL makes Emacs crash, 46 If you find that the character Meta-DEL makes Emacs crash,
40 find where function init_sys_modes in sysdep.c sets sg.c_cc[VQUIT] 47 find where function init_sys_modes in sysdep.c sets sg.c_cc[VQUIT]
41 and make it store 7 there. I have as yet no evidence of whether 48 and make it store 7 there. I have as yet no evidence of whether
42 this problem, known in HP-UX, exists in other system V versions. 49 this problem, known in HP-UX, exists in other system V versions.
43 50
44System V rel 2.2 (s-usg5-2-2.h) 51System V rel 2.2 (-opsystem=usg5-2-2)
45 52
46 In 5.2.2 AT&T undid, incompatibly, their previous incompatible 53 In 5.2.2 AT&T undid, incompatibly, their previous incompatible
47 change to the way the nlist library is called. A different s- file 54 change to the way the nlist library is called. A different s- file
@@ -54,7 +61,7 @@ System V rel 2.2 (s-usg5-2-2.h)
54 NO_REMAP. It is not yet known whether this applies to all 61 NO_REMAP. It is not yet known whether this applies to all
55 machines running 5.2.2. 62 machines running 5.2.2.
56 63
57System V rel 3 (s-usg5-3.h) 64System V rel 3 (-opsystem=usg5-3)
58 65
59 Some versions of this system support ptys and BSD-style sockets. 66 Some versions of this system support ptys and BSD-style sockets.
60 On such systems, you should define HAVE_PTYS and HAVE_SOCKETS in config.h. 67 On such systems, you should define HAVE_PTYS and HAVE_SOCKETS in config.h.
@@ -62,7 +69,7 @@ System V rel 3 (s-usg5-3.h)
62 If you want to link Emacs with shared libraries, define 69 If you want to link Emacs with shared libraries, define
63 USG_SHARED_LIBRARIES. 70 USG_SHARED_LIBRARIES.
64 71
65System V rel 4 (s-usg5-4.h) 72System V rel 4 (-opsystem=usg5-4)
66 73
67 Supported, including shared libraries for ELF, but ptys do not 74 Supported, including shared libraries for ELF, but ptys do not
68 work because TIOCGPGRP fails to work on ptys. 75 work because TIOCGPGRP fails to work on ptys.
@@ -75,7 +82,7 @@ System V rel 4 (s-usg5-4.h)
75 The standard C preprocessor generate xmakefile incorrectly. However, 82 The standard C preprocessor generate xmakefile incorrectly. However,
76 /lib/cpp will work, so use `make CPP=/lib/cpp'. 83 /lib/cpp will work, so use `make CPP=/lib/cpp'.
77 84
78Ultrix (s-bsd4-2.h) 85Ultrix (-opsystem=bsd4-2)
79 86
80 DEC's Ultrix OS is essentially Berkeley 4.2. It does not correctly 87 DEC's Ultrix OS is essentially Berkeley 4.2. It does not correctly
81 implement certain features of 4.3. 88 implement certain features of 4.3.
@@ -96,11 +103,11 @@ Ultrix (s-bsd4-2.h)
96 103
97 The problem is said to be gone in UWS version 2.1. 104 The problem is said to be gone in UWS version 2.1.
98 105
99Uniplus 5.2 (s-unipl5-2.h) 106Uniplus 5.2 (-opsystem=unipl5-2)
100 107
101 Works, on Dual machines at least. 108 Works, on Dual machines at least.
102 109
103VMS (s-vms.h) 110VMS (-opsystem=vms)
104 111
105 Works except for certain features (directory listing, dired, 112 Works except for certain features (directory listing, dired,
106 sending and receiving mail) that use synchronous subprocesses. 113 sending and receiving mail) that use synchronous subprocesses.
@@ -114,34 +121,37 @@ VMS (s-vms.h)
114Xenix 121Xenix
115 122
116 Should work in 18.50, but you will need to edit the files 123 Should work in 18.50, but you will need to edit the files
117 etc/Makefile and src/ymakefile 124 lib-src/Makefile and src/ymakefile
118 (see the comments that mention "Xenix" for what to change.) 125 (see the comments that mention "Xenix" for what to change.)
119 Compiling Emacs with -O is said not to work. 126 Compiling Emacs with -O is said not to work.
120 127
121 If you want Emacs to work with Smail (installed as /usr/bin/smail) 128 If you want Emacs to work with Smail (installed as /usr/bin/smail)
122 then add the line #define SMAIL to config.h. 129 then add the line #define SMAIL to config.h.
123 130
124 The file etc/XENIX suggests some useful things to do to Xenix 131 The file share-lib/XENIX suggests some useful things to do to Xenix
125 to make the Emacs meta key work. 132 to make the Emacs meta key work.
126 133
127Machines: 134Machines:
128 For each type of machine, the names of the m- and s- header files
129 are given.
130 135
131Alliant (m-alliant4.h or m-alliant.h or m-alliant1.h; s-bsd4-2.h) 136Alliant (-machine=alliant4, -machine=alliant or -machine=alliant1;
137 -opsystem=bsd4-2)
132 138
133 18.52 works on system version 4. Previous Emacs versions were 139 18.52 works on system version 4. Previous Emacs versions were
134 known to work on previous system versions. 140 known to work on previous system versions.
135 141
136 Use m-alliant1.h on version 1 of their operating system 142 Use -machine=alliant1 on version 1 of their operating system
137 and use m-alliant.h on version 2 or 3. 143 and use -machine=alliant on version 2 or 3.
138 Use m-alliant4.h on version 4. 144 Use -machine=alliant4 on version 4.
145
146Alliant FX/2800 (-machine=alliant-2800; -opsystem=bsd4-3)
147
148 Known to work with 18.58 and OS version 2.2, compiler version 1.3.
139 149
140Altos 3068 (m-altos.h; s-usg5-2.h) 150Altos 3068 (-machine=altos; -opsystem=usg5-2)
141 151
142 18.52 is said to work, provided you don't compile unexec.c with -O. 152 18.52 is said to work, provided you don't compile unexec.c with -O.
143 153
144Amdahl UTS (m-amdahl.h; s-usg5-2-2.h) 154Amdahl UTS (-machine=amdahl; -opsystem=usg5-2-2)
145 155
146 Small changes for 18.38 were merged in 18.39. It is mostly 156 Small changes for 18.38 were merged in 18.39. It is mostly
147 working, but at last report a bug sometimes causes Emacs to 157 working, but at last report a bug sometimes causes Emacs to
@@ -154,21 +164,21 @@ Amdahl UTS (m-amdahl.h; s-usg5-2-2.h)
154 even worth trying to use it. Success was obtained with the 164 even worth trying to use it. Success was obtained with the
155 uts native C compiler on uts version 5.2.5. 165 uts native C compiler on uts version 5.2.5.
156 166
157Apollo running Domain (m-apollo.h; s-bsd4-2.h) 167Apollo running Domain (-machine=apollo; -opsystem=bsd4-2)
158 168
159 18.52 works, to some extent. 169 18.52 works, to some extent.
160 Code for dumping Emacs has been written, but we cannot 170 Code for dumping Emacs has been written, but we cannot
161 distribute it yet. 171 distribute it yet.
162 There are reports of bugs in cc -O on this system. 172 There are reports of bugs in cc -O on this system.
163 173
164 In etc/Makefile, don't expect emacsclient and emacsserver to 174 In lib-src/Makefile, don't expect emacsclient and emacsserver to
165 compile. You might want to remove them from your makefile. 175 compile. You might want to remove them from your makefile.
166 176
167 Supposedly something in dired.c runs into a compiler bug. 177 Supposedly something in dired.c runs into a compiler bug.
168 Paraphrasing the statement should avoid the problem. 178 Paraphrasing the statement should avoid the problem. I have not yet
169 I havenot yet received word as to the exact statement this is. 179 received word as to the exact statement this is.
170 180
171AT&T 3b2, 3b5, 3b15, 3b20 (m-att3b.h; s-usg5-2-2.h) 181AT&T 3b2, 3b5, 3b15, 3b20 (-machine=att3b; -opsystem=usg5-2-2)
172 182
173 Emacs will probably not work with certain kernel constants too small. 183 Emacs will probably not work with certain kernel constants too small.
174 184
@@ -189,17 +199,18 @@ AT&T 3b2, 3b5, 3b15, 3b20 (m-att3b.h; s-usg5-2-2.h)
189 The MAXMEM may also prevent Emacs from running. The file 199 The MAXMEM may also prevent Emacs from running. The file
190 3B-MAXMEM in this directory explains how to increase MAXMEM. 200 3B-MAXMEM in this directory explains how to increase MAXMEM.
191 201
192AT&T 7300 or 3b1 (m-7300.h; s-usg5-2-2.h) 202AT&T 7300 or 3b1 (-machine=7300; -opsystem=usg5-2-2)
193 203
194 18.52 seems to work. If you have strange troubles with dumping Emacs, 204 18.52 seems to work. If you have strange troubles with dumping
195 delete the last few lines from m-7300.h and recompile. These lines 205 Emacs, delete the last few lines from -machine=7300 and recompile.
196 are supposed to produce a sharable executable. 206 These lines are supposed to produce a sharable executable.
197 207
198 m-7300.h defines SHORTNAMES because operating system versions 208 -machine=7300 defines SHORTNAMES because operating system versions
199 older than 3.5 did not support long symbol names. Version 3.5 does 209 older than 3.5 did not support long symbol names. Version 3.5 does
200 support them, so you can remove the #define SHORTNAMES in that version. 210 support them, so you can remove the #define SHORTNAMES in that
211 version.
201 212
202Bull sps7 (m-sps7.h; s-usg5-2.h) 213Bull sps7 (-machine=sps7; -opsystem=usg5-2)
203 214
204 Changes partially merged in version 19, but some fixes are probably required. 215 Changes partially merged in version 19, but some fixes are probably required.
205 216
@@ -207,59 +218,66 @@ CCI 5/32, 6/32
207 218
208 See "Tahoe". 219 See "Tahoe".
209 220
210Celerity (m-celerity.h; s-bsd4-2.h) 221Celerity (-machine=celerity; -opsystem=bsd4-2)
211 222
212 Version 18.49 works. 223 Version 18.49 works.
213 224
214Clipper (m-clipper.h; ???) 225Clipper (-machine=clipper; ???)
215 226
216 Version 19 has support for some brand of clipper system. 227 Version 19 has support for some brand of clipper system.
217 Note that the Orion 105 is also a clipper, but some system-related 228 Note that the Orion 105 is also a clipper, but some system-related
218 parameters are different. 229 parameters are different.
219 230
220Convex (m-convex.h; s-bsd4-3.h) 231Convex (-machine=convex; -opsystem=bsd4-3)
221 232
222 18.53 is supposed to work. 233 18.53 is supposed to work.
223 234
224Cubix QBx/386 (m-intel386.h; s-usg5-3.h) 235Cubix QBx/386 (-machine=intel386; -opsystem=usg5-3)
225 236
226 Changes merged in 19.1. Systems before 2/A/0 may fail to compile etags.c 237 Changes merged in 19.1. Systems before 2/A/0 may fail to compile etags.c
227 due to a compiler bug. 238 due to a compiler bug.
228 239
229Cydra 5 (m-cydra5.h; s-usg5-3.h) 240Cydra 5 (-machine=cydra5; -opsystem=usg5-3)
230 241
231 18.51 worked in one version of their operating system but stopped 242 18.51 worked in one version of their operating system but stopped
232 working in a newer version. This has not been fixed. 243 working in a newer version. This has not been fixed.
233 244
234DECstation (m-pmax.h; s-bsd4-2.h) 245DECstation (-machine=pmax; -opsystem=bsd4-2)
235 246
236 Works, as of 18.55. See under Ultrix for problems using X windows 247 Works, as of 18.55. See under Ultrix for problems using X windows
237 on Ultrix. Note that this is a MIPS machine. 248 on Ultrix. Note that this is a MIPS machine.
249 For Ultrix versions prior to 4.0, you may need to delete
250 the definition of START_FILES from src/m/pmax.h.
238 251
239Delta (m-delta.h; s-usg5-3.h) 252Motorola Delta 147 (-machine=delta; -opsystem=usg5-3)
240 253
241 Motorola Delta boxes running System V/68 release 3. 254 Motorola Delta boxes running System V/68 release 3.
242 (tested on sys1147 with SVR3V5). Changes merged in 19.1. 255 (tested on sys1147 with SVR3V5). Changes merged in 19.1.
243 256
244Dual running System V (m-dual.h; s-usg5-2.h) 257Motorola Delta 187 (-machine=delta88k; -opsystem=usg5-3)
258
259 Machine support added in version 19.
260 HAVE_X_MENU does not work due to lack of insque.
261
262Dual running System V (-machine=dual; -opsystem=usg5-2)
245 263
246 As of 17.46, this works except for a few changes 264 As of 17.46, this works except for a few changes
247 needed in unexec.c. 265 needed in unexec.c.
248 266
249Dual running Uniplus (m-dual.h; s-unipl5-2.h) 267Dual running Uniplus (-machine=dual; -opsystem=unipl5-2)
250 268
251 Works, as of 17.51. 269 Works, as of 17.51.
252 270
253Elxsi 6400 (m-elxsi; s-usg5-2.h) 271Elxsi 6400 (-machine=elxsi; -opsystem=usg5-2)
254 272
255 Changes for 12.0 release are in 19.1. 273 Changes for 12.0 release are in 19.1.
256 Dumping should work now. 274 Dumping should work now.
257 275
258Encore machine (m-ns16000.h; s-umax.h) 276Encore machine (-machine=ns16000; -opsystem=umax)
259 277
260 This machine bizarrely uses 4.2BSD modified to use the COFF format 278 This machine bizarrely uses 4.2BSD modified to use the COFF format
261 for object files. Works (as of 18.40). For the APC processor you 279 for object files. Works (as of 18.40). For the APC processor you
262 must enable two lines at the end of s-umax.h, which are commented 280 must enable two lines at the end of src/s/umax.h, which are commented
263 out in the file as distributed. 281 out in the file as distributed.
264 282
265 WARNING: If you compile Emacs with the "-O" compiler switch, you 283 WARNING: If you compile Emacs with the "-O" compiler switch, you
@@ -269,36 +287,37 @@ Encore machine (m-ns16000.h; s-umax.h)
269 A kernel bug in some system versions causes input characters to be lost 287 A kernel bug in some system versions causes input characters to be lost
270 occasionally. 288 occasionally.
271 289
272GEC 93 (m-gec93.h; s-usg5-2.h?) 290GEC 93 (-machine=gec93; -opsystem=usg5-2?)
273 291
274 Changes are partially merged in version 18, but 292 Changes are partially merged in version 18, but
275 certainly require more work. 293 certainly require more work.
276 294
277Gould Power Node (m-gould.h; s-bsd4-2.h or s-bsd4-3.h) 295Gould Power Node (-machine=gould; -opsystem=bsd4-2 or -opsystem=bsd4-3)
278 296
279 18.36 worked on versions 1.2 and 2.0 of the operating system. 297 18.36 worked on versions 1.2 and 2.0 of the operating system.
280 298
281 On UTX/32 2.0, use s-bsd4-3.h. 299 On UTX/32 2.0, use -opsystem=bsd4-3.
282 300
283 On UTX/32 1.2 and UTX/32S 1.0, use s-bsd4-2.h and note that compiling 301 On UTX/32 1.2 and UTX/32S 1.0, use -opsystem=bsd4-2 and note that
284 etc/sorted-doc tickles a compiler bug: remove the -g flag to cc in the 302 compiling lib-src/sorted-doc tickles a compiler bug: remove the -g
285 makefile. 303 flag to cc in the makefile.
286 304
287 UTX/32 1.3 has a bug in the bcopy library routine. Fix it by 305 UTX/32 1.3 has a bug in the bcopy library routine. Fix it by
288 #undef BSTRING in m-gould.h. 306 #undef BSTRING in -machine=gould.
289 307
290 Version 19 incorporates support for releases 2.1 and later of UTX/32. 308 Version 19 incorporates support for releases 2.1 and later of UTX/32.
291 A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h. 309 A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h.
292 310
293Gould NP1 (m-gould-np1.h; s-bsd4-3.h) 311Gould NP1 (-machine=gould-np1; -opsystem=bsd4-3)
294 312
295 Version 19 supposedly works. 313 Version 19 supposedly works.
296 314
297Honeywell XPS100 (m-xps100.h; s-usg5-2.h) 315Honeywell XPS100 (-machine=xps100; -opsystem=usg5-2)
298 316
299 Config file added in version 19. 317 Config file added in version 19.
300 318
301HP 9000 series 200 or 300 (m-hp9000s300.h; s-hpux.h or s-bsd4-3.h) 319HP 9000 series 200 or 300 (-machine=hp9000s300;
320 -opsystem=hpux or -opsystem=bsd4-3)
302 321
303 Version 18 works. 322 Version 18 works.
304 These machines are 68000-series CPUs running HP-UX 323 These machines are 68000-series CPUs running HP-UX
@@ -328,9 +347,9 @@ HP 9000 series 200 or 300 (m-hp9000s300.h; s-hpux.h or s-bsd4-3.h)
328 that include the `netunam' system call. This is refered to as 347 that include the `netunam' system call. This is refered to as
329 Network Services (NS/9000) in HP literature. 348 Network Services (NS/9000) in HP literature.
330 349
331HP 9000 series 300 running BSD 4.3 (m-hp300bsd.h; s-bsd4-3.h) 350HP 9000 series 300 running BSD 4.3 (-machine=hp300bsd; -opsystem=bsd4-3)
332 351
333 Version 18.55 works. 352 Version 19.1 works.
334 353
335HP 9000 series 500: not supported. 354HP 9000 series 500: not supported.
336 355
@@ -338,18 +357,18 @@ HP 9000 series 500: not supported.
338 which relocates data in memory during execution of a program, 357 which relocates data in memory during execution of a program,
339 and support for it would be difficult to implement. 358 and support for it would be difficult to implement.
340 359
341HP 9000 series 800 (Spectrum) (m-hp9000s800.h; s-hpux.h) 360HP 9000 series 800 (Spectrum) (-machine=hp9000s800; -opsystem=hpux)
342 361
343 These files support HP's Precision Architecture machines 362 These files support HP's Precision Architecture machines
344 running HP-UX. It has been moderately tested on the Series 363 running HP-UX. It has been moderately tested on the Series
345 840. 364 840.
346 365
347High Level Hardware Orion (m-orion.h; s-bsd4-2.h) 366High Level Hardware Orion (-machine=orion; -opsystem=bsd4-2)
348 367
349 This is the original microprogrammed hardware. 368 This is the original microprogrammed hardware.
350 m- file ought to work. 369 Machine description file ought to work.
351 370
352High Level Hardware Orion 1/05 (m-orion105.h; s-bsd4-2.h) 371High Level Hardware Orion 1/05 (-machine=orion105; -opsystem=bsd4-2)
353 372
354 Changes merged in 18.52. This is the one with the Clipper cpu. 373 Changes merged in 18.52. This is the one with the Clipper cpu.
355 Note that systems which lack NFS need LOAD_AVE_TYPE changed to `double'. 374 Note that systems which lack NFS need LOAD_AVE_TYPE changed to `double'.
@@ -357,12 +376,16 @@ High Level Hardware Orion 1/05 (m-orion105.h; s-bsd4-2.h)
357 C compiler has a bug; it loops compiling eval.c. 376 C compiler has a bug; it loops compiling eval.c.
358 Compile it by hand without optimization. 377 Compile it by hand without optimization.
359 378
360IBM PS/2 (m-ibmps2-aix.h; s-usg5-2-2.h) 379IBM PS/2 (-machine=ibmps2-aix; -opsystem=usg5-2-2 or -opsystem=usg5-3)
361 380
362 Changes merged in version 19. You may need to copy 381 Changes merged in version 19. You may need to copy
363 /usr/lib/samples/hft/hftctl.c to the Emacs src directory. 382 /usr/lib/samples/hft/hftctl.c to the Emacs src directory.
364 383
365IBM RS/6000 (m-ibmrs6000.h; s-aix3-1.h) 384 Use -opsystem=usg5-3 on AIX 1.2.
385 -opsystem=usg5-2-2 should work on either AIX 1.1 or 1.2, but may not
386 work with certain new X window managers, and may be suboptimal.
387
388IBM RS/6000 (-machine=ibmrs6000; -opsystem=aix3-1)
366 389
367 Changes merged in version 19. 390 Changes merged in version 19.
368 391
@@ -372,10 +395,12 @@ IBM RS/6000 (m-ibmrs6000.h; s-aix3-1.h)
372 but every few days or weeks it changes to a new steady state. 395 but every few days or weeks it changes to a new steady state.
373 When this happens, the dumped Emacs data file becomes invalid. 396 When this happens, the dumped Emacs data file becomes invalid.
374 397
375IBM RT/PC (m-ibmrt.h or m-ibmrt-aix.h; s-bsd4-2.h or s-usg5-2-2.h) 398IBM RT/PC (-machine=ibmrt or -machine=ibmrt-aix;
399 -opsystem=bsd4-2 or -opsystem=usg5-2-2)
376 400
377 18.52 works on both operating systems. 401 18.52 works on both operating systems.
378 Use s-bsd-4-2.h for the 4.2-like system and s-usg5-2-2.h for AIX. 402 Use -opsystem=bsd4-2 for the 4.2-like system and -opsystem=usg5-2-2
403 for AIX.
379 404
380 On BSD, if you have trouble, try compiling with a different compiler. 405 On BSD, if you have trouble, try compiling with a different compiler.
381 406
@@ -385,7 +410,8 @@ IBM RT/PC (m-ibmrt.h or m-ibmrt-aix.h; s-bsd4-2.h or s-usg5-2-2.h)
385 410
386 window.c must not be compiled with -O on AIX. 411 window.c must not be compiled with -O on AIX.
387 412
388Integrated Solutions `Optimum V' (m-isi-ov.h; s-bsd4-2.h or s-bsd4-3.h) 413Integrated Solutions `Optimum V' (-machine=isi-ov;
414 -opsystem=bsd4-2 or -opsystem=bsd4-3)
389 415
390 18.52 said to work on some sort of ISI machine. 416 18.52 said to work on some sort of ISI machine.
391 Version 18.45 worked (running on a Optimum V (VME bus, 68020) 417 Version 18.45 worked (running on a Optimum V (VME bus, 68020)
@@ -397,14 +423,19 @@ Integrated Solutions `Optimum V' (m-isi-ov.h; s-bsd4-2.h or s-bsd4-3.h)
397 Compilation with -O is rumored to break something. 423 Compilation with -O is rumored to break something.
398 424
399 On recent system versions, you may need to undefine the macro UMAX 425 On recent system versions, you may need to undefine the macro UMAX
400 in etc/loadst.c and src/getpagesize.h. They stupidly defined this 426 in lib-src/loadst.c and src/getpagesize.h. They stupidly defined this
401 in a system header file, which confuses Emacs (which thinks that UMAX 427 in a system header file, which confuses Emacs (which thinks that UMAX
402 indicates the Umax operating system). 428 indicates the Umax operating system).
403 429
404Intel 80386 (m-intel386.h or m-is386.h; s-bsd4-2.h, s-usg5-2-2.h, s-usg5-3.h, 430Intel 386 (-machine=intel386 or -machine=is386;
405 s-386-ix.h, s-esix.h or s-xenix.h) 431 -opsystem=bsd4-2, usg5-2-2, usg5-3, isc2-2, 386-ix,
432 esix, or xenix)
433
434 18.58 should support a wide variety of operating systems.
435 Use -opsystem=isc2-2 for Interactive 386/ix version 2.2.
436 Use -opsystem=386ix for prior versions.
437 Use -opsystem=esix for Esix. It isn't clear what to do on an SCO system.
406 438
407 Changes merged in 18.50 for all three operating systems.
408 If you are using Xenix, see notes above under Xenix. 439 If you are using Xenix, see notes above under Xenix.
409 440
410 Some sysV.3 systems seem to have bugs in `opendir'; 441 Some sysV.3 systems seem to have bugs in `opendir';
@@ -437,20 +468,20 @@ Intel 80386 (m-intel386.h or m-is386.h; s-bsd4-2.h, s-usg5-2-2.h, s-usg5-3.h,
437 but define `struct tc' instead; add `#define tchars tc' 468 but define `struct tc' instead; add `#define tchars tc'
438 to config.h to solve this problem. 469 to config.h to solve this problem.
439 470
440 The file m-is386.h is used for an Integrated Solutions 386 machine. 471 The file -machine=is386 is used for an Integrated Solutions 386 machine.
441 It may also be correct for Microport systems. 472 It may also be correct for Microport systems.
442 473
443Iris 2500 (m-irist.h; s-iris3-5.h or s-iris3-6.h) 474Iris 2500 (-machine=irist; -opsystem=iris3-5 or -opsystem=iris3-6)
444 475
445 Version 18 said to work; use s-irist3-5.h for system version 2.5 476 Version 18 said to work; use -opsystem=irist3-5 for system version 2.5
446 and s-iris3-6.h for system version 3.6. 477 and -opsystem=iris3-6 for system version 3.6.
447 478
448Iris 2500 Turbo (m-irist.h; s-iris3-5.h or s-iris3-6.h) 479Iris 2500 Turbo (-machine=irist; -opsystem=iris3-5 or -opsystem=iris3-6)
449 480
450 18.49 works. Use s-iris3-6.h for system versions 3.6 and up. 481 18.49 works. Use -opsystem=iris3-6 for system versions 3.6 and up.
451 Note that the 3030 is the same machine as this. 482 Note that the 3030 is the same machine as this.
452 483
453Iris 4D (m-iris4d.h; s-iris3-6.h or s-irix3-3.h) 484Iris 4D (-machine=iris4d; -opsystem=irix3-3)
454 485
455 18.56 is known to work on 4D series machines with Irix 3.3 or later. 486 18.56 is known to work on 4D series machines with Irix 3.3 or later.
456 487
@@ -459,12 +490,15 @@ Iris 4D (m-iris4d.h; s-iris3-6.h or s-irix3-3.h)
459 490
460 RANLIB=true 491 RANLIB=true
461 492
462 Someone says that with the yellow pages you must change two definitions 493 Someone said that with the yellow pages you must change two definitions
463 in m-iris4d.h as follows: 494 in -machine=iris4d as follows:
464 495
465 #define LIBS_MACHINE -lsun -lbsd -lPW -lmld 496 #define LIBS_MACHINE -lsun -lbsd -lPW -lmld
466 #define C_SWITCH_MACHINE -I/usr/include/sun -I/usr/include/bsd 497 #define C_SWITCH_MACHINE -I/usr/include/sun -I/usr/include/bsd
467 498
499 jg@bambi.esd.sgi.com says this isn't true anymore,
500 but the info might as well be here just in case.
501
468Macintosh 502Macintosh
469 503
470 We are boycotting Apple because of Apple's efforts to take away 504 We are boycotting Apple because of Apple's efforts to take away
@@ -475,7 +509,7 @@ Macintosh
475 509
476 See the file APPLE in this directory for more information. 510 See the file APPLE in this directory for more information.
477 511
478Masscomp (m-masscomp.h; s-rtu.h) 512Masscomp (-machine=masscomp; -opsystem=rtu)
479 513
480 18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2 514 18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2
481 with minor fixes that are included in 18.37. However, bizarre behavior 515 with minor fixes that are included in 18.37. However, bizarre behavior
@@ -488,73 +522,74 @@ Masscomp (m-masscomp.h; s-rtu.h)
488 to take the time to install the numerous workarounds required to 522 to take the time to install the numerous workarounds required to
489 compensate for this bug; go complain to Masscomp. 523 compensate for this bug; go complain to Masscomp.
490 524
491 For RTU version 3.1, define FIRST_PTY_LETTER to be 'p' in s-rtu.h 525 For RTU version 3.1, define FIRST_PTY_LETTER to be 'p' in src/s/rtu.h
492 (or #undef and redefine it in config.h) so that ptys will be used. 526 (or #undef and redefine it in config.h) so that ptys will be used.
493 527
494 GNU Emacs is said to have no chance of compiling on RTU versions 528 GNU Emacs is said to have no chance of compiling on RTU versions
495 prior to v3.0. 529 prior to v3.0.
496 530
497Megatest (m-mega68.h; s-bsd4-2.h) 531Megatest (-machine=mega68; -opsystem=bsd4-2)
498 532
499 Emacs 15 worked; do not have any reports about Emacs 16 or 17 533 Emacs 15 worked; do not have any reports about Emacs 16 or 17
500 but any new bugs are probably not difficult. 534 but any new bugs are probably not difficult.
501 535
502Mips (m-mips.h or m-mips4.h; s-usg5-2-2.h, s-bsd4-3.h) 536Mips (-machine=mips or -machine=mips4; -opsystem=usg5-2-2, -opsystem=bsd4-3)
503 537
504 Changes merged in 18.39. Some fixes in 18.56. 538 Changes merged in 18.39. Some fixes in 18.56.
505 539
506 Use m-mips4.h for RISCOS version 4; use s-bsd4-3.h with the BSD world. 540 Use -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
541 the BSD world.
507 542
508Motorola Delta (m-delta.h; s-usg5-3.h) 543Motorola Delta (-machine=delta; -opsystem=usg5-3)
509 544
510 m- file added in version 18.56. 545 Machine support added in version 18.56.
511 546
512National Semiconductor 32000 (m-ns32000.h; s-usg5-2.h) 547National Semiconductor 32000 (-machine=ns32000; -opsystem=usg5-2)
513 548
514 This is for a complete machine from National Semiconductor, 549 This is for a complete machine from National Semiconductor,
515 running Genix. Changes merged in version 19. 550 running Genix. Changes merged in version 19.
516 551
517NCR Tower 32 running System V release 2 (m-tower32.h; s-usg5-2-2.h) 552NCR Tower 32 running System V release 2 (-machine=tower32; -opsystem=usg5-2-2)
518 553
519 Works as of 17.56. If you change src/ymakefile so that CFLAGS includes 554 Works as of 17.56. If you change src/ymakefile so that CFLAGS includes
520 C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, check out the comments 555 C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, check out the comments
521 in src/m-tower32.h about this. 556 in src/m/tower32.h about this.
522 557
523 There is a report that compilation with -O did not work with 18.54. 558 There is a report that compilation with -O did not work with 18.54.
524 559
525NCR Tower 32 running System V release 3 (m-tower32v3.h; s-usg5-3.h) 560NCR Tower 32 running System V release 3 (-machine=tower32v3; -opsystem=usg5-3)
526 561
527 Works as of 18.56. If you change src/ymakefile so that CFLAGS includes 562 Works as of 18.56. If you change src/ymakefile so that CFLAGS includes
528 C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, and do not use gcc, check 563 C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, and do not use gcc, check
529 out the comments in src/m-tower32v3.h about this. 564 out the comments in src/m/tower32v3.h about this.
530 565
531Nixdorf Targon 31 (m-targon31.h; s-usg5-2-2.h) 566Nixdorf Targon 31 (-machine=targon31; -opsystem=usg5-2-2)
532 567
533 m- file for version 17 is included in 18 568 Machine description file for version 17 is included in 18
534 but whether it works is not known. 569 but whether it works is not known.
535 src/unexec.c bombs if compiled with -O. 570 src/unexec.c bombs if compiled with -O.
536 Note that the "Targon 35" is really a Pyramid. 571 Note that the "Targon 35" is really a Pyramid.
537 572
538Nu (TI or LMI) (m-nu.h; s-usg5-2.h) 573Nu (TI or LMI) (-machine=nu; -opsystem=usg5-2)
539 574
540 Version 18 is believed to work. 575 Version 18 is believed to work.
541 576
542Plexus (m-plexus.h; s-usg5-2.h) 577Plexus (-machine=plexus; -opsystem=usg5-2)
543 578
544 Works as of 17.56. 579 Works as of 17.56.
545 580
546Pmax (DEC Mips) (m-pmax.h; s-bsd4-2.h) 581Pmax (DEC Mips) (-machine=pmax; -opsystem=bsd4-2)
547 582
548 See under DECstation, above. 583 See under DECstation, above.
549 584
550Prime EXL (m-intel386.h; s-usg5-3.h) 585Prime EXL (-machine=intel386; -opsystem=usg5-3)
551 586
552 Minor changes merged in 19.1. 587 Minor changes merged in 19.1.
553 588
554Pyramid (m-pyramid.h; s-bsd4-2.h) 589Pyramid (-machine=pyramid; -opsystem=bsd4-2)
555 590
556 In OSx 4.0, it seems necessary to add the following two lines 591 In OSx 4.0, it seems necessary to add the following two lines
557 to m-pyramid.h: 592 to src/m/pyramid.h:
558 #define _longjmp longjmp 593 #define _longjmp longjmp
559 #define _setjmp setjmp 594 #define _setjmp setjmp
560 595
@@ -565,26 +600,29 @@ Pyramid (m-pyramid.h; s-bsd4-2.h)
565 600
566 Some versions of the pyramid compiler get fatal 601 Some versions of the pyramid compiler get fatal
567 errors when the -gx compiler switch is used; if this 602 errors when the -gx compiler switch is used; if this
568 happens to you, change src/m-pyramid.h to define 603 happens to you, change src/m/pyramid.h to define
569 C_DEBUG_SWITCH with an empty definition. 604 C_DEBUG_SWITCH with an empty definition.
570 605
571 Some old system versions may require you to define PYRAMID_OLD 606 Some old system versions may require you to define PYRAMID_OLD
572 in when alloca.s is preprocessed, in order to define _longjmp and _setjmp. 607 in when alloca.s is preprocessed, in order to define _longjmp and _setjmp.
573 608
574Sequent Balance (m-sequent.h; s-bsd4-2.h, or s-bsd4-3.h on newer systems) 609Sequent Balance (-machine=sequent;
610 -opsystem=bsd4-2, or -opsystem=bsd4-3 on newer systems)
575 611
576 Emacs 18.51 should work on system version 3.0. 18.52 is said to work. 612 Emacs 18.51 should work on system version 3.0. 18.52 is said to work.
577 Delete some lines at the end of m-sequent.h for earlier system versions. 613 Delete some lines at the end of src/m/sequent.h for earlier system
614 versions.
578 615
579Sequent Symmetry (m-symmetry.h; s-bsd4-3.h) 616Sequent Symmetry (-machine=symmetry; -opsystem=bsd4-3)
580 617
581 Emacs 19 should work. 618 Emacs 19 should work.
582 619
583SONY News (m-news.h; s-bsd4-2.h, or s-bsd4-3.h for system release 3) 620SONY News (-machine=news;
621 -opsystem=bsd4-2, or -opsystem=bsd4-3 for system release 3)
584 622
585 18.52 should work. 623 18.52 should work.
586 624
587SONY News 3000 series (RISC NEWS) (m-news-risc.h; s-bsd4-3.h) 625SONY News 3000 series (RISC NEWS) (-machine=news-risc; -opsystem=bsd4-3)
588 626
589 Works, as of 18.56. Note that this is a MIPS architecture machine. 627 Works, as of 18.56. Note that this is a MIPS architecture machine.
590 628
@@ -592,24 +630,26 @@ Stardent 1500 or 3000
592 630
593 See Titan. 631 See Titan.
594 632
595Stride (m-stride.h; s-usg5-2.h) 633Stride (-machine=stride; -opsystem=usg5-2)
596 634
597 Works (most recent news for 18.30) on their release 2.0. 635 Works (most recent news for 18.30) on their release 2.0.
598 For release 2.2, see the end of m-stride.h. 636 For release 2.2, see the end of src/m/stride.h.
599 It may be possible to run on their V.1 system but changes 637 It may be possible to run on their V.1 system but changes
600 in the s- file would be needed. 638 in the s- file would be needed.
601 639
602Sun 1, 2 and 3 (m-sun1.h, m-sun2.h, m-sun3.h; s-bsd4-2.h or s-sunos4.h) 640Sun 1, 2 and 3 (-machine=sun1, -machine=sun2, -machine=sun3;
641 -opsystem=bsd4-2, sunos4-0, or sunos4-1)
603 642
604 There are three m- files for different versions of SunOS. 643 There are three machine files for different versions of SunOS.
605 All are derived from Berkeley 4.2. Emacs 17 has run on all of them. 644 All are derived from Berkeley 4.2. Emacs 17 has run on all of them.
606 Whether you should use m-sun1.h, m-sun2.h or m-sun3.h depends 645 Whether you should use -machine=sun1, -machine=sun2 or -machine=sun3
607 on the VERSION OF THE OPERATING SYSTEM you have. 646 depends on the VERSION OF THE OPERATING SYSTEM you have.
608 You will need to use m-sun3.h on Sun 2's running SunOS release 3. 647 You will need to use -machine=sun3 on Sun 2's running SunOS release 3.
609 648
610 For SunOS release 4 on a Sun 3, use m-sun3.h and s-sunos4.h. 649 For SunOS release 4 on a Sun 3, use -machine=sun3 and
611 See the file etc/SUNBUG for how to solve problems caused by bugs in 650 -opsystem=sunos4-0 or -opsystem=sunos4-1.
612 the "export" version of SunOS 4. 651 See the file share-lib/SUNBUG for how to solve problems caused by
652 bugs in the "export" version of SunOS 4.
613 653
614 If you have trouble using open-network-stream, get the 654 If you have trouble using open-network-stream, get the
615 distribution of `bind' (the BSD name-server), build libresolv.a, 655 distribution of `bind' (the BSD name-server), build libresolv.a,
@@ -618,7 +658,7 @@ Sun 1, 2 and 3 (m-sun1.h, m-sun2.h, m-sun3.h; s-bsd4-2.h or s-sunos4.h)
618 658
619 If you want to use SunWindows, define HAVE_SUN_WINDOWS 659 If you want to use SunWindows, define HAVE_SUN_WINDOWS
620 in config.h to enable a special interface called `emacstool'. 660 in config.h to enable a special interface called `emacstool'.
621 The definition must *precede* the #include "m-sun3.h". 661 The definition must *precede* the #include "machine.h".
622 System version 3.2 is required for this facility to work. 662 System version 3.2 is required for this facility to work.
623 663
624 We recommend that you instead use the X window system, which 664 We recommend that you instead use the X window system, which
@@ -627,7 +667,7 @@ Sun 1, 2 and 3 (m-sun1.h, m-sun2.h, m-sun3.h; s-bsd4-2.h or s-sunos4.h)
627 667
628 If you are compiling for X windows, and the X window library was 668 If you are compiling for X windows, and the X window library was
629 compiled to use the 68881, then you must edit config.h according 669 compiled to use the 68881, then you must edit config.h according
630 the comments at the end of m-sun3.h. 670 the comments at the end of -machine=sun3.
631 671
632 Note that Emacs on a Sun is not really as big as it looks. 672 Note that Emacs on a Sun is not really as big as it looks.
633 As dumped, it includes around 200k of zeros between the 673 As dumped, it includes around 200k of zeros between the
@@ -638,82 +678,97 @@ Sun 1, 2 and 3 (m-sun1.h, m-sun2.h, m-sun3.h; s-bsd4-2.h or s-sunos4.h)
638 To build a single Emacs that will run on Sun 2 and Sun 3 678 To build a single Emacs that will run on Sun 2 and Sun 3
639 HARDWARE, just build it on the Sun 2. 679 HARDWARE, just build it on the Sun 2.
640 680
641Sun 4 (m-sparc.h; s-bsd4-2.h or s-sunos4.h) 681Sun 4 (-machine=sparc;
682 -opsystem=bsd4-2, -opsystem=sunos4-0, -opsystem=sunos4-1)
642 683
643 Changes merged in 18.50. Some people say optimizing compilation 684 Changes merged in 18.50. Some people say optimizing compilation
644 does not work; some say that -O2 (whatever that is) works 685 does not work; some say that -O2 (whatever that is) works
645 perhaps with a small change. 686 perhaps with a small change.
646 687
647 Use s-sunos4.h for operating system version 4. 688 Use -opsystem=sunos4-0 for operating system version 4.0, and
648 See the file etc/SUNBUG for how to solve problems caused by bugs in 689 -opsystem=sunos4-1 for later versions.
649 the "export" version of SunOS 4. 690 See the file share-lib/SUNBUG for how to solve problems caused by
691 bugs in the "export" version of SunOS 4.
650 692
651Sun Roadrunner (m-sun386.h; s-sunos4.h) 693Sun Roadrunner (-machine=sun386; -opsystem=sunos4-0 or -opsystem=sunos4-1)
652 694
653 Changes merged in 18.51. 695 Changes merged in 18.51.
654 696
655Tahoe (m-tahoe.h; s-bsd4-2.h or s-bsd4-3.h) 697Tadpole 68K (-machine=tad68k; -opsystem=usg5-3)
698
699 Changes merged in 19.1.
700
701 You may need to edit Makefile to change the variables LIBDIR and
702 BINDIR from /usr/local to /usr/contrib.
703
704 To give movemail access to /usr/mail, you may need to execute
705
706 chmod 2755 etc/movemail; chgrp mail etc/movemail
707
708Tahoe (-machine=tahoe; -opsystem=bsd4-2 or -opsystem=bsd4-3)
656 709
657 18.52 known to work on some Tahoes, but a compiler bug intervenes 710 18.52 known to work on some Tahoes, but a compiler bug intervenes
658 on others. Some Emacs versions have worked in Unisys 1r4 711 on others. Some Emacs versions have worked in Unisys 1r4
659 (not in 1r3) and CCI I.21. 712 (not in 1r3) and CCI I.21.
660 713
661 If you have trouble compiling etc/loadst.c, turn off the definition 714 If you have trouble compiling lib-src/loadst.c, turn off the definition
662 of DKSTAT_HEADER_FILE in m-tahoe.h. 715 of DKSTAT_HEADER_FILE in -machine=tahoe.
663 716
664Tandem Integrity S2 (m-tandem-s2.h; s-usg5-3.h) 717Tandem Integrity S2 (-machine=tandem-s2; -opsystem=usg5-3)
665 718
666 Changes merged in 18.56 but subprocess support is turned off. 719 Changes merged in 18.56 but subprocess support is turned off.
667 You will probably want to see if you can make subprocesses work. 720 You will probably want to see if you can make subprocesses work.
668 721
669 You must edit etc/Makefile to define LOADLIBES = -mld. 722 You must edit lib-src/Makefile to define LOADLIBES = -mld.
670 723
671Tektronix 16000 box (6130?) (m-ns16000.h; s-bsd4-2.h) 724Tektronix 16000 box (6130?) (-machine=ns16000; -opsystem=bsd4-2)
672 725
673 Emacs 17.61 worked. 726 Emacs 17.61 worked.
674 727
675Tektronix 4300 (m-tex4300.h; s-bsd4-3.h) 728Tektronix 4300 (-machine=tek4300; -opsystem=bsd4-3)
676 729
677 Emacs 18.51 should work. 730 Emacs 18.51 should work.
678 731
679Titan P2 or P3 (m-titan.h; s-usg5-3.h) 732Titan P2 or P3 (-machine=titan; -opsystem=usg5-3)
680 733
681 Changes probably merged in version 19. 734 Changes probably merged in version 19.
682 735
683Ustation E30 (SS5E) (m-ustation.h; s-unipl5-2.h). 736Ustation E30 (SS5E) (-machine=ustation; -opsystem=unipl5-2).
684 737
685 Changes merged in 18.52; don't know whether they work. 738 Changes merged in 18.52; don't know whether they work.
686 739
687Vax running Berkeley Unix (m-vax.h; s-bsd4-1.h, s-bsd4-2.h or s-bsd4-3.h) 740Vax running Berkeley Unix (-machine=vax;
741 -opsystem=bsd4-1, bsd4-2 or bsd4-3)
688 742
689 Works. 743 Works.
690 744
691Vax running Ultrix (m-vax.h; s-bsd4-2.h) 745Vax running Ultrix (-machine=vax; -opsystem=bsd4-2)
692 746
693 Works. See under Ultrix for problems using X windows on Ultrix. 747 Works. See under Ultrix for problems using X windows on Ultrix.
694 748
695Vax running System V rel 2 (m-vax.h; s-usg5-2.h) 749Vax running System V rel 2 (-machine=vax; -opsystem=usg5-2)
696 750
697 18.27 Works. 751 18.27 Works.
698 752
699Vax running System V rel 0 (m-vax.h; s-usg5-0.h) 753Vax running System V rel 0 (-machine=vax; -opsystem=usg5-0)
700 754
701 Works as of 18.36. 755 Works as of 18.36.
702 756
703Vax running VMS (m-vax.h; s-vms.h but on VMS they are m_vax.h and s_vms.h) 757Vax running VMS (-machine=vax; -opsystem=vms
758 but on VMS they are m_vax.h and s_vms.h)
704 759
705 18.36 believed to work. Addition of features is necessary to make 760 18.36 believed to work. Addition of features is necessary to make
706 this Emacs version more usable. 761 this Emacs version more usable.
707 762
708Whitechapel MG1 (m-mg1.h, s-?) 763Whitechapel MG1 (-machine=mg1, s-?)
709 764
710 May work. Supposedly no changes were needed except the m- file. 765 May work. Supposedly no changes were needed except the m- file.
711 I do not know what Unix version runs on them. 766 I do not know what Unix version runs on them.
712 767
713Wicat (m-wicat.h; s-usg5-2.h) 768Wicat (-machine=wicat; -opsystem=usg5-2)
714 769
715 Changes merged as of 18.6; whether they work is unknown. 770 Changes merged as of 18.6; whether they work is unknown.
716 See comments in m-wicat.h for things you should change 771 See comments in src/m/wicat.h for things you should change
717 depending on the system and compiler version you have. 772 depending on the system and compiler version you have.
718 773
719Local variables: 774Local variables:
diff --git a/src/callproc.c b/src/callproc.c
index e033a8bf018..e9374aabe13 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -19,6 +19,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19 19
20 20
21#include <signal.h> 21#include <signal.h>
22#include <errno.h>
22 23
23#include "config.h" 24#include "config.h"
24 25
@@ -104,7 +105,7 @@ If you quit, the process is killed with SIGKILL.")
104 int nargs; 105 int nargs;
105 register Lisp_Object *args; 106 register Lisp_Object *args;
106{ 107{
107 Lisp_Object display, buffer, path; 108 Lisp_Object display, infile, buffer, path, current_dir;
108 int fd[2]; 109 int fd[2];
109 int filefd; 110 int filefd;
110 register int pid; 111 register int pid;
@@ -118,23 +119,27 @@ If you quit, the process is killed with SIGKILL.")
118#endif 119#endif
119 CHECK_STRING (args[0], 0); 120 CHECK_STRING (args[0], 0);
120 121
121 if (nargs <= 1 || NILP (args[1])) 122 if (nargs >= 2 && ! NILP (args[1]))
122 args[1] = build_string ("/dev/null"); 123 {
124 infile = Fexpand_file_name (args[1], current_buffer->directory);
125 CHECK_STRING (infile, 1);
126 }
123 else 127 else
124 args[1] = Fexpand_file_name (args[1], current_buffer->directory); 128 infile = build_string ("/dev/null");
125
126 CHECK_STRING (args[1], 1);
127 129
128 { 130 {
129 register Lisp_Object tem; 131 register Lisp_Object tem;
130 buffer = tem = args[2]; 132 if (nargs < 3)
131 if (nargs <= 2)
132 buffer = Qnil; 133 buffer = Qnil;
133 else if (!(EQ (tem, Qnil) || EQ (tem, Qt) 134 else
134 || XFASTINT (tem) == 0))
135 { 135 {
136 buffer = Fget_buffer (tem); 136 buffer = tem = args[2];
137 CHECK_BUFFER (buffer, 2); 137 if (!(EQ (tem, Qnil) || EQ (tem, Qt)
138 || XFASTINT (tem) == 0))
139 {
140 buffer = Fget_buffer (tem);
141 CHECK_BUFFER (buffer, 2);
142 }
138 } 143 }
139 } 144 }
140 145
@@ -152,10 +157,10 @@ If you quit, the process is killed with SIGKILL.")
152 new_argv[i - 3] = 0; 157 new_argv[i - 3] = 0;
153 } 158 }
154 159
155 filefd = open (XSTRING (args[1])->data, O_RDONLY, 0); 160 filefd = open (XSTRING (infile)->data, O_RDONLY, 0);
156 if (filefd < 0) 161 if (filefd < 0)
157 { 162 {
158 report_file_error ("Opening process input file", Fcons (args[1], Qnil)); 163 report_file_error ("Opening process input file", Fcons (infile, Qnil));
159 } 164 }
160 /* Search for program; barf if not found. */ 165 /* Search for program; barf if not found. */
161 openp (Vexec_path, args[0], "", &path, 1); 166 openp (Vexec_path, args[0], "", &path, 1);
@@ -177,6 +182,14 @@ If you quit, the process is killed with SIGKILL.")
177#endif 182#endif
178 } 183 }
179 184
185 /* Make sure that the child will be able to chdir to the current
186 buffer's current directory. We can't just have the child check
187 for an error when it does the chdir, since it's in a vfork. */
188 current_dir = expand_and_dir_to_file (current_buffer->directory, Qnil);
189 if (NILP (Ffile_accessible_directory_p (current_dir)))
190 report_file_error ("Setting current directory",
191 Fcons (current_buffer->directory, Qnil));
192
180 { 193 {
181 /* child_setup must clobber environ in systems with true vfork. 194 /* child_setup must clobber environ in systems with true vfork.
182 Protect it from permanent change. */ 195 Protect it from permanent change. */
@@ -204,7 +217,7 @@ If you quit, the process is killed with SIGKILL.")
204#else 217#else
205 setpgrp (pid, pid); 218 setpgrp (pid, pid);
206#endif /* USG */ 219#endif /* USG */
207 child_setup (filefd, fd1, fd1, new_argv, env, 0); 220 child_setup (filefd, fd1, fd1, new_argv, env, 0, current_dir);
208 } 221 }
209 222
210#if 0 223#if 0
@@ -338,13 +351,19 @@ If you quit, the process is killed with SIGKILL.")
338 ENV is the environment for the subprocess. 351 ENV is the environment for the subprocess.
339 352
340 SET_PGRP is nonzero if we should put the subprocess into a separate 353 SET_PGRP is nonzero if we should put the subprocess into a separate
341 process group. */ 354 process group.
355
356 CURRENT_DIR is an elisp string giving the path of the current
357 directory the subprocess should have. Since we can't really signal
358 a decent error from within the child, this should be verified as an
359 executable directory by the parent. */
342 360
343child_setup (in, out, err, new_argv, env, set_pgrp) 361child_setup (in, out, err, new_argv, env, set_pgrp, current_dir)
344 int in, out, err; 362 int in, out, err;
345 register char **new_argv; 363 register char **new_argv;
346 char **env; 364 char **env;
347 int set_pgrp; 365 int set_pgrp;
366 Lisp_Object current_dir;
348{ 367{
349 register int pid = getpid(); 368 register int pid = getpid();
350 369
@@ -361,21 +380,24 @@ child_setup (in, out, err, new_argv, env, set_pgrp)
361 the superior's static variables as if the superior had done alloca 380 the superior's static variables as if the superior had done alloca
362 and will be cleaned up in the usual way. */ 381 and will be cleaned up in the usual way. */
363 382
364 if (XTYPE (current_buffer->directory) == Lisp_String) 383 {
365 { 384 register unsigned char *temp;
366 register unsigned char *temp; 385 register int i;
367 register int i; 386
368 387 i = XSTRING (current_dir)->size;
369 i = XSTRING (current_buffer->directory)->size; 388 temp = (unsigned char *) alloca (i + 2);
370 temp = (unsigned char *) alloca (i + 2); 389 bcopy (XSTRING (current_dir)->data, temp, i);
371 bcopy (XSTRING (current_buffer->directory)->data, temp, i); 390 if (temp[i - 1] != '/') temp[i++] = '/';
372 if (temp[i - 1] != '/') temp[i++] = '/'; 391 temp[i] = 0;
373 temp[i] = 0; 392
374 /* Switch to that directory, and report any error. */ 393 /* We can't signal an Elisp error here; we're in a vfork. Since
375 if (chdir (temp) < 0) 394 the callers check the current directory before forking, this
376 report_file_error ("In chdir", 395 should only return an error if the directory's permissions
377 Fcons (current_buffer->directory, Qnil)); 396 are changed between the check and this chdir, but we should
378 } 397 at least check. */
398 if (chdir (temp) < 0)
399 exit (errno);
400 }
379 401
380 /* Set `env' to a vector of the strings in Vprocess_environment. */ 402 /* Set `env' to a vector of the strings in Vprocess_environment. */
381 { 403 {
@@ -435,7 +457,7 @@ getenv_internal (var, varlen, value, valuelen)
435 char *var; 457 char *var;
436 int varlen; 458 int varlen;
437 char **value; 459 char **value;
438 int **valuelen; 460 int *valuelen;
439{ 461{
440 Lisp_Object scan; 462 Lisp_Object scan;
441 463
@@ -448,7 +470,7 @@ getenv_internal (var, varlen, value, valuelen)
448 && XSTRING (entry)->data[varlen] == '=' 470 && XSTRING (entry)->data[varlen] == '='
449 && ! bcmp (XSTRING (entry)->data, var, varlen)) 471 && ! bcmp (XSTRING (entry)->data, var, varlen))
450 { 472 {
451 *value = XSTRING (entry)->data + (varlen + 1); 473 *value = (char *) XSTRING (entry)->data + (varlen + 1);
452 *valuelen = XSTRING (entry)->size - (varlen + 1); 474 *valuelen = XSTRING (entry)->size - (varlen + 1);
453 return 1; 475 return 1;
454 } 476 }