From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id XAA12356 for ; Tue, 18 Jun 1996 23:42:54 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id JAA29109; Tue, 18 Jun 1996 09:20:02 -0400 (EDT) Resent-Date: Tue, 18 Jun 1996 09:20:02 -0400 (EDT) Message-Id: <199606181318.XAA03375@asgard.mlb.dmt.csiro.au> X-Authentication-Warning: asgard.mlb.dmt.csiro.au: Host magni.mlb.dmt.csiro.au [130.116.3.29] didn't use HELO protocol To: zsh-list@sterling.com Subject: Compiling zsh 2.5.0 on LynxOS 2.3.0 Date: Tue, 18 Jun 1996 23:18:57 +1000 From: Robin Kirkham Resent-Message-ID: <"7k5eS2.0.l67.1qgnn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1361 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello I've hacked zsh 2.5.0 to run on the current version of LynxOS, a real-time Unix. A brief description of my procedure and the patches I had to make appear below. It compiles and runs OK, but I have not tested it with other than my normal zsh configuration files. Having work to do :-( I don't have time to fiddle with it any further. I hope someone finds this useful. I'm not a member of zsh-list, so any feedback please to address below. Robin Kirkham CSIRO Division of Manufacturing Technology Project Engineer Locked Bag 9, Preston 3072, Australia robin.kirkham@mlb.dmt.csiro.au Phone: +61 3 9662-7756 Fax: +61 3 9662-7853 To compile zsh 2.5.0 for LynxOS version 2.3.0, run buildzsh as normal, ask to answer the questions and accept the defaults EXCEPT say "no" to the questions about dirent.h and about sigset, and specify gcc, not cc for the compiler. Rename zsh.h and exec.c to zsh.h-orig and exec.c-orig, and apply the patches below (I think I've done these right: anyway there quite simple). Make sure you are using the `new' Cygnus GCC, by running /CYGNUS.csh. It should then type `make' and it should compile and run OK. Both patches depend on the preprocessor symbol __Lynx, which the compiler defines automatically. The first patch substitutes the LynxOS setprio() for nice(), with, I believe, roughly equivalent effect. nice() (and sigset()) are actually in a System V compatibility library, but to use this library I think you have to use the old compiler cc, and I had trouble with other things with cc. The second patch disables the resource limits stuff, by #undef'ing symbol RLIM_INFINITY. LynxOS actually has resource limits, but to use them would mean quite a lot of hacks to builtin.c and others, as well as sys/resource.h (RLIM_NLIMITS, for instance, is missing). It also #define's "dirent" to be "direct" (LynxOS has both sys/dir.h and sys/dirent.h, with are different). *** exec.c Tue May 28 00:47:19 1996 --- exec.c-orig Tue May 28 00:21:06 1996 *************** *** 21,30 **** #include "zsh.h" #include - #ifdef __Lynx - #include - #endif - #define execerr() { if (forked) _exit(1); \ closemnodes(mfds); lastval = 1; return; } --- 21,26 ---- *************** *** 1012,1023 **** entersubsh(bkg); if (bkg && isset(BGNICE)) - #ifdef __Lynx - /* should have more or less the same effect */ - setprio(0, getprio(0) - 5); - #else nice(5); - #endif /* perform postfork substitutions */ postfork(args, !(cmd->flags & CFLAG_NOGLOB)); --- 1008,1014 ---- *** zsh.h Tue Jun 18 22:21:45 1996 --- zsh.h-orig Mon May 27 22:40:00 1996 *************** *** 175,185 **** #if !defined(SYSV) || defined(SYSVR4) #include - #ifdef __Lynx - /* LynxOS resource.h is wierd, just disable it */ - #undef RLIM_INFINITY #endif - #endif #if defined(RLIMIT_OFILE) && defined(RLIMIT_NOFILE) #undef RLIMIT_NOFILE --- 175,181 ---- *************** *** 254,260 **** #include #else #include ! #if defined(sony) || defined(MACH) || defined(__Lynx) #define dirent direct #endif #endif --- 250,256 ---- #include #else #include ! #if defined(sony) || defined(MACH) #define dirent direct #endif #endif *************** *** 341,347 **** /* SYSV or POSIX compatible BSD */ /* ARGH, this is currently broken as the 'BSD' test had to be taken stripped * of an additional test BSD >= 199301 as Solaris cpp is broken ++jhi; */ ! #if (defined(SYSV) || defined(_POSIX_SOURCE) || defined(BSD) || defined(__convex__) || defined(_CRAY) || defined(__osf__) || defined(__linux__) || defined(__Lynx)) && !defined(NeXT) #if !defined(__sgi) || !defined(_BSD_COMPAT) /* IRIX */ #ifdef __hpux #define GETPGRP() getpgrp2(0) --- 337,343 ---- /* SYSV or POSIX compatible BSD */ /* ARGH, this is currently broken as the 'BSD' test had to be taken stripped * of an additional test BSD >= 199301 as Solaris cpp is broken ++jhi; */ ! #if (defined(SYSV) || defined(_POSIX_SOURCE) || defined(BSD) || defined(__convex__) || defined(_CRAY) || defined(__osf__) || defined(__linux__)) && !defined(NeXT) #if !defined(__sgi) || !defined(_BSD_COMPAT) /* IRIX */ #ifdef __hpux #define GETPGRP() getpgrp2(0)