home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / solaris / 186 < prev    next >
Encoding:
Text File  |  1992-08-27  |  7.6 KB  |  293 lines

  1. Xref: sparky comp.unix.solaris:186 comp.unix.shell:3657
  2. Newsgroups: comp.unix.solaris,comp.unix.shell
  3. Path: sparky!uunet!mcsun!sunic!nobeltech!ppan
  4. From: ppan@nobeltech.se (Per Andersson)
  5. Subject: tcsh for Solaris 2.0 !
  6. Message-ID: <1992Aug27.104228.19818@nobeltech.se>
  7. Organization: NobelTech AB
  8. Date: Thu, 27 Aug 1992 10:42:28 GMT
  9. Lines: 282
  10.  
  11.  
  12. Since I haven't seen anything about tcsh for the new Solaris 2.0 I thought
  13. I'd share this with you. Usual restrictions apply. It works for me.
  14.  
  15. # This is a shell archive.  Remove anything before this line,
  16. # then unpack it by saving it in a file and typing "sh file".
  17. #
  18. # Wrapped by nobeltech!ppan on Thu Aug 27 12:24:56 MET DST 1992
  19. # Contents:  config.sunos50 tcsh.sunos50.diff
  20.  
  21. echo x - config.sunos50
  22. sed 's/^@//' > "config.sunos50" <<'@//E*O*F config.sunos50//'
  23. /*
  24.  * config.h -- configure various defines for tcsh
  25.  *
  26.  * All source files should #include this FIRST.
  27.  *
  28.  * Edit this to match your system type.
  29.  */
  30.  
  31. /****************** System dependant compilation flags ****************/
  32. /*
  33.  * POSIX    This system supports IEEE Std 1003.1-1988 (POSIX).
  34.  */
  35. #define POSIX
  36.  
  37. /*
  38.  * POSIXJOBS    This system supports the optional IEEE Std 1003.1-1988 (POSIX)
  39.  *        job control facilities.
  40.  */
  41. #define POSIXJOBS
  42.  
  43. /*
  44.  * VFORK    This machine has a vfork().  
  45.  *        It used to be that for job control to work, this define
  46.  *        was mandatory. This is not the case any more.
  47.  *        If you think you still need it, but you don't have vfork, 
  48.  *        define this anyway and then do #define vfork fork.  
  49.  *        I do this anyway on a Sun because of yellow pages brain damage,
  50.  *        [should not be needed under 4.1]
  51.  *        and on the iris4d cause    SGI's fork is sufficiently "virtual" 
  52.  *        that vfork isn't necessary.  (Besides, SGI's vfork is weird).
  53.  *        Note that some machines eg. rs6000 have a vfork, but not
  54.  *        with the berkeley semantics, so we cannot use it there either.
  55.  */
  56. #undef VFORK
  57.  
  58. /*
  59.  * BSDJOBS    You have BSD-style job control (both process groups and
  60.  *        a tty that deals correctly
  61.  */
  62. #define BSDJOBS
  63.  
  64. /*
  65.  * BSDSIGS    You have 4.2-style signals, rather than USG style.
  66.  *        Note: POSIX systems should not define this unless they
  67.  *        have sigvec() and friends (ie: 4.3BSD-RENO, HP-UX).
  68.  */
  69. #undef BSDSIGS
  70.  
  71. /*
  72.  * BSDTIMES    You have BSD-style process time stuff (like rusage)
  73.  *        This may or may not be true.  For example, Apple Unix
  74.  *        (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
  75.  */
  76. #undef BSDTIMES
  77.  
  78. /*
  79.  * BSDNICE    Your system uses setpriority() instead of nice, to
  80.  *        change a processes scheduling priority
  81.  */
  82. #undef BSDNICE
  83.  
  84. /*
  85.  * TERMIO    You have struct termio instead of struct sgttyb.
  86.  *         This is usually the case for SYSV systems, where
  87.  *        BSD uses sgttyb. POSIX systems should define this
  88.  *        anyway, even though they use struct termios.
  89.  */
  90. #define TERMIO
  91.  
  92. /*
  93.  * SYSVREL    Your machine is SYSV based (HPUX, A/UX)
  94.  *        NOTE: don't do this if you are on a Pyramid -- tcsh is
  95.  *        built in a BSD universe.
  96.  *        Set SYSVREL to 1, 2, or 3, depending the version of System V
  97.  *        you are running. Or set it to 0 if you are not SYSV based
  98.  */
  99. #define SYSVREL    4
  100.  
  101. /*
  102.  * YPBUGS    Work around Sun YP bugs that cause expansion of ~username
  103.  *        to send command output to /dev/null
  104.  */
  105. #undef YPBUGS
  106.  
  107. /*
  108.  * SIGVOID    Define this if your signal handlers return void.  On older
  109.  *        systems, signal returns int, but on newer ones, it returns void.
  110.  */
  111. #define SIGVOID 
  112.  
  113. /*
  114.  * HAVEDUP2    Define this if your system supports dup2().
  115.  */
  116. #define HAVEDUP2
  117.  
  118. /*
  119.  * HAVEUTMPX    Define if you have extended utmp (utmpx).
  120.  *        (common for svr4 systems)
  121.  */
  122. #define HAVEUTMPX
  123.  
  124. /*
  125.  * UTHOST    Does the utmp file have a host field?
  126.  */
  127. #ifdef HAVEUTMPX
  128. # define UTHOST
  129. #else
  130. # undef UTHOST
  131. #endif /* HAVEUTMPX */
  132.  
  133. /*
  134.  * DIRENT    Your system has <dirent.h> instead of <sys/dir.h>
  135.  */
  136. #define DIRENT
  137.  
  138. /*
  139.  * ECHO_STYLE    Optionally change the behavior of the builtin echo
  140.  *        BOTH_ECHO: Support both bsd options (-n) and sysv escapes (\nnn)
  141.  *        BSD_ECHO:  Support only -n
  142.  *        SYSV_ECHO: Support only sysv escapes (\nnn)
  143.  *        NONE_ECHO: Pure echo.
  144.  */
  145. #define ECHO_STYLE BSD_ECHO    /* BSD options only */
  146.  
  147. /****************** local defines *********************/
  148. #ifndef BSDTIMES
  149. # define NEEDgethostname
  150. #endif
  151. /*
  152.  * Shadow passwd file
  153.  */
  154. #define PW_SHADOW
  155.  
  156. #define SUNOS50
  157. /****************** configurable hacks ****************/
  158. /* have been moved to config_f.h */
  159. #include "config_f.h"
  160.  
  161. @//E*O*F config.sunos50//
  162. chmod u=rw,g=r,o=r config.sunos50
  163.  
  164. echo x - tcsh.sunos50.diff
  165. sed 's/^@//' > "tcsh.sunos50.diff" <<'@//E*O*F tcsh.sunos50.diff//'
  166. diff -c -r tcsh-6.02/sh.sem.c tcsh-6.02.sunos50/sh.sem.c
  167. *** tcsh-6.02/sh.sem.c    Sat May 16 02:00:42 1992
  168. --- tcsh-6.02.sunos50/sh.sem.c    Thu Aug 27 12:09:54 1992
  169. ***************
  170. *** 51,57 ****
  171.   
  172.   #ifdef sparc
  173.   # ifndef MACH
  174. ! #  include <vfork.h>
  175.   # endif /* !MACH */
  176.   #endif /* sparc */
  177.   
  178. --- 51,59 ----
  179.   
  180.   #ifdef sparc
  181.   # ifndef MACH
  182. ! #  ifndef SUNOS50
  183. ! #   include <vfork.h>
  184. ! #  endif /* !SUNOS50 */
  185.   # endif /* !MACH */
  186.   #endif /* sparc */
  187.   
  188. diff -c -r tcsh-6.02/sh.time.c tcsh-6.02.sunos50/sh.time.c
  189. *** tcsh-6.02/sh.time.c    Sat May 16 02:00:42 1992
  190. --- tcsh-6.02.sunos50/sh.time.c    Thu Aug 27 12:10:11 1992
  191. ***************
  192. *** 38,44 ****
  193.   
  194.   RCSID("$Id: sh.time.c,v 3.7 1992/04/03 22:15:14 christos Exp $")
  195.   
  196. ! #if defined(sun) && ! defined(MACH)
  197.   # include <machine/param.h>
  198.   #endif /* sun */
  199.   
  200. --- 38,44 ----
  201.   
  202.   RCSID("$Id: sh.time.c,v 3.7 1992/04/03 22:15:14 christos Exp $")
  203.   
  204. ! #if defined(sun) && ! defined(MACH) && ! defined(SUNOS50)
  205.   # include <machine/param.h>
  206.   #endif /* sun */
  207.   
  208. diff -c -r tcsh-6.02/sh.types.h tcsh-6.02.sunos50/sh.types.h
  209. *** tcsh-6.02/sh.types.h    Sat May 16 02:00:51 1992
  210. --- tcsh-6.02.sunos50/sh.types.h    Thu Aug 27 12:11:12 1992
  211. ***************
  212. *** 66,71 ****
  213. --- 66,72 ----
  214.   # ifndef _SIZE_T
  215.   #  define _SIZE_T
  216.   # endif /* _SIZE_T */
  217. + #ifndef SUNOS50
  218.   # ifndef __sys_stdtypes_h
  219.   #  define __sys_stdtypes_h
  220.       typedef int pid_t;
  221. ***************
  222. *** 89,94 ****
  223. --- 90,97 ----
  224.   #   endif /* _GID_T */
  225.   #  endif /* !MACH */
  226.   # endif /* !SUNOS4 */
  227. + #endif /* !SUNOS50 */
  228.   #endif /* sun */
  229.   
  230.   
  231. ***************
  232. *** 134,140 ****
  233. --- 137,145 ----
  234.   extern void perror();
  235.   extern void _exit();
  236.   extern void abort();
  237. + #ifndef SUNOS50
  238.   extern void qsort();
  239. + #endif /* !SUNOS50 */
  240.   extern void free();
  241.   extern unsigned int alarm();
  242.   extern unsigned int sleep();
  243. diff -c -r tcsh-6.02/tc.os.h tcsh-6.02.sunos50/tc.os.h
  244. *** tcsh-6.02/tc.os.h    Sat May 16 02:00:50 1992
  245. --- tcsh-6.02.sunos50/tc.os.h    Thu Aug 27 12:12:42 1992
  246. ***************
  247. *** 380,386 ****
  248. --- 380,388 ----
  249.   extern int abort();
  250.   #  endif /* __GNUC__ != 2 */
  251.   # ifndef fps500
  252. + #  ifndef SUNOS50
  253.   extern int qsort();
  254. + #  endif /* !SUNOS50 */
  255.   # endif /* fps500 */
  256.   # else
  257.   extern void abort();
  258. ***************
  259. *** 446,452 ****
  260. --- 448,456 ----
  261.   #   if !defined(POSIXJOBS) && !defined(_SEQUENT_)
  262.   extern int wait3();
  263.   #   else /* POSIXJOBS || _SEQUENT_ */
  264. + #    ifndef SUNOS50
  265.   extern int waitpid();
  266. + #    endif /* !SUNOS50 */
  267.   #   endif /* POSIXJOBS || _SEQUENT_ */
  268.   #  endif /* ! BSDTIMES */
  269.   # else /* !BSDJOBS */
  270. ***************
  271. *** 499,505 ****
  272. --- 503,511 ----
  273.    * Somehow these are missing
  274.    */
  275.   extern int ioctl __P((int, int, ...));
  276. + #  ifndef SUNOS50
  277.   extern int readlink __P((const char *, char *, size_t));
  278. + #  endif /* !SUNOS50 */
  279.   # endif /* sun && __GNUC__ == 2 */
  280.   
  281.   #ifdef linux
  282.  
  283. @//E*O*F tcsh.sunos50.diff//
  284. chmod u=rw,g=r,o=r tcsh.sunos50.diff
  285.  
  286. exit 0
  287. -- 
  288. -----------------------------------------------------------------------------
  289. Per Andersson - ppan@nobeltech.se (perand@stacken.kth.se on free time)
  290. Managing networks at, but not speaking for Nobeltech AB, J{rf{lla, Sweden
  291. -----------------------------------------------------------------------------
  292.