[comp.sys.m88k] patches for Gnu bash and fgrep enclosed

newton@gumby.cs.caltech.edu (Mike Newton) (06/09/91)

Here's the patches I used to get bash 1.09 (1.08 +
patch 1) and fgrep working... or at least they seemed
to.  The patches are for DG/UX 4.31, but should work
with minor tweaks for others... (see note 3 of the 
bash patch in particular).

Lost in time and space -- let alone reality,
- mike (newton@gumby.cs.caltech.edu)

ps: i received no responses to the query about 
MO drives...  isn't anyone using them?


---------------->> fgrep1.1 patches <<----------------
*** unix.h.D	Sat Jun  8 07:20:10 1991
--- unix.h	Sat Jun  8 07:22:49 1991
***************
*** 52,58 ****
--- 52,60 ----
  extern int EXFUN(read, (int, char *, size_t));
  extern int EXFUN(stat, (const char *, struct stat *));
  extern int EXFUN(fstat, (int, struct stat *));
+ #ifndef DGUX		/* DGUX 4.31 has this unsigned long */
  extern int EXFUN(umask, (int));
+ #endif /* DGUX */
  extern int EXFUN(unlink, (const char *));
  extern int EXFUN(wait, (int *));
  extern int EXFUN(write, (int, const char *, size_t));



---------------->> bash 1.09 patches <<----------------
*** machines.h.D	Sat Jun  8 11:25:48 1991
--- machines.h	Sat Jun  8 13:07:44 1991
***************
*** 708,714 ****
  /*	DG AViiON	    */
  /*			    */
  /* ************************ */
! /* This is for the DG AViioN box (runs DG/UX with both AT&T & BSD features.) */
  #if defined (__DGUX__) || defined (DGUX)
  #define M_MACHINE "AViiON"
  #define M_OS USG
--- 708,715 ----
  /*	DG AViiON	    */
  /*			    */
  /* ************************ */
! /* This is for the DG AViiON box (runs DG/UX with both AT&T & BSD features.) */
! /* WARNING: use oawk or gawk (ie: make AWK=oawk ) to make ! */
  #if defined (__DGUX__) || defined (DGUX)
  #define M_MACHINE "AViiON"
  #define M_OS USG
***************
*** 715,726 ****
  #undef HAVE_GETWD
  /* DG/UX 4.x comes standard with gcc */
  #define HAVE_GCC
  #if !defined (DGUX)		/* Must define -DDGUX because cpp doesn't. */
! #  define SYSDEP_CFLAGS \
! 	-D_M88KBCS_SOURCE -D_POSIX_SOURCE -D_POSIX_JOB_CONTROL -DDGUX
  #else
! #  define SYSDEP_CFLAGS \
! 	-D_M88KBCS_SOURCE -D_POSIX_SOURCE -D_POSIX_JOB_CONTROL
  #endif /* !DGUX */
  #define USE_TERMCAP_EMULATION
  #define HAVE_MULTIPLE_GROUPS
--- 716,742 ----
  #undef HAVE_GETWD
  /* DG/UX 4.x comes standard with gcc */
  #define HAVE_GCC
+ /* 1: it seems to make no sense to define _M88KBCS_SOURCE if not also
+  * _M88KBCS_TARGET ... also, compilation doesnt work unless we do so.  
+  * 2: There also seems to be an eror in 4.30 sys/_int_features.h
+  * in that _USING_BSD_OR_DGUX depends on __using_DGUX, but this 
+  * requires _DGUX (or other stuff -- "... when DG/UX-only source features
+  * are desired to be visibile), yet if we have _M88KBCS_TARGET,
+  * we should not allow full 88kBCS features, which does not happen
+  * (as _DGUX_SOURCE nor __using_DGUX) has been defined.  This shows
+  * up in the bizzare includes w/i sys/time.h.  Fix: include the
+  * _DGUX_SOURCE macro.
+  * 3: Finally, in the opposite dir, for DGUX only (ie: not for 88KBCS
+  * compliant OS's, struct rusage does not exist.  But we like it,
+  * so we add _TARGETING_DGUX too.  uck.
+  *  -- newton@gumby.cs.caltech.edu
+  */
  #if !defined (DGUX)		/* Must define -DDGUX because cpp doesn't. */
! #  define SYSDEP_CFLAGS -D_DGUX_SOURCE -D_TARGETTING_DGUX \
!   -D_M88KBCS_SOURCE -D_M88KBCS_TARGET -D_POSIX_SOURCE -D_POSIX_JOB_CONTROL -DDGUX
  #else
! #  define SYSDEP_CFLAGS -D_DGUX_SOURCE -D_TARGETTING_DGUX \
!   -D_M88KBCS_SOURCE -D_M88KBCS_TARGET -D_POSIX_SOURCE -D_POSIX_JOB_CONTROL
  #endif /* !DGUX */
  #define USE_TERMCAP_EMULATION
  #define HAVE_MULTIPLE_GROUPS