home *** CD-ROM | disk | FTP | other *** search
/ ftp.freefriends.org / ftp.freefriends.org.tar / ftp.freefriends.org / arnold / Source / mush.rstevens.tar.gz / mush.tar / Fixes.solaris / Mush.sun.ucb.cc < prev   
Internet Message Format  |  1994-07-23  |  7KB

  1. From @marvin.cdf.toronto.edu:g1jmason@cdf.toronto.edu Mon Jul 11 06:15:19 1994
  2. Received: from noao.edu by gemini (4.1/SAG.sat.13)
  3.     id AA06889; Mon, 11 Jul 94 06:15:17 MST; for rstevens
  4. Received: from marvin.cdf.toronto.edu by noao.edu (4.1/SAG-Noao.G95)
  5.     id AA01685; Mon, 11 Jul 94 06:15:16 MST; for rstevens@gemini
  6. Received: from marvin by marvin.cdf.toronto.edu via suspension id <177>; Mon, 11 Jul 1994 09:15:10 -0400
  7. Received: from eddie by marvin.cdf.toronto.edu id <181>; Sat, 9 Jul 1994 16:22:32 -0400
  8. From: Jamie Mason <g1jmason@cdf.toronto.edu>
  9. To: rstevens@noao.edu
  10. Subject: Re: Solaris 2.3 patches ??
  11. Newsgroups: comp.mail.mush
  12. In-Reply-To: <1994Jul9.122429.19263@noao.edu>
  13. Organization: University of Toronto, Computing Disciplines Facility
  14. Message-Id: <94Jul9.162232edt.181@marvin.cdf.toronto.edu>
  15. Date:     Sat, 9 Jul 1994 16:22:28 -0400
  16. Status: OR
  17.  
  18. In Comp.mail.mush, you write:
  19. >I'm trying to get 7.2.5 to work under Solaris 2.3.  The problem begins
  20. >with the file execute.c, which seems to be getting confused between the
  21. >old tty ioctls and termio.  <termio.h> is not getting inlcuded, but the
  22. >macro echo_on() is trying to access members in the termio structure.
  23. >Saying all the #ifdefs make the code hard to follow is an understatement.
  24.  
  25.     At least at out site, Solaris comes with _two_ diffrent
  26. configurations of the C compiler.  One which compiles to SYS_V ish
  27. solaris, and the other which does BSD emulaion.  (Using altered
  28. include and library paths.)
  29.  
  30.     It is with the BSD-emulation compiler that I had the most success
  31. compiling MUSH.  On our system, this is installed in /usr/ucb/cc.
  32. Once being sure that Make was using _this_ CC, the makefile which
  33. worked best for me was the BSD one.
  34.  
  35.     There remained only one problem -- timezone stuff.  Even with
  36. the BSD compiler, Solaris does the timezone stuff different. So I
  37. had to edit dates.c and put in a new preprocessor switch.
  38.  
  39.     I pieced together something which looks like a shar archive,
  40. but actually does some patching and copying of files.  I did this
  41. so that I would get the 'X' protection from shar.  Un-tar the
  42. mush archive into a dircectory, then run this patch on it.
  43. Make sure that the paths/etc... are the same in your system.
  44.  
  45.     Let me know if this works for you.
  46.  
  47. Jamie
  48.  
  49. #! /bin/sh
  50. # This is a shell patch.  Remove anything before this line, then use it
  51. # by saving it into a file and typing "sh file".  To overwrite existing
  52. # files, type "sh file -c".  You can also feed this as standard input via
  53. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  54. # will see the following message at the end:
  55. #        "End of shell patch."
  56. # Contents: 
  57. #    Copied files:  dates.c-dist makefile.solaris Makefile config.h
  58. #    Patches for:  dates.c makefile.solaris
  59. # (dates.c-dist is old dates.c.  config.h is config.h-dist unchanged.
  60. #  makefile.solaris and Makefile are patches to makefile.bsd.)
  61. #
  62. # Wrapped by g1jmason@eddie on Mon May 23 04:08:57 1994
  63. PATH=/local/bin:/usr/ucb/:/bin:/usr/bin:/usr/ucb ; export PATH
  64. echo shar: Copying \"'dates.c'\" to \"'dates.c-dist'\"
  65. cp dates.c dates.c-dist
  66. echo shar: Copying \"'makefile.bsd'\" to \"'makefile.solaris'\"
  67. cp makefile.bsd makefile.solaris
  68. echo shar: Patching \"'version.h makefile.solaris dates.c'\"
  69. sed "s/^X//" <<'END_OF_FILE' | patch
  70. XPrereq: "10/14/92"
  71. X*** version.h.old    Fri Oct 30 14:55:25 1992
  72. X--- version.h    Mon May 23 04:23:42 1994
  73. X***************
  74. X*** 5,7 ****
  75. X--- 5,11 ----
  76. X  #define RELEASE        7
  77. X  #define REVISION    "2"
  78. X  #define PATCHLEVEL    5
  79. X+ /*
  80. X+  * Changed slightly to compile under Solaris (Mon May 23 1994)
  81. X+  * by g1jmason@cdf (Jamie Mason).
  82. X+  */
  83. X*** makefile.bsd.old    Fri Oct 30 14:55:06 1992
  84. X--- makefile.solaris    Mon May 23 03:43:16 1994
  85. X***************
  86. X*** 1,6 ****
  87. X  # makefile.bsd    (c) copyright 1991    (Dan Heller)
  88. X- # SunOS users should add -DSUN_3_5, -DSUN_4_0, or -DSUN_4_1 to CFLAGS.
  89. X  #
  90. X  HDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h pop.h
  91. X  
  92. X  SRCS= main.c init.c misc.c mail.c hdrs.c execute.c commands.c print.c dates.c \
  93. X--- 1,13 ----
  94. X+ # makefile.solaris adapted by g1jmason@cdf from:
  95. X  # makefile.bsd    (c) copyright 1991    (Dan Heller)
  96. X  #
  97. X+ # Solaris users should compiler with /usr/ucb/cc.  Solaris most closely
  98. X+ #    resembles SunOS 4.0.  Use that as a starting point, defining
  99. X+ #    SUN_4_0 instead ofBSD.  Define SOLARIS_TZ as well, because Solaris
  100. X+ #    uses the SYSV tzname stuff, not the BSD timezone() stuff.  Also,
  101. X+ #    link with -ltermcap instead of -ltermlib.  All of these changes
  102. X+ #    are incorporated in the file and seem to be enough.
  103. X+ #
  104. X  HDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h pop.h
  105. X  
  106. X  SRCS= main.c init.c misc.c mail.c hdrs.c execute.c commands.c print.c dates.c \
  107. X***************
  108. X*** 22,31 ****
  109. X  
  110. X  # See the README for changes needed to compile under Ultrix.
  111. X  # In particular, you may need -DSIGRET=void and/or -ltermcap.
  112. X! CFLAGS= -O -DCURSES -DBSD
  113. X  LDFLAGS=
  114. X  LINTFLAGS= -bxah -Dlint -DCURSES -DBSD
  115. X! LIBS= -lcurses -ltermlib
  116. X  OTHERLIBS=
  117. X  # Use some variant of this one if you #define MMDF in config.h
  118. X  #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
  119. X--- 29,39 ----
  120. X  
  121. X  # See the README for changes needed to compile under Ultrix.
  122. X  # In particular, you may need -DSIGRET=void and/or -ltermcap.
  123. X! CC= /usr/ucb/cc
  124. X! CFLAGS= -O -DCURSES -DSUN_4_0 -DSOLARIS_TZ
  125. X  LDFLAGS=
  126. X  LINTFLAGS= -bxah -Dlint -DCURSES -DBSD
  127. X! LIBS= -lcurses -ltermcap
  128. X  OTHERLIBS=
  129. X  # Use some variant of this one if you #define MMDF in config.h
  130. X  #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
  131. X***************
  132. X*** 32,38 ****
  133. X  
  134. X  mush: $(OBJS)
  135. X      @echo loading...
  136. X!     @cc $(LDFLAGS) $(OBJS) $(LIBS) $(OTHERLIBS) -o mush
  137. X  
  138. X  $(OBJS): config.h mush.h
  139. X  loop.o: version.h
  140. X--- 40,46 ----
  141. X  
  142. X  mush: $(OBJS)
  143. X      @echo loading...
  144. X!     @$(CC) $(LDFLAGS) $(OBJS) $(LIBS) $(OTHERLIBS) -o mush
  145. X  
  146. X  $(OBJS): config.h mush.h
  147. X  loop.o: version.h
  148. X*** dates.c.old    Fri Oct 30 14:55:05 1992
  149. X--- dates.c    Mon May 23 03:30:51 1994
  150. X***************
  151. X*** 122,128 ****
  152. X  {
  153. X      struct tm *T;
  154. X      char *tz;
  155. X! #if defined(SYSV) || defined(TIMEZONE)
  156. X      long      x;
  157. X  
  158. X      (void) time(&x);
  159. X--- 122,131 ----
  160. X  {
  161. X      struct tm *T;
  162. X      char *tz;
  163. X! 
  164. X! /* Added an extra clause to deal with the fact that Solaris
  165. X!    uses the SYSV tzname stuff */
  166. X! #if defined(SYSV) || defined(TIMEZONE) || defined(SOLARIS_TZ)
  167. X      long      x;
  168. X  
  169. X      (void) time(&x);
  170. X***************
  171. X*** 133,139 ****
  172. X      tz = tzname[T->tm_isdst];
  173. X      }
  174. X  #endif /* TIMEZONE */
  175. X! #else /* SYSV || TIMEZONE */
  176. X      extern char     *timezone();
  177. X      struct timeval  mytime;
  178. X      struct timezone myzone;
  179. X--- 136,142 ----
  180. X      tz = tzname[T->tm_isdst];
  181. X      }
  182. X  #endif /* TIMEZONE */
  183. X! #else /* SYSV || TIMEZONE || SOLARIS_TZ */
  184. X      extern char     *timezone();
  185. X      struct timeval  mytime;
  186. X      struct timezone myzone;
  187. END_OF_FILE
  188. echo shar: Removing tempfiles created by patch
  189. rm version.h.orig makefile.solaris.orig dates.c.orig 
  190. echo shar: Copying new \"'makefile.solaris'\" to \"'Makefile'\"
  191. cp makefile.solaris Makefile
  192. echo shar: Copying \"'config.h-dist'\" to \"'config.h'\"
  193. cp config.h-dist config.h
  194. echo shar: End of shell patch.
  195. exit 0
  196.  
  197.