home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / mail / mh / 1452 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  6.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!tik.vtt.fi!tik.vtt.fi!tml
  2. From: tml@tik.vtt.fi (Tor Lillqvist)
  3. Newsgroups: comp.mail.mh
  4. Subject: HP-UX shared library and ANSI C patch for MH 6.8
  5. Date: 30 Dec 1992 21:58:51 GMT
  6. Organization: Technical Research Centre of Finland, Laboratory for Information
  7.     Processing (VTT/TIK)
  8. Lines: 226
  9. Message-ID: <TML.92Dec30235851@hemuli.tik.vtt.fi>
  10. NNTP-Posting-Host: tik.vtt.fi
  11.  
  12. I patched MH 6.8 to compile with the ANSI C compiler and to use shared
  13. libraries on HP-UX 8.07.  Here are the diffs.  Please apply with care,
  14. you probably don't want to blindly apply the diff to MH and mtstailor.
  15.  
  16. If you use shared libraries on HP-UX, first do "make inst-lib", then "make".
  17.  
  18. Binary files /u3/tmp/mh-6.8/READ-ME and ./READ-ME differ
  19. diff -rc1 /u3/tmp/mh-6.8/conf/MH ./conf/MH
  20. *** /u3/tmp/mh-6.8/conf/MH    Tue Dec 15 18:52:42 1992
  21. --- ./conf/MH    Wed Dec 30 14:00:21 1992
  22. ***************
  23. *** 1,9 ****
  24. ! # @(#)$Id: MH,v 1.7 90/04/06 09:44:31 sources Exp $
  25. ! # a 4.2BSD VAX system running SendMail
  26. ! bin    /usr/local
  27. ! bboards    on
  28.   etc    /usr/local/lib/mh
  29. ! mail    /usr/spool/mail
  30. ! manuals    local
  31. ! mts    sendmail
  32. ! options    BSD42
  33. --- 1,36 ----
  34. ! # hp9000 machines at tik.vtt.fi running hp-ux 8.*
  35. ! bboards    off
  36. ! bin    /usr/local/bin/mh
  37. ! cc    cc -Aa -D_HPUX_SOURCE
  38. ! curses    -lcurses
  39.   etc    /usr/local/lib/mh
  40. ! ldoptlibs    -ldbm
  41. ! mail    /usr/mail
  42. ! mailgroup    mail
  43. ! mandir    /usr/local/man
  44. ! manuals    standard
  45. ! mts    sendmail/smtp
  46. ! pop    off
  47. ! remove    rm -f
  48. ! signal    void
  49. ! sharedlib hpux8
  50. ! slflags    +z
  51. ! sprintf int
  52. ! options    BIND
  53. ! options    DUMB
  54. ! options    FOLDPROT='"700"'
  55. ! options    LOCKF
  56. ! options MHE
  57. ! options MHRC
  58. ! options MIME
  59. ! options MORE='"/usr/local/bin/less"'
  60. ! options    RENAME
  61. ! options    SOCKETS
  62. ! options    SVR4
  63. ! options    SYS5
  64. ! options    SYS5DIR
  65. ! options    TERMINFO
  66. ! options    TZNAME
  67. ! options    UNISTD
  68. ! options    VSPRINTF
  69. ! options NTOHLSWAP
  70. diff -rc1 /u3/tmp/mh-6.8/conf/config/mtstailor ./conf/config/mtstailor
  71. *** /u3/tmp/mh-6.8/conf/config/mtstailor    Tue Dec 15 18:52:44 1992
  72. --- ./conf/config/mtstailor    Wed Dec 30 15:46:42 1992
  73. ***************
  74. *** 2,4 ****
  75.   mmdflfil:    @(MHDROPFIL)
  76.   hostable:    @(MHETCPATH)/hosts
  77. ! servers:    localhost \01localnet
  78. --- 2,13 ----
  79.   mmdflfil:    @(MHDROPFIL)
  80. + uucpldir:    /usr/spool/mail
  81. + uucplfil:    
  82. + mmdelim1:    \001\001\001\001\n
  83. + mmdelim2:    \001\001\001\001\n
  84. + mmailid:    0
  85. + umincproc:
  86. + localname:    tik.vtt.fi
  87. + lockldir:
  88.   hostable:    @(MHETCPATH)/hosts
  89. ! servers:    tik.vtt.fi
  90. diff -rc1 /u3/tmp/mh-6.8/conf/makefiles/sbr ./conf/makefiles/sbr
  91. *** /u3/tmp/mh-6.8/conf/makefiles/sbr    Tue Dec 15 18:53:12 1992
  92. --- ./conf/makefiles/sbr    Wed Dec 30 13:18:55 1992
  93. ***************
  94. *** 28,29 ****
  95. --- 28,32 ----
  96.   @END: SUN4SHLIB
  97. + @BEGIN: HPUX8SHLIB
  98. + # The shared library is renamed to libmh.sl when installed
  99. + @END: HPUX8SHLIB
  100.   LIBS     =    shared libmh.a libmh.so $(LIBSA)
  101. ***************
  102. *** 119,120 ****
  103. --- 122,126 ----
  104.   @END: SYS5SHLIB
  105. + @BEGIN: HPUX8SHLIB
  106. +         (cd shared; ld -b -o ../$@ $(OFILES))
  107. + @END: HPUX8SHLIB
  108.           -@rm -f $@.$(SLIBVER)
  109. ***************
  110. *** 147,149 ****
  111.   @BEGIN: SHAREDLIB
  112. ! inst-lib:    libmh.so $(LIBSA)
  113.           -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
  114. --- 153,155 ----
  115.   @BEGIN: SHAREDLIB
  116. ! inst-lib:    shared libmh.so $(LIBSA)
  117.           -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
  118. ***************
  119. *** 165,166 ****
  120. --- 171,177 ----
  121.   @END: SUN4SHLIB
  122. + @BEGIN: HPUX8SHLIB
  123. +         mv $(SLIBDIR)/libmh.so.$(SLIBVER) $(SLIBDIR)/libmh.$(SLIBVER).sl
  124. +         -@ls -l $(SLIBDIR)/libmh.$(SLIBVER).sl
  125. +         -@echo "Shared library renamed as per HP-UX convention"
  126. + @END: HPUX8SHLIB
  127.   @END: SHAREDLIB
  128. diff -rc1 /u3/tmp/mh-6.8/conf/makefiles/uip ./conf/makefiles/uip
  129. *** /u3/tmp/mh-6.8/conf/makefiles/uip    Tue Dec 15 18:53:14 1992
  130. --- ./conf/makefiles/uip    Wed Dec 30 13:45:10 1992
  131. ***************
  132. *** 124,125 ****
  133. --- 124,129 ----
  134.   @END: SHAREDLIB
  135. + @BEGIN: HPUX8SHLIB
  136. + # On HP-UX 8.0, no LD_LIBRARY_PATH
  137. + LD    =    @(MHCOMPILER)
  138. + @END: HPUX8SHLIB
  139.   @BEGIN: OPTIM
  140. ***************
  141. *** 145,146 ****
  142. --- 149,154 ----
  143.   LDLIBS    =    $(LDLIBES) ../config/version.o $(LDOPTLIB)
  144. + @BEGIN: HPUX8SHLIB
  145. + LDLIBES =    ../config/config.o -L@(SLIBDIR) -lmh.@(SLIBVER) \
  146. +         ../mts/libmts.a  ../zotnet/libzot.a
  147. + @END: HPUX8SHLIB
  148.   @END: SHAREDLIB
  149. diff -rc1 /u3/tmp/mh-6.8/conf/mh-gen.8 ./conf/mh-gen.8
  150. *** /u3/tmp/mh-6.8/conf/mh-gen.8    Tue Dec 15 18:53:15 1992
  151. --- ./conf/mh-gen.8    Wed Dec 30 13:48:11 1992
  152. ***************
  153. *** 511,512 ****
  154. --- 511,516 ----
  155.   If you enable this, be sure to also use \*(lqoptions SVR4\*(rq.
  156. + If \*(lqhpux8\*(rq,
  157. + makes libmh into a HP-UX 8 (and presumably later) shared library.
  158. + If you enable this, be sure to also use \*(lqslflags +z\*(rq, and to
  159. + do a \*(rqmake inst-lib\*(lq before you do the \*(rqmake\*(lq.
  160.   
  161. diff -rc1 /u3/tmp/mh-6.8/conf/mhconfig.c ./conf/mhconfig.c
  162. *** /u3/tmp/mh-6.8/conf/mhconfig.c    Tue Dec 15 18:53:16 1992
  163. --- ./conf/mhconfig.c    Wed Dec 30 12:37:07 1992
  164. ***************
  165. *** 452,453 ****
  166. --- 452,457 ----
  167.       fprintf (fp, "/^@BEGIN: SYS5SHLIB$/,/^@END: SYS5SHLIB$/d\n");
  168. +     if (strcmp (sharedlib, "hpux8") == 0)
  169. +     fprintf (fp, "/^@BEGIN: HPUX8SHLIB$/d\n/^@END: HPUX8SHLIB$/d\n");
  170. +     else
  171. +     fprintf (fp, "/^@BEGIN: HPUX8SHLIB$/,/^@END: HPUX8SHLIB$/d\n");
  172.   
  173. ***************
  174. *** 763,764 ****
  175. --- 767,769 ----
  176.           && strcmp (sharedlib, "sun4") && strcmp (sharedlib, "sys5")
  177. +         && strcmp (sharedlib, "hpux8")
  178.           && strcmp (sharedlib, "secure"))
  179. ***************
  180. *** 765,767 ****
  181.       adios (NULLCP,
  182. !         "sharedlib should be either \"sun4\", \"sys5\", or \"off\", not %s",
  183.           sharedlib);
  184. --- 770,772 ----
  185.       adios (NULLCP,
  186. !         "sharedlib should be either \"sun4\", \"sys5\", \"hpux8\" or \"off\", not %s",
  187.           sharedlib);
  188. diff -rc1 /u3/tmp/mh-6.8/config/version.sh ./config/version.sh
  189. *** /u3/tmp/mh-6.8/config/version.sh    Tue Dec 15 18:53:19 1992
  190. --- ./config/version.sh    Tue Dec 29 16:01:35 1992
  191. ***************
  192. *** 42,44 ****
  193.   cat version ${Patch} |\
  194. ! awk -F. '
  195.   BEGIN    { split ("'"${1}"'", ver, ".");\
  196. --- 42,44 ----
  197.   cat version ${Patch} |\
  198. ! gawk -F. '
  199.   BEGIN    { split ("'"${1}"'", ver, ".");\
  200. diff -rc1 /u3/tmp/mh-6.8/uip/vmh.c ./uip/vmh.c
  201. *** /u3/tmp/mh-6.8/uip/vmh.c    Tue Dec 15 18:56:08 1992
  202. --- ./uip/vmh.c    Tue Dec 29 17:18:17 1992
  203. ***************
  204. *** 57,59 ****
  205.   #endif
  206. ! #ifdef    hpux
  207.   #include <termio.h>
  208. --- 57,59 ----
  209.   #endif
  210. ! #ifdef    __hpux
  211.   #include <termio.h>
  212. diff -rc1 /u3/tmp/mh-6.8/zotnet/bboards/getbbent.c ./zotnet/bboards/getbbent.c
  213. *** /u3/tmp/mh-6.8/zotnet/bboards/getbbent.c    Tue Dec 15 18:56:11 1992
  214. --- ./zotnet/bboards/getbbent.c    Tue Dec 29 17:11:49 1992
  215. ***************
  216. *** 82,84 ****
  217.   
  218. ! #if    defined(__STDC__) && defined(SVR4)
  219.   #include <crypt.h>
  220. --- 82,84 ----
  221.   
  222. ! #if    defined(__STDC__) && defined(SVR4) && !defined(__hpux)
  223.   #include <crypt.h>
  224. ***************
  225. *** 85,87 ****
  226.   #endif
  227. ! #if    defined(UNISTD) || defined(_AIX)
  228.   #include <unistd.h>
  229. --- 85,87 ----
  230.   #endif
  231. ! #if    defined(UNISTD) || defined(_AIX) || defined(__hpux)
  232.   #include <unistd.h>
  233. --
  234. Tor Lillqvist,
  235. working, but not speaking, for the Technical Research Centre of Finland,
  236. Laboratory for Information Processing (VTT/TIK).
  237.