home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / solaris / 198 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  11.2 KB

  1. Xref: sparky comp.unix.solaris:198 comp.unix.shell:3706
  2. Path: sparky!uunet!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!earle
  3. From: earle@elroy.jpl.nasa.gov (Greg Earle (Gainfully Unemployed))
  4. Newsgroups: comp.unix.solaris,comp.unix.shell
  5. Subject: Re: tcsh for Solaris 2.0 !
  6. Summary: My own diffs
  7. Message-ID: <1992Aug31.094508.14536@elroy.jpl.nasa.gov>
  8. Date: 31 Aug 92 09:45:08 GMT
  9. References: <1992Aug27.104228.19818@nobeltech.se>
  10. Followup-To: comp.unix.solaris
  11. Organization: Gainfully Unemployed - I Am No Longer A Sun Employee - Hire Me
  12. Lines: 355
  13.  
  14. My own changes to the tcsh 6.02 sources seemed a little more complete than
  15. Per's did (to me, anyway), so I'll post mine for the sake of comparison.
  16.  
  17. I created the file "config/config.solaris2" by copying "config.sysv4" and
  18. simply undef'd BSDTIMES (I know they exist, but I wanted to try and avoid
  19. any need for BSD Compatibility Mode, if possible).  I then linked config.h
  20. to this new config/config.solaris2 file and let fly with "make".  So far,
  21. no apparent problems.  Thank goodness Christos et al. did a previous SVR4
  22. port (the WU archive "ftpd" port had been a nightmare, *sigh* ... ).
  23.  
  24. *** config/config.sysv4    Fri May 15 17:01:02 1992
  25. --- config/config.solaris2    Thu Aug 20 11:18:46 1992
  26. ***************
  27. *** 52,56 ****
  28.    *        (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
  29.    */
  30. ! #define BSDTIMES
  31.   
  32.   /*
  33. --- 52,56 ----
  34.    *        (OREO) has BSDJOBS and BSDSIGS but not BSDTIMES.
  35.    */
  36. ! #undef BSDTIMES
  37.   
  38.   /*
  39.  
  40. Here are my diffs for the rest of the 6.02 source.  They depend only on the
  41. existing "SYSVREL" #define and do not introduce any new #define's.
  42.  
  43. The summary:
  44. (1) Anywhere there's an "#ifdef (sun)" or "#if defined(sun) ... " construct,
  45.     add in an appropriate "&& SYSVREL != 4"
  46. (2) Solaris 2.0 signals are slightly different than existing implementations,
  47.     so make small tweaks to sh.init.c
  48. (3) Twiddle a couple of paths defined in the Makefile (like where "ctags" is,
  49.     "vgrind", etc.)
  50.  
  51. The Makefile diffs are biased by my using Sun C 2.0 to compile it:
  52.  
  53. *** Makefile.orig    Fri May 15 17:00:52 1992
  54. --- Makefile    Fri Aug 14 15:31:49 1992
  55. ***************
  56. *** 95,102 ****
  57.   ## LDLAGS.  Define something here if you need to
  58.   ################################################################
  59. ! LDFLAGS=             ## The simplest, suitable for all.
  60.   #LDFLAGS= -static -s        ## Stripped. No shared libs. (linux)
  61.   #LDFLAGS= -s            ## Stripped. Takes less space on disk.
  62. ! #LDFLAGS= -s -n            ## Pure executable. Spares paging over
  63.   #                 ## the network for machines with local
  64.   #                ## swap but external /usr/local/bin .
  65. --- 95,102 ----
  66.   ## LDLAGS.  Define something here if you need to
  67.   ################################################################
  68. ! #LDFLAGS=             ## The simplest, suitable for all.
  69.   #LDFLAGS= -static -s        ## Stripped. No shared libs. (linux)
  70.   #LDFLAGS= -s            ## Stripped. Takes less space on disk.
  71. ! LDFLAGS= -s -n            ## Pure executable. Spares paging over
  72.   #                 ## the network for machines with local
  73.   #                ## swap but external /usr/local/bin .
  74. ***************
  75. *** 107,115 ****
  76.   ## LIBES.  Pick one, or roll your own.
  77.   ################################################################
  78. ! LIBES= -ltermcap        ## BSD style things, hpux
  79.   #LIBES= -ltermcap -lcs        ## Mach
  80.   #LIBES= -lcurses        ## Sys V3 w/o networking (and Sys V4)
  81.   #LIBES= -lcurses -lc /usr/ucblib/libucb.a ## Sys V4 with BSDTIMES
  82. ! #LIBES= -lcurses        ## Sys V4 w/o BSDTIMES
  83.   #LIBES= -lcurses -lnet        ## Sys V3 with networking
  84.   #LIBES= -lcurses -ldir        ## Sys V2 w/o networking [needs directory lib]
  85. --- 107,115 ----
  86.   ## LIBES.  Pick one, or roll your own.
  87.   ################################################################
  88. ! #LIBES= -ltermcap        ## BSD style things, hpux
  89.   #LIBES= -ltermcap -lcs        ## Mach
  90.   #LIBES= -lcurses        ## Sys V3 w/o networking (and Sys V4)
  91.   #LIBES= -lcurses -lc /usr/ucblib/libucb.a ## Sys V4 with BSDTIMES
  92. ! LIBES= -lcurses        ## Sys V4 w/o BSDTIMES
  93.   #LIBES= -lcurses -lnet        ## Sys V3 with networking
  94.   #LIBES= -lcurses -ldir        ## Sys V2 w/o networking [needs directory lib]
  95. ***************
  96. *** 147,152 ****
  97.   # is fixed correctly, otherwise you'll be stopped for tty input, or you
  98.   # will lose the editor and job control.
  99. ! CC=    gcc -Wall 
  100. ! #CC=    cc
  101.   #CC=    occ
  102.   #CC=    acc
  103. --- 147,152 ----
  104.   # is fixed correctly, otherwise you'll be stopped for tty input, or you
  105.   # will lose the editor and job control.
  106. ! #CC=    gcc -Wall 
  107. ! CC=    cc
  108.   #CC=    occ
  109.   #CC=    acc
  110. ***************
  111. *** 156,164 ****
  112.   AS=    -as
  113.   RM=    -rm
  114. ! CXREF=    /usr/ucb/cxref
  115. ! VGRIND=    csh /usr/ucb/vgrind
  116. ! CTAGS=    /usr/ucb/ctags
  117. ! #XSTR= /usr/ucb/xstr
  118. ! SCCS=    /usr/local/sccs
  119.   PARALLEL=12                # Make the multi-max run fast.
  120.   #P=&                    # Use Sequent's parallel make
  121. --- 156,166 ----
  122.   AS=    -as
  123.   RM=    -rm
  124. ! #CXREF=    /usr/ucb/cxref
  125. ! #VGRIND=    csh /usr/ucb/vgrind
  126. ! VGRIND=    csh /usr/bin/vgrind
  127. ! #CTAGS=    /usr/ucb/ctags
  128. ! CTAGS=    /usr/bin/ctags
  129. ! XSTR= /usr/ucb/xstr
  130. ! SCCS=    /usr/sccs
  131.   PARALLEL=12                # Make the multi-max run fast.
  132.   #P=&                    # Use Sequent's parallel make
  133. ***************
  134. *** 170,174 ****
  135.   # DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
  136.   # DESTMAN=/usr/catman/1l    # Amiga unix (SysVR4)
  137. ! FTPAREA=/usr/spool/ftp
  138.   
  139.   ASSRCS=    sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
  140. --- 172,176 ----
  141.   # DESTMAN=${DESTDIR}/usr/share/man/man${MANSECT} # Stardent Vistra (SysVR4)
  142.   # DESTMAN=/usr/catman/1l    # Amiga unix (SysVR4)
  143. ! FTPAREA=/export/ftp
  144.   
  145.   ASSRCS=    sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
  146. *** sh.h.orig    Fri May 15 17:00:43 1992
  147. --- sh.h    Sun Aug 23 12:23:54 1992
  148. ***************
  149. *** 244,252 ****
  150.   #endif /* SYSVREL > 0 ||  _IBMR2 */
  151.   
  152. ! #if !((defined(sun) || defined(_MINIX)) && defined(TERMIO))
  153.   # include <sys/ioctl.h>
  154.   #endif 
  155.   
  156. ! #if !defined(FIOCLEX) && defined(sun)
  157.   # include <sys/filio.h>
  158.   #endif /* !FIOCLEX && sun */
  159. --- 244,252 ----
  160.   #endif /* SYSVREL > 0 ||  _IBMR2 */
  161.   
  162. ! #if !(((defined(sun) && SYSVREL != 4) || defined(_MINIX)) && defined(TERMIO))
  163.   # include <sys/ioctl.h>
  164.   #endif 
  165.   
  166. ! #if !defined(FIOCLEX) && (defined(sun)  && SYSVREL != 4)
  167.   # include <sys/filio.h>
  168.   #endif /* !FIOCLEX && sun */
  169. *** sh.init.c.orig    Fri May 15 17:00:40 1992
  170. --- sh.init.c    Sun Aug 23 13:59:37 1992
  171. ***************
  172. *** 267,271 ****
  173. --- 267,275 ----
  174.   # else
  175.   /* 18 */    "CHLD",        "Child exited",
  176. + # if defined(sun) && (SYSVREL == 4)
  177. + /* 19 */    "LOST",        "Resource lost",
  178. + # else
  179.   /* 19 */    "PWR",      "Power failure",
  180. + # endif /* sun */
  181.   # endif /* apollo */
  182.   #endif /* IBMAIX && cray && linux */
  183. ***************
  184. *** 434,439 ****
  185. --- 438,450 ----
  186.   /* 30 */    "XCPU",        "CPU time limit exceeded",
  187.   /* 31 */    "XFSZ",     "File size limit exceeded",
  188. + # ifdef sun
  189. + /* 32 */    "WAITING",    "Process's lwps are blocked",
  190. + /* 33 */    "LWP",        "Special LWP signal",
  191. + /* 34 */    0,        "Maximum number of signals",
  192. + # else
  193.   /* 32 */    0,        "Maximum number of signals",
  194. + # endif /* sun */
  195.   # endif /* SYSVREL > 3 */
  196.   # if defined(ISC) && defined(POSIX) 
  197.   #  define _sigextra_
  198. *** sh.proc.c.orig    Fri May 15 17:00:41 1992
  199. --- sh.proc.c    Sun Aug 23 14:09:56 1992
  200. ***************
  201. *** 79,83 ****
  202.   
  203.   #ifdef BSDTIMES
  204. ! # if defined(sun) || defined(hp9000)
  205.   static struct rusage zru = {{0L, 0L}, {0L, 0L}, 0L, 0L, 0L, 0L,
  206.                   0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L};
  207. --- 79,83 ----
  208.   
  209.   #ifdef BSDTIMES
  210. ! # if (defined(sun) && SYSVREL != 4) || defined(hp9000)
  211.   static struct rusage zru = {{0L, 0L}, {0L, 0L}, 0L, 0L, 0L, 0L,
  212.                   0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L};
  213. *** sh.sem.c.orig    Fri May 15 17:00:42 1992
  214. --- sh.sem.c    Sun Aug 23 12:39:17 1992
  215. ***************
  216. *** 50,54 ****
  217.   #endif /* FIOCLEX */
  218.   
  219. ! #ifdef sparc
  220.   # ifndef MACH
  221.   #  include <vfork.h>
  222. --- 50,54 ----
  223.   #endif /* FIOCLEX */
  224.   
  225. ! #if defined(sparc) && SYSVREL != 4
  226.   # ifndef MACH
  227.   #  include <vfork.h>
  228. *** sh.time.c.orig    Fri May 15 17:00:42 1992
  229. --- sh.time.c    Sun Aug 23 12:41:06 1992
  230. ***************
  231. *** 39,43 ****
  232.   RCSID("$Id: sh.time.c,v 3.7 1992/04/03 22:15:14 christos Exp $")
  233.   
  234. ! #if defined(sun) && ! defined(MACH)
  235.   # include <machine/param.h>
  236.   #endif /* sun */
  237. --- 39,43 ----
  238.   RCSID("$Id: sh.time.c,v 3.7 1992/04/03 22:15:14 christos Exp $")
  239.   
  240. ! #if defined(sun) && ! defined(MACH) && (SYSVREL != 4)
  241.   # include <machine/param.h>
  242.   #endif /* sun */
  243. ***************
  244. *** 245,249 ****
  245.    * the adjusting macro here:
  246.    */
  247. ! #ifdef sun
  248.   # define IADJUST(i)    (pagetok(i)/2)
  249.   #else /* sun */
  250. --- 245,249 ----
  251.    * the adjusting macro here:
  252.    */
  253. ! #if defined(sun) && SYSVREL != 4
  254.   # define IADJUST(i)    (pagetok(i)/2)
  255.   #else /* sun */
  256. ***************
  257. *** 429,433 ****
  258.   
  259.           case 'M':        /* max. Resident Set Size */
  260. ! #ifdef sun
  261.   # ifdef notdef
  262.           xprintf("%ld", r1->ru_maxrss * 1024L/(long) getpagesize());
  263. --- 429,433 ----
  264.   
  265.           case 'M':        /* max. Resident Set Size */
  266. ! #if defined(sun) && SYSVREL != 4
  267.   # ifdef notdef
  268.           xprintf("%ld", r1->ru_maxrss * 1024L/(long) getpagesize());
  269. *** sh.types.h.orig    Fri May 15 17:00:51 1992
  270. --- sh.types.h    Sun Aug 23 12:41:48 1992
  271. ***************
  272. *** 50,54 ****
  273.    *** Suns running sunos4.1
  274.    ***/
  275. ! #ifdef sun
  276.   /* This used to be long, but lint dissagrees... */
  277.   # ifndef _SIGMASK_T
  278. --- 50,54 ----
  279.    *** Suns running sunos4.1
  280.    ***/
  281. ! #if defined(sun) && SYSVREL != 4
  282.   /* This used to be long, but lint dissagrees... */
  283.   # ifndef _SIGMASK_T
  284. *** tc.alloc.c.orig    Fri May 15 17:00:48 1992
  285. --- tc.alloc.c    Sun Aug 23 12:42:20 1992
  286. ***************
  287. *** 113,117 ****
  288.   static union overhead *nextf[NBUCKETS];
  289.   
  290. ! #ifdef sun
  291.   extern ptr_t sbrk __P((int));
  292.   #endif
  293. --- 113,117 ----
  294.   static union overhead *nextf[NBUCKETS];
  295.   
  296. ! #if defined(sun) && SYSVREL != 4
  297.   extern ptr_t sbrk __P((int));
  298.   #endif
  299. *** tc.os.h.orig    Fri May 15 17:00:50 1992
  300. --- tc.os.h    Sun Aug 23 12:44:19 1992
  301. ***************
  302. *** 338,342 ****
  303.   # define mygetpgrp()    getpgrp(0)
  304.   #else /* POSIX */
  305. ! # if defined(BSD) || defined(sun) || defined(IRIS4D)
  306.   #  define mygetpgrp()    getpgrp(0)
  307.   # else /* BSD || sun || IRIS4D */
  308. --- 338,342 ----
  309.   # define mygetpgrp()    getpgrp(0)
  310.   #else /* POSIX */
  311. ! # if defined(BSD) || (defined(sun) && SYSVREL != 4) || defined(IRIS4D)
  312.   #  define mygetpgrp()    getpgrp(0)
  313.   # else /* BSD || sun || IRIS4D */
  314. ***************
  315. *** 370,374 ****
  316.   
  317.   
  318. ! #if !defined(POSIX) || defined(sun)
  319.   extern time_t time();
  320.   extern char *getenv();
  321. --- 370,374 ----
  322.   
  323.   
  324. ! #if !defined(POSIX) || (defined(sun) && SYSVREL != 4)
  325.   extern time_t time();
  326.   extern char *getenv();
  327. ***************
  328. *** 484,488 ****
  329.   #else /* POSIX */
  330.   
  331. ! # if (defined(sun) && !defined(__GNUC__)) || defined(_IBMR2) || defined(_IBMESA)
  332.   extern char *getwd();
  333.   # endif    /* (sun && ! __GNUC__) || _IBMR2 || _IBMESA */
  334. --- 484,488 ----
  335.   #else /* POSIX */
  336.   
  337. ! # if (defined(sun) && SYSVREL != 4 && !defined(__GNUC__)) || defined(_IBMR2) || defined(_IBMESA)
  338.   extern char *getwd();
  339.   # endif    /* (sun && ! __GNUC__) || _IBMR2 || _IBMESA */
  340. ***************
  341. *** 495,499 ****
  342.   #endif /* POSIX */
  343.   
  344. ! # if defined(sun) && __GNUC__ == 2
  345.   /*
  346.    * Somehow these are missing
  347. --- 495,499 ----
  348.   #endif /* POSIX */
  349.   
  350. ! # if defined(sun) && SYSVREL != 4 && __GNUC__ == 2
  351.   /*
  352.    * Somehow these are missing
  353. *** tc.sig.h.orig    Fri May 15 17:00:51 1992
  354. --- tc.sig.h    Sun Aug 23 12:44:59 1992
  355. ***************
  356. *** 48,52 ****
  357.   #endif                /* SYSVREL > 0 */
  358.   
  359. ! #if defined(sun) || defined(DGUX)
  360.   # define SAVESIGVEC
  361.   #endif /* sun || DGUX */
  362. --- 48,52 ----
  363.   #endif                /* SYSVREL > 0 */
  364.   
  365. ! #if (defined(sun) && SYSVREL != 4) || defined(DGUX)
  366.   # define SAVESIGVEC
  367.   #endif /* sun || DGUX */
  368.