[gnu.utils.bug] Diffs to ease using GNU diff on all those different USG systems

jkp@SAUNA.HUT.FI (Jyrki Kuoppala) (05/18/89)

Here are a few lines of diffs to help all us USG users to use GNU
diff.  These are needed at least for USG 5.2 systems with an add-on
ndir library and I hope they can be included in future versions of GNU
diff.

Here comes:

diff -cr diff/Makefile diff.a/Makefile
*** diff/Makefile	Fri Feb 24 19:40:43 1989
--- diff.a/Makefile	Wed May 17 23:19:32 1989
***************
*** 24,34 ****
  CC=gcc -O
  CFLAGS = -g
  INSTALL = install
- 
- # On system V, enable these three lines:
- # CFLAGS = -g -DUSG
- # LIBS = -lPW
  # INSTALL = cp
  
  bindir=/usr/local/bin
  prefix=
--- 24,41 ----
  CC=gcc -O
  CFLAGS = -g
  INSTALL = install
  # INSTALL = cp
+ LIBS = 
+ 
+ # You might need to do some of these things on System V machines:
+ # Add -DUSG to CFLAGS
+ # Uncomment the line 'INSTALL = cp' in this Makefile
+ # Add -DNDIR to CFLAGS if your system used ndir.h instead of dirent.h
+ # Add -DDIRECT to CFLAGS if your system uses 'struct direct' instead of
+ # 'struct dirent' (this is the case at least with one add-on ndir 
+ # library)
+ # Add -lndir to LIBS if your ndir routines aren't in libc.a
+ # Add -lPW to LIBS if you don't compile with gcc (to get alloca)
  
  bindir=/usr/local/bin
  prefix=
diff -cr diff/diff.h diff.a/diff.h
*** diff/diff.h	Fri Feb 24 19:42:05 1989
--- diff.a/diff.h	Wed May 17 23:07:02 1989
***************
*** 25,37 ****
  
  #ifdef USG
  #include <time.h>
! #ifdef hp9000s800
  #include <ndir.h>
  #else
  #include <dirent.h>
  #endif
  #include <fcntl.h>
  #define direct dirent
  #else
  #include <sys/time.h>
  #include <sys/dir.h>
--- 25,39 ----
  
  #ifdef USG
  #include <time.h>
! #if defined(hp9000s800) || defined(NDIR)
  #include <ndir.h>
  #else
  #include <dirent.h>
  #endif
  #include <fcntl.h>
+ #ifndef DIRECT
  #define direct dirent
+ #endif
  #else
  #include <sys/time.h>
  #include <sys/dir.h>
diff -cr diff/diff3.c diff.a/diff3.c
*** diff/diff3.c	Sat Apr  8 21:56:10 1989
--- diff.a/diff3.c	Wed May 17 23:04:41 1989
***************
*** 25,30 ****
--- 25,31 ----
  #include <ctype.h>
  
  #ifdef USG
+ #include <fcntl.h>
  /* Define needed BSD functions in terms of sysV library.  */
  
  #define bcopy(s,d,n)	memcpy((d),(s),(n))