Filewatcher File Search File Search
Catalog
Content Search
» » » » » » perl-5.6.0-17.src.rpm » Content »
pkg://perl-5.6.0-17.src.rpm:4439898/  info  HEADER  downloads

perl - The Perl programming language.…  more info»

perl-5.6.0-nodb.patch

--- perl-5.6.0/ext/NDBM_File/Makefile.PL.nodb	Tue Jul 20 19:17:56 1999
+++ perl-5.6.0/ext/NDBM_File/Makefile.PL	Thu Mar 23 17:54:21 2000
@@ -2,6 +2,7 @@
 WriteMakefile(
     NAME	=> 'NDBM_File',
     LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+    CCFLAGS => '-I/usr/include/db1 -Dbool=char -DHAS_BOOL',
     MAN3PODS 	=> {}, 	# Pods will be built by installman.
     XSPROTOARG => '-noprototypes', 		# XXX remove later?
     VERSION_FROM => 'NDBM_File.pm',
--- perl-5.6.0/hints/linux.sh.nodb	Sun Mar 19 08:37:24 2000
+++ perl-5.6.0/hints/linux.sh	Thu Mar 23 17:54:21 2000
@@ -70,7 +70,12 @@
 
 # BSD compatability library no longer needed
 # 'kaffe' has a /usr/lib/libnet.so which is not at all relevent for perl.
-set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'`
+set `echo X "$libswanted "| \
+    sed -e 's/ bsd / /' \
+	-e 's/ net / /' \
+	-e 's/ db / /' \
+	-e 's/ gdbm / /' \
+	-e 's/ ndbm / /'`
 shift
 libswanted="$*"
 
--- perl-5.6.0/t/lib/ndbm.t.nodb	Tue Jul 20 19:18:13 1999
+++ perl-5.6.0/t/lib/ndbm.t	Thu Mar 23 17:54:21 2000
@@ -103,7 +103,9 @@
 if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";}
 
 $h{'foo'} = '';
-$h{''} = 'bar';
+# stupid DB library does not support empty string as keys, so there
+# is nothing for perl to test here...
+$h{' '} = 'bar';
 
 # check cache overflow and numeric keys and contents
 $ok = 1;
@@ -120,7 +122,8 @@
 print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
 
 print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
-print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
+# same thing ... we used to test for $h{''}, but DB does not allow it
+print ($h{' '} eq 'bar' ? "ok 12\n" : "not ok 12\n");
 
 untie %h;
 unlink 'Op.dbmx.dir', $Dfile;
--- perl-5.6.0/t/lib/anydbm.t.nodb	Fri Mar  3 03:34:21 2000
+++ perl-5.6.0/t/lib/anydbm.t	Thu Mar 23 17:58:01 2000
@@ -101,7 +101,9 @@
 if ($#keys == 31) {print "ok 7\n";} else {print "not ok 7\n";}
 
 $h{'foo'} = '';
-$h{''} = 'bar';
+# stupid DB does not allow zero-length keys. Not perl's fault, really
+# so we test for $h{' '} instead of $h{''}
+$h{' '} = 'bar';
 
 # check cache overflow and numeric keys and contents
 $ok = 1;
@@ -118,7 +120,9 @@
 print join(':',200..400) eq join(':',@foo) ? "ok 10\n" : "not ok 10\n";
 
 print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
-if ($h{''} eq 'bar') {
+# stupid DB does not allow zero-length keys. Not perl's fault, really
+# so we test for $h{' '} instead of $h{''}
+if ($h{' '} eq 'bar') {
    print "ok 12\n" ;
 }
 else {
--- perl-5.6.0/Configure.nodb	Thu Mar 23 17:54:21 2000
+++ perl-5.6.0/Configure	Thu Mar 23 17:56:07 2000
@@ -12053,10 +12053,16 @@
 }
 EOCP
 	set try
+	# this is really stupid, but we have to link in the -ldb to have
+	# the above program succeed
+	_old_libs=$libs
+	libs="$libs -ldb"
 	if eval $compile_ok && ./try; then
 		echo 'Looks OK.' >&4
+		libs=$_old_libs
 	else
 		echo "I can't use Berkeley DB with your <db.h>.  I'll disable Berkeley DB." >&4
+		libs=$_old_libs
 		i_db=$undef
 		case " $libs " in
 		*"-ldb "*)
@@ -12099,7 +12105,7 @@
 }
 #endif
 EOCP
-	if $cc $ccflags -c try.c >try.out 2>&1 ; then
+	if $cc $ccflags -c try.c -ldb >try.out 2>&1 ; then
 		if $contains warning try.out >>/dev/null 2>&1 ; then
 			db_hashtype='int'
 		else
@@ -12144,7 +12150,7 @@
 }
 #endif
 EOCP
-	if $cc $ccflags -c try.c  >try.out 2>&1 ; then
+	if $cc $ccflags -c try.c -ldb >try.out 2>&1 ; then
 		if $contains warning try.out >>/dev/null 2>&1 ; then
 			db_prefixtype='int'
 		else
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com