diff -c -r tcsh-6.08.02.orig/Makefile.std tcsh-6.08.02/Makefile.std *** tcsh-6.08.02.orig/Makefile.std Fri Oct 2 19:56:47 1998 --- tcsh-6.08.02/Makefile.std Wed Dec 23 01:44:53 1998 *************** *** 241,247 **** CPP = ${CC} -E # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. ! CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic #CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) #CC= shlicc # BSDI2.1 w/ shared libraries #CC= cc --- 241,248 ---- CPP = ${CC} -E # The -B tells gcc to use /bin/ld. This is to avoid using the gnu ld, which # on the suns does not know how to make dynamically linked binaries. ! CC= mwcc -w on ! #CC= gcc -Wall -pipe -B/bin/ # -ansi -pedantic #CC= gcc -m486 -pipe -Wall # Generate code for Intel 486 (linux) #CC= shlicc # BSDI2.1 w/ shared libraries #CC= cc diff -c -r tcsh-6.08.02.orig/config.h tcsh-6.08.02/config.h *** tcsh-6.08.02.orig/config.h Wed Dec 23 01:46:39 1998 --- tcsh-6.08.02/config.h Wed Dec 23 01:44:53 1998 *************** *** 0 **** --- 1,130 ---- + /* + * config.h -- configure various defines for tcsh + * + * All source files should #include this FIRST. + * + * Edit this to match your system type. + */ + + #ifndef _h_config + #define _h_config + /****************** System dependant compilation flags ****************/ + /* + * POSIX This system supports IEEE Std 1003.1-1988 (POSIX). + */ + #define POSIX + + /* + * POSIXJOBS This system supports the optional IEEE Std 1003.1-1988 (POSIX) + * job control facilities. + */ + #undef POSIXJOBS + + /* + * POSIXSIGS Use the POSIX signal facilities to emulate BSD signals. + */ + #undef POSIXSIGS + + /* + * VFORK This machine has a vfork(). + * It used to be that for job control to work, this define + * was mandatory. This is not the case any more. + * If you think you still need it, but you don't have vfork, + * define this anyway and then do #define vfork fork. + * I do this anyway on a Sun because of yellow pages brain damage, + * [should not be needed under 4.1] + * and on the iris4d cause SGI's fork is sufficiently "virtual" + * that vfork isn't necessary. (Besides, SGI's vfork is weird). + * Note that some machines eg. rs6000 have a vfork, but not + * with the berkeley semantics, so we cannot use it there either. + */ + #undef VFORK + + /* + * BSDJOBS You have BSD-style job control (both process groups and + * a tty that deals correctly + */ + #undef BSDJOBS + + /* + * BSDSIGS You have 4.2-style signals, rather than USG style. + * Note: POSIX systems should not define this unless they + * have sigvec() and friends (ie: 4.3BSD-RENO, HP-UX). + */ + #undef BSDSIGS + + /* + * BSDTIMES You have BSD-style process time stuff (like rusage) + * This may or may not be true. For example, Apple Unix + * (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES. + */ + #undef BSDTIMES + + /* + * BSDLIMIT You have BSD-style resource limit stuff (getrlimit/setrlimit) + */ + #undef BSDLIMIT + + /* + * BSDNICE Your system uses setpriority() instead of nice, to + * change a processes scheduling priority + */ + #undef BSDNICE + + /* + * TERMIO You have struct termio instead of struct sgttyb. + * This is usually the case for SYSV systems, where + * BSD uses sgttyb. POSIX systems should define this + * anyway, even though they use struct termios. + */ + #undef TERMIO + + /* + * SYSVREL Your machine is SYSV based (HPUX, A/UX) + * NOTE: don't do this if you are on a Pyramid -- tcsh is + * built in a BSD universe. + * Set SYSVREL to 1, 2, 3, or 4, depending the version of System V + * you are running. Or set it to 0 if you are not SYSV based + */ + #define SYSVREL 0 + + /* + * YPBUGS Work around Sun YP bugs that cause expansion of ~username + * to send command output to /dev/null + */ + #undef YPBUGS + + /* + * SIGVOID Define this if your signal handlers return void. On older + * systems, signal returns int, but on newer ones, it returns void. + */ + #define SIGVOID + + /* + * HAVEDUP2 Define this if your system supports dup2(). + */ + #define HAVEDUP2 + + /* + * UTHOST Does the utmp file have a host field? + */ + #undef UTHOST + + /* + * DIRENT Your system has instead of + */ + #undef DIRENT + /****************** local defines *********************/ + #define BEOS + #define HAVENOLIMIT + #define HAVENOUTMP + /****************** configurable hacks ****************/ + /* have been moved to config_f.h */ + #include "config_f.h" + + #define SYSMALLOC + #undef REMOTEHOST + + #undef NLS + #undef NLS_CATALOGS + #endif /* _h_config */ diff -c -r tcsh-6.08.02.orig/host.defs tcsh-6.08.02/host.defs *** tcsh-6.08.02.orig/host.defs Wed Nov 25 03:17:24 1998 --- tcsh-6.08.02/host.defs Wed Dec 23 01:44:54 1998 *************** *** 1064,1069 **** --- 1064,1070 ---- newdef : SYSVREL == 0 + ostype : defined(BEOS) : "beos" ostype : defined(BSD4_4) : "bsd44" ostype : defined(BSD) : "bsd" ostype : defined(POSIX) : "posix" diff -c -r tcsh-6.08.02.orig/sh.proc.c tcsh-6.08.02/sh.proc.c *** tcsh-6.08.02.orig/sh.proc.c Mon Oct 26 00:10:22 1998 --- tcsh-6.08.02/sh.proc.c Wed Dec 23 01:44:54 1998 *************** *** 273,279 **** --- 273,283 ---- # ifdef _MINIX pid = wait(&w); # else /* !_MINIX */ + # ifdef BEOS + pid = ourwait(&w); + # else pid = ourwait(&w.w_status); + # endif # endif /* _MINIX */ # else /* !UNRELSIGS */ /* *************** *** 320,326 **** for (pp = proclist.p_next; pp != NULL; pp = pp->p_next) if (pid == pp->p_procid) goto found; ! #if !defined(BSDJOBS) && !defined(WINNT) /* this should never have happened */ stderror(ERR_SYNC, pid); xexit(0); --- 324,330 ---- for (pp = proclist.p_next; pp != NULL; pp = pp->p_next) if (pid == pp->p_procid) goto found; ! #if !defined(BSDJOBS) && !defined(WINNT) && !defined(BEOS) /* this should never have happened */ stderror(ERR_SYNC, pid); xexit(0); *************** *** 1983,1988 **** --- 1987,1993 ---- */ if (t->t_dflg & F_NOHUP) (void) signal(SIGHUP, SIG_IGN); + #ifndef BEOS if (t->t_dflg & F_NICE) { int nval = SIGN_EXTEND_CHAR(t->t_nice); #ifdef BSDNICE *************** *** 1991,1996 **** --- 1996,2002 ---- (void) nice(nval); #endif /* !BSDNICE */ } + #endif /* !BEOS */ #ifdef F_VER if (t->t_dflg & F_VER) { tsetenv(STRSYSTYPE, t->t_systype ? STRbsd43 : STRsys53); diff -c -r tcsh-6.08.02.orig/sh.time.c tcsh-6.08.02/sh.time.c *** tcsh-6.08.02.orig/sh.time.c Wed Nov 25 03:17:38 1998 --- tcsh-6.08.02/sh.time.c Wed Dec 23 01:44:54 1998 *************** *** 175,185 **** --- 175,187 ---- nval = 4; else if (*v == 0 && any("+-", cp[0])) nval = getn(cp); + #ifndef BEOS #ifdef BSDNICE (void) setpriority(PRIO_PROCESS, 0, nval); #else /* BSDNICE */ (void) nice(nval); #endif /* BSDNICE */ + #endif /* !BEOS */ } #ifdef BSDTIMES diff -c -r tcsh-6.08.02.orig/tc.alloc.c tcsh-6.08.02/tc.alloc.c *** tcsh-6.08.02.orig/tc.alloc.c Mon Oct 26 00:10:28 1998 --- tcsh-6.08.02/tc.alloc.c Wed Dec 23 01:44:54 1998 *************** *** 473,478 **** --- 473,482 ---- #else /* SYSMALLOC */ + #ifdef BEOS + #include + #endif /* BEOS */ + /** ** ``Protected versions'' of malloc, realloc, calloc, and free ** diff -c -r tcsh-6.08.02.orig/tc.os.c tcsh-6.08.02/tc.os.c *** tcsh-6.08.02.orig/tc.os.c Mon Oct 26 00:10:35 1998 --- tcsh-6.08.02/tc.os.c Wed Dec 23 01:44:54 1998 *************** *** 1164,1170 **** # else /* ! hp9000s500 */ ! # if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || defined(WINNT) # define d_fileno d_ino # endif --- 1164,1170 ---- # else /* ! hp9000s500 */ ! # if (SYSVREL != 0 && !defined(d_fileno)) || defined(_VMS_POSIX) || defined(WINNT) || defined(BEOS) # define d_fileno d_ino # endif diff -c -r tcsh-6.08.02.orig/tc.os.h tcsh-6.08.02/tc.os.h *** tcsh-6.08.02.orig/tc.os.h Mon Oct 26 00:10:36 1998 --- tcsh-6.08.02/tc.os.h Wed Dec 23 01:44:54 1998 *************** *** 41,46 **** --- 41,50 ---- #define NEEDstrerror /* Too hard to find which systems have it */ #endif /* WINNT */ + #ifdef BEOS + # define NEEDgetwd + # undef NEEDstrerror + #endif /* BEOS */ #ifdef notdef /* diff -c -r tcsh-6.08.02.orig/tc.sig.h tcsh-6.08.02/tc.sig.h *** tcsh-6.08.02.orig/tc.sig.h Thu Apr 9 02:57:37 1998 --- tcsh-6.08.02/tc.sig.h Wed Dec 23 01:44:54 1998 *************** *** 38,44 **** #ifndef _h_tc_sig #define _h_tc_sig ! #if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || defined(WINNT) # include # ifndef SIGCHLD # define SIGCHLD SIGCLD --- 38,44 ---- #ifndef _h_tc_sig #define _h_tc_sig ! #if (SYSVREL > 0) || defined(BSD4_4) || defined(_MINIX) || defined(DGUX) || defined(WINNT) || defined(BEOS) # include # ifndef SIGCHLD # define SIGCHLD SIGCLD *************** *** 51,57 **** # define SAVESIGVEC #endif /* SUNOS4 || DGUX || hp800 || SVR4 & POSIXSIGS & VFORK */ ! #if (SYSVREL > 0 && SYSVREL < 3 && !defined(BSDSIGS)) || defined(_MINIX) || defined(COHERENT) /* * If we have unreliable signals... */ --- 51,57 ---- # define SAVESIGVEC #endif /* SUNOS4 || DGUX || hp800 || SVR4 & POSIXSIGS & VFORK */ ! #if (SYSVREL > 0 && SYSVREL < 3 && !defined(BSDSIGS)) || defined(_MINIX) || defined(COHERENT) || defined(BEOS) /* * If we have unreliable signals... */ *************** *** 124,129 **** --- 124,133 ---- #ifdef _VMS_POSIX # define killpg(a, b) kill(-(a), (b)) #endif /* atp _VMS_POSIX */ + + #ifdef BEOS + # define killpg(a, b) kill((a), (b)) + #endif /* BEOS */ #if !defined(NSIG) && defined(SIGMAX) # define NSIG (SIGMAX+1)