wilkes@mips.COM (John Wilkes) (07/12/90)
Well, I finally did it last night. Thanks to those who sent mail saying that they had done it, but the sources were offline. This bit of encouragement was what I needed to press on. Here's the secret for getting a dumpable gnu emacs under esix. The main culprit seems to be the file sysdep.c, which does things based on certain things having been defined in the header files. If TIOCGWINSZ or TIOCGETC is defined, certain assumptions are made. These assumptions are incorrect for ESIX, and confusion results. (Note: the "less" program has the same problem and needs a similar hack in, if memory serves, screen.c) I added a pre-processor symbol, ESIX (which I #define'd in config.h,) and made the following changes to sysdep.c: Right after this: > #ifdef XENIX > #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ > #endif I added this: > #ifdef ESIX /* Maybe other i386 merged SysV/Xenix products? */ > #undef TIOCGETC /* Avoid confusing some conditionals that test this. */ > #undef TIOCGWINSZ > #endif And I conditionalized not including <sys/sioctl.h> (though this is not necessary with the undef's above.) > #ifdef TIOCGWINSZ > #ifndef IRIS_4D > #ifndef mips > #ifndef ESIX /* and other merged Xenix/SysV platforms? */ > /* Some USG systems with TIOCGWINSZ need this file; some don't have it. > We don't know how to distinguish them. > If this #include gets an error, just delete it. */ > #include <sys/sioctl.h> > #endif /* not esix */ > #endif /* not mips */ > #endif /* not iris_4d */ I defined HAVE_PTYS and SYSV_PTYS s-usg5-3.h, but changed nothing else in the distributed file. If you want sockets, or X, or bsd bcopy() and friends, you're on your own! Don't be fooled by this: * Define HAVE_TIMEVAL if the system supports the BSD style clock values. * Look in <sys/time.h> for a timeval structure. You'll see a timeval structure if you look, but defining HAVE_TIMEVAL causes undefined symbols at load time. Now I need to get GNU diff so I can make proper context diffs... Hope this helps some other folks. -wilkes -- John Wilkes wilkes@mips.com -OR- {ames, decwrl, pyramid}!mips!wilkes