Subject: db.1.85 patches for SGI Irix 6.2

From: [email-masked] (Ariel Faigon)
Date: Mon, 23 Oct 1995 14:10:53 -0700 (PDT)

[I'm now mailing from SGI, and I had a funny reverse alias name
 in my previous mail, but I'm the same guy]

Hi Keith,

Your last mail was very helpful. I managed to compile db.1.85 and run
all tests successfully on both SGI IRIX 5.3 and IRIX 6.2 (Alpha)

Here are the patches/comments:

1) SGI IRIX doesn't have 'rev', since I didn't have the berkeley sources
   handy, and ftp.uu.net was too loaded to let me in, I just replaced
   'rev' with an inline perl script (perl comes standard with IRIX).
   This is not so nice, I admit, but relying on 'rev' isn't either :-)

-------------------------------------
*** run.test.orig	Thu Sep  1 15:04:44 1994
--- run.test	Mon Oct 23 13:11:49 1995
***************
*** 16,21 ****
--- 16,23 ----
  		DICT=/usr/share/dict/words
  	elif [ -f /usr/dict/words ]; then
  		DICT=/usr/dict/words
+ 	elif [ -f /usr/share/lib/dict/words ]; then
+ 		DICT=/usr/share/lib/dict/words
  	else
  		echo 'run.test: no dictionary'
  		exit 1
***************
*** 537,543 ****
  	awk '{ for (i = 1; i < 20001; ++i) print $0 }' > $TMP1
  	for type in btree; do
  		rm -f $TMP2 $TMP3
! 		for i in `sed 20000q $DICT | rev`; do
  			echo p
  			echo k$i
  			echo d$mdata
--- 539,549 ----
  	awk '{ for (i = 1; i < 20001; ++i) print $0 }' > $TMP1
  	for type in btree; do
  		rm -f $TMP2 $TMP3
! 		for i in `sed 20000q $DICT | \
! 			perl -e 'while (<>) { \
! 				 chop; \
! 				 print STDOUT (scalar(reverse($_)),"\n"); \
! 			}'`; do
  			echo p
  			echo k$i
  			echo d$mdata

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

2) IRIX 6.2 is POSIX (among other standards) compliant so 'strerror.o'
   is not needed separately in the test/Makefile file.
   Note: this is only for the irix.6.2 (5.3. aparently needs strerror.o)

*** test/Makefile.orig	Sun Aug 28 08:42:52 1994
--- test/Makefile	Mon Oct 23 13:27:56 1995
***************
*** 1,7 ****
  #	@(#)Makefile	8.15 (Berkeley) 7/28/94
  
  PROG=	dbtest
! OBJS=	dbtest.o strerror.o
  
  # Uncomment the STAT line get hash and btree statistical use info.  This
  # also forces ld to load the btree debug functions for use by gdb, which
--- 1,7 ----
  #	@(#)Makefile	8.15 (Berkeley) 7/28/94
  
  PROG=	dbtest
! OBJS=	dbtest.o
  
  # Uncomment the STAT line get hash and btree statistical use info.  This
  # also forces ld to load the btree debug functions for use by gdb, which

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

3) In PORT/irix.[56].*/Makefile
  I recommend replacing the arguments to 'ar' with 'rcs' (unlike
  the original patch I sent you (which used 'cqs'). lorder, tsort, and
  ranlib are not needed. Here is the relevant part:

${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
	rm -f $@
	ar rcs $@ ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}

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

That's all. Thanks again,
--Ariel				http://www.yendor.com/