Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Compiling zsh 2.5.0 on LynxOS 2.3.0
- X-seq: zsh-workers 1361
- From: Robin Kirkham <rjk@xxxxxxxxxxxxxxxx>
- To: zsh-list@xxxxxxxxxxxx
- Subject: Compiling zsh 2.5.0 on LynxOS 2.3.0
- Date: Tue, 18 Jun 1996 23:18:57 +1000
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@xxxxxxxxxxxxxxxx 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 <errno.h>
- #ifdef __Lynx
- #include <sys/sched.h>
- #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 <sys/resource.h>
- #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 <dirent.h>
#else
#include <sys/dir.h>
! #if defined(sony) || defined(MACH) || defined(__Lynx)
#define dirent direct
#endif
#endif
--- 250,256 ----
#include <dirent.h>
#else
#include <sys/dir.h>
! #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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author