From: Paul Marquess Date: Mon, 22 Feb 1999 10:07:00 +0000 (+0000) Subject: DB_File 1.64 patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=20896112130a9b4a4cb85e4d0533df4c08faf441;p=p5sagit%2Fp5-mst-13.2.git DB_File 1.64 patch To: gsar@activestate.com (Gurusamy Sarathy) Cc: perl5-porters@perl.org (Perl5 Porters) Message-Id: <9902221007.AA17751@claudius.bfsec.bt.co.uk> p4raw-id: //depot/cfgperl@3011 --- diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes index 212ae5f..c71d5b8 100644 --- a/ext/DB_File/Changes +++ b/ext/DB_File/Changes @@ -218,6 +218,14 @@ 1.63 19th December 1998 - Fix to allow DB 2.6.x to build with DB_File - Documentation upadated to use push,pop etc in the RECNO example & to - include the find_dup & del_dup methods. + * Fix to allow DB 2.6.x to build with DB_File + * Documentation updated to use push,pop etc in the RECNO example & + to include the find_dup & del_dup methods. + +1.64 21st February 1999 + + * Tidied the 1.x to 2.x flag mapping code. + * Added a patch from Mark Kettenis to fix a flag + mapping problem with O_RDONLY on the Hurd + * Updated the message that db-recno.t prints when tests 51, 53 or 55 fail. + diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index dc68974..738de7c 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,10 +1,10 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (Paul.Marquess@btinternet.com) -# last modified 2nd December 1998 -# version 1.63 +# last modified 21st February 1999 +# version 1.64 # -# Copyright (c) 1995-8 Paul Marquess. All rights reserved. +# Copyright (c) 1995-9 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. @@ -145,7 +145,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO $db_ver use Carp; -$VERSION = "1.63" ; +$VERSION = "1.64" ; #typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; $DB_BTREE = new DB_File::BTREEINFO ; @@ -1785,7 +1785,7 @@ compile properly on IRIX 5.3. =head1 COPYRIGHT -Copyright (c) 1995-8 Paul Marquess. All rights reserved. This program +Copyright (c) 1995-9 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 33f4b69..540fa9c 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,12 +3,12 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess - last modified 19th November 1998 - version 1.63 + last modified 21st February 1999 + version 1.64 All comments/suggestions/problems are welcome - Copyright (c) 1995, 1996, 1997, 1998 Paul Marquess. All rights reserved. + Copyright (c) 1995-9 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. @@ -60,7 +60,9 @@ fixed typo in O_RDONLY test. 1.62 - No change to DB_File.xs 1.63 - Fix to alllow DB 2.6.x to build. - + 1.64 - Tidied up the 1.x to 2.x flags mapping code. + Added a patch from Mark Kettenis + to fix a flag mapping problem with O_RDONLY on the Hurd @@ -72,7 +74,16 @@ #ifndef PERL_VERSION #include "patchlevel.h" -#define PERL_VERSION PATCHLEVEL +#define PERL_REVISION 5 +#define PERL_VERSION PATCHLEVEL +#define PERL_SUBVERSION SUBVERSION +#endif + +#if PERL_REVISION == 5 && (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION <= 75 )) + +# define PL_sv_undef sv_undef +# define PL_na na + #endif /* Being the Berkeley DB we prefer the (which will be @@ -825,19 +836,14 @@ SV * sv ; if ((flags & O_CREAT) == O_CREAT) Flags |= DB_CREATE ; -#ifdef O_NONBLOCK - if ((flags & O_NONBLOCK) == O_NONBLOCK) - Flags |= DB_EXCL ; -#endif - #if O_RDONLY == 0 if (flags == O_RDONLY) #else - if ((flags & O_RDONLY) == O_RDONLY) + if ((flags & O_RDONLY) == O_RDONLY && (flags & O_RDWR) != O_RDWR) #endif Flags |= DB_RDONLY ; -#ifdef O_NONBLOCK +#ifdef O_TRUNC if ((flags & O_TRUNC) == O_TRUNC) Flags |= DB_TRUNCATE ; #endif diff --git a/ext/DB_File/typemap b/ext/DB_File/typemap index 8a95342..3463ec0 100644 --- a/ext/DB_File/typemap +++ b/ext/DB_File/typemap @@ -1,8 +1,8 @@ # typemap for Perl 5 interface to Berkeley # # written by Paul Marquess -# last modified 13th May 1998 -# version 1.59 +# last modified 21st February 1999 +# version 1.64 # #################################### DB SECTION # diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t index 636a43f..d5afeb0 100755 --- a/t/lib/db-recno.t +++ b/t/lib/db-recno.t @@ -42,14 +42,16 @@ sub bad_one { print STDERR <