From: irvin@BETELGEUSE.DARTMOUTH.EDU (Tim Irvin)
Newsgroups: comp.mail.mh
Subject: Re: MH 6.7.2 with AIX 3.1/3.2
Date: 8 Apr 92 14:44:21 GMT
Reply-To: irvin@northstar.dartmouth.edu
Organization: The Internet


In message <9204080147.aa23946@q2.ics.uci.edu> you write:

> I did not see any postings re my request for a conf/MH file or options
> settings to compile 6.7.2 on AIX (3.2 or 3.1).
> Has anybody built 6.7.2 on AIX 3.2 or 3.1 ?
> I'd appreciate any help I can get.
> 
> Thanks,
> 
> 
> Mark Connell                           E-Mail:markcon@sydvm1.vnet.ibm.com
> APC Melbourne, IBM Australia

This file contains 3 things:
1. Notes I took while building MH on AIX 3.1
2. A patch (dtime.diff) see the notes
3. our conf/MH file for the 6000's

Good luck,

Tim Irvin
Systems Administrator
Project NORTHSTAR
Dartmouth College

-------------------------------

Here are some notes I wrote when I built it on AIX 3.1:

Compiling mh for the RISC System/6000s.  TBI (2/27/92)

   - The MH on the RS6ks require a bit of hand handholding.

   Apply the patch dtime.diff to zotnet/tws/dtime.c.

   Also, in the same directory dtimep.c must be created from dtimep.lex, however
   you can not do this on an RS/6000 (some lex bug).  So, rm dtimep.c (or
   better yet move it somewhere so you can get it back if necessary), then
   log on to something other than an RS/6k (I have used RTs and Sun4s before).
   Now cd to ../zotnet/tws and make dtimep.c.  You should see the lex
   stuff....

   Now, in dtimep.c look for #include <time.h> and change that section to read:

        #ifdef  DSTXXX
        #ifndef BSD42
        #include <time.h>
        #else   BSD42
        #ifdef _AIX
        #include <time.h>
        #endif _AIX
        #include <sys/time.h>
        #endif  BSD42

   Now check mts/mts.c:  on or about line 295 look for "case NULL:" change this
   to "case 0:"

   Look in config/version.sh and sbr/version.sh.  Find the awk script in both.
   Each line in the awk script should NOT  have a '\' as the last character.


---------------------------------------------
dtime.diff follows:

*** dtime.c.orig	Thu Feb 27 12:31:27 1992
--- dtime.c	Thu Feb 27 12:38:13 1992
***************
*** 146,151 ****
--- 146,154 ----
  #if	!defined(SYS5) && !defined(ZONEINFO)
      struct timeb    tb;
  #endif	/* !defined(SYS5) && !defined(ZONEINFO) */
+ #ifdef _AIX  /* Added TBI (2/27/92) -- Fix for bug in AIX */
+     struct tm gmt;
+ #endif
      static struct tws   tw;
  
      if (!clock)
***************
*** 163,168 ****
--- 166,189 ----
      tw.tw_yday = tm -> tm_yday;
      if (tm -> tm_isdst)
  	tw.tw_flags |= TW_DST;
+ 
+ #ifdef _AIX
+ /* Bug in AIX -- timezone returns wrong value.  Routine stolen from
+  * sendmail's arpadate - TBI (2/27/92)
+  */
+     gmt = *gmtime(clock);
+     tw.tw_zone = (tm->tm_hour - gmt.tm_hour) * 60 + tm->tm_min - gmt.tm_min;
+ 
+     /* assume that offset isn't more than a day ... */
+     if (tm->tm_year < gmt.tm_year)
+             tw.tw_zone -= 24 * 60;
+     else if (tm->tm_year > gmt.tm_year)
+             tw.tw_zone += 24 * 60;
+     else if (tm->tm_yday < gmt.tm_yday)
+             tw.tw_zone -= 24 * 60;
+     else if (tm->tm_yday > gmt.tm_yday)
+             tw.tw_zone += 24 * 60;
+ #else	/* _AIX -- TBI (2/27/92) */
  #if	defined(SYS5)
      tzset ();
      tw.tw_zone = -(timezone / 60);
***************
*** 174,179 ****
--- 195,201 ----
      tw.tw_zone = -tb.timezone;
  #endif	/* defined(ZONEINFO) */
  #endif	/* defined(SYS5) */
+ #endif	/* _AIX --  TBI (2/27/92) */
      tw.tw_flags &= ~TW_SDAY, tw.tw_flags |= TW_SEXP;
      tw.tw_flags &= ~TW_SZONE, tw.tw_flags |= TW_SZEXP;
      tw.tw_clock = *clock;

-----------------------------------------
conf/MH follows:

#
# MH file for RS/6000s
#
# by: Tim Irvin NORTHSTAR
#
bin		/usr/local/bin
bboards		off
cc		bsdcc
ccoptions	-O
chown		/etc/chown
curses		-lcurses
editor		prompter
etc		/usr/local/lib/mh
mail		/usr/spool/mail
mandir		/usr/man
manuals		standard
mts		sendmail/smtp
mf		off
options		ATHENA BIND BSD42 BSD43 ATZ DUMB ISI MHRC MHE NTOHLSWAP
options		OVERHEAD RPATHS SBACKUP='"\\043"' 
options		AIX AIX3_1 TYPESIG=int SYS5 SYS5DIR 
options		TZNAME WHATNOW
pop		off
ranlib		on
remove		mv -f
sprintf		int
Newsgroups: comp.mail.mh