Subject: Pine 3.94 patches for DG/UX

From: Ken Weaverling <[email-masked]>
Date: Fri, 21 Jun 1996 13:53:26 -0400

The below patches make pine 3.94 work beautifully on DG/UX, 4.11, m88k.
I believe it should also work for Intel DG/UX systems, but not so sure
about pre-4.11 boxes, especially pre 3.10.

To apply this patch, unzip and untar the pine distribution from 
ftp.cac.washington.edu, then cd into pine3.94, and finally pipe this file
into patch (make sure to use the -p option.)

For example:

  zcat pine3.94.tar.gz | tar xvof -    # zcat comes standard on 4.11 now
  cd pine3.94
  cat thispatchfile | patch -p

*OR* if you lack the patch program, you can grab the edited files and 
park them manually in place from ftp://hopi.dtcc.edu/pub/dgux/pine/
and place them in

   imap/ANSI/c-client/os_d-g.c
   imap/ANSI/c-client/Makefile
   pine/makefile.d-g
   pine/osdep/os-sv4.h

When you are all done, simply "./build d-g" to hopefully get a successful
pine compile.  (I also put a binary of patch in that directory too,
if you need it.)

Note that this is tested with DG/UX 4.11 under 88k platform. The utime()
controversy still exists "unconditionally" for 88k boxes and can be set to
work the same weird way with intel boxes iff you #define _USEC_UTIME_FLAVOR,
which I did in this patch.  The symptom of this not working right will be
weird messages when quitting pine that the folder time was changed but no
changes were found (paraphrased greatly) and folder times of Dec 31, 1969

*** imap/ANSI/c-client/os_d-g.c.orig	Fri Jun 21 11:44:23 1996
--- imap/ANSI/c-client/os_d-g.c	Fri Jun 21 11:45:07 1996
***************
*** 36,39 ****
--- 36,41 ----
  #include "tcp_unix.h"		/* must be before osdep includes tcp.h */
  #include "mail.h"
+ #define _USEC_UTIME_FLAVOR
+ #include <utime.h>
  #include "osdep.h"
  #include <stdio.h>
***************
*** 48,56 ****
  extern int errno;		/* just in case */
  #include <pwd.h>
- #include <utime.h>
  #include "misc.h"
  
! char *crypt (char *key,char *salt);
! 
  
  #include "fs_unix.c"
--- 50,56 ----
  extern int errno;		/* just in case */
  #include <pwd.h>
  #include "misc.h"
  
! #define setpgrp setpgrp2
  
  #include "fs_unix.c"
*** pine/makefile.d-g.orig	Fri Jun 21 11:50:42 1996
--- pine/makefile.d-g	Fri Jun 21 11:51:00 1996
***************
*** 50,54 ****
  OPTIMIZE=    # -O
  PROFILE=     # -pg
! DEBUG=       -g -DDEBUG
  
  IMAPDIR=     ../c-client
--- 50,54 ----
  OPTIMIZE=    # -O
  PROFILE=     # -pg
! DEBUG=       # -g # -DDEBUG
  
  IMAPDIR=     ../c-client
***************
*** 59,63 ****
  LIBES=       $(EXTRALIBES) $(LOCLIBES) $(STDLIBES)
  
! STDCFLAGS=   -Dconst= -DSV4 -DSYSTYPE=\"D-G\" -DMOUSE
  CFLAGS=      $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
  
--- 59,63 ----
  LIBES=       $(EXTRALIBES) $(LOCLIBES) $(STDLIBES)
  
! STDCFLAGS=   -DSV4 -DSYSTYPE=\"D-G\" -DMOUSE
  CFLAGS=      $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
  
*** imap/ANSI/c-client/Makefile.orig	Fri Jun 21 11:52:55 1996
--- imap/ANSI/c-client/Makefile	Fri Jun 21 11:56:48 1996
***************
*** 131,135 ****
  		ACTIVEFILE=/local/news/active NEWSSPOOL=/var/spool/news \
  		RSH=remsh RSHPATH=/usr/bin/remsh \
! 		CFLAGS="-g -Dconst= -DNFSKLUDGE $(EXTRACFLAGS)" RANLIB=true
  
  dpx:	# Bull DPX/2
--- 131,135 ----
  		ACTIVEFILE=/local/news/active NEWSSPOOL=/var/spool/news \
  		RSH=remsh RSHPATH=/usr/bin/remsh \
! 		CFLAGS="-g -DNFSKLUDGE $(EXTRACFLAGS)" RANLIB=true
  
  dpx:	# Bull DPX/2
*** pine/osdep/os-sv4.h.orig	Fri Jun 21 13:07:32 1996
--- pine/osdep/os-sv4.h	Fri Jun 21 13:08:00 1996
***************
*** 280,284 ****
--- 280,289 ----

+ /*-------- For DG/UX systems, define setpgrp to be setpgrp2 -------------*/
+ #ifdef DGUX
+ #define setpgrp setpgrp2
+ #endif
  
+ 
  /*
   * Choose one of the following three terminal drivers

-- 
Ken Weaverling,  Delaware Tech     (WHOIS: KJW)  *         [email-masked]
finger [email-masked]@publickey.com for PGP key. * http://www.dtcc.edu/~weave/