From: Paul Marquess Date: Wed, 4 Aug 1999 23:22:22 +0000 (+0100) Subject: DB_File 1.70 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e07e341956f18e57659bfd4ab6881a29bbc725c9;p=p5sagit%2Fp5-mst-13.2.git DB_File 1.70 To: perl5-porters@perl.org Cc: gsar@activestate.com, nik@tiuk.ti.com, jhi@iki.fi, randy@theoryx5.uwinnipeg.ca Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB202D49B21@mbtlipnt02.btlabs.bt.co.uk> (Replaces change #3917) p4raw-link: @3917 on //depot/cfgperl: a62982a846c50953d49f512fd1ec36e63b0a9e81 p4raw-id: //depot/cfgperl@3921 --- diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes index 462056a..6d374bf 100644 --- a/ext/DB_File/Changes +++ b/ext/DB_File/Changes @@ -259,6 +259,16 @@ 1.69 3rd August 1999 * fixed a bug in push -- DB_APPEND wasn't working properly. + * Fixed the R_SETCURSOR bug introduced in 1.68 + * Added a new Perl variable $DB_File::db_ver +1.70 4th August 1999 + + * Initialise $DB_File::db_ver and $DB_File::db_version with + GV_ADD|GV_ADDMULT -- bug spotted by Nick Ing-Simmons. + + * Added a BOOT check to test for equivalent versions of db.h & + libdb.a/so. + diff --git a/ext/DB_File/DB_File.pm b/ext/DB_File/DB_File.pm index c2b7b09..e20a562 100644 --- a/ext/DB_File/DB_File.pm +++ b/ext/DB_File/DB_File.pm @@ -1,8 +1,8 @@ # DB_File.pm -- Perl 5 interface to Berkeley DB # # written by Paul Marquess (Paul.Marquess@btinternet.com) -# last modified 3rd August 1999 -# version 1.69 +# last modified 4th August 1999 +# version 1.70 # # Copyright (c) 1995-1999 Paul Marquess. All rights reserved. # This program is free software; you can redistribute it and/or @@ -145,7 +145,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD $DB_BTREE $DB_HASH $DB_RECNO $db_ver use Carp; -$VERSION = "1.69" ; +$VERSION = "1.70" ; #typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; $DB_BTREE = new DB_File::BTREEINFO ; diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 1223ad4..2ee1e61 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -3,8 +3,8 @@ DB_File.xs -- Perl 5 interface to Berkeley DB written by Paul Marquess - last modified 3rd August 1999 - version 1.69 + last modified 4th August 1999 + version 1.70 All comments/suggestions/problems are welcome @@ -74,9 +74,10 @@ 1.69 - fixed a bug in push -- DB_APPEND wasn't working properly. Fixed the R_SETCURSOR bug introduced in 1.68 Added a new Perl variable $DB_File::db_ver - - - + 1.70 - Initialise $DB_File::db_ver and $DB_File::db_version with + GV_ADD|GV_ADDMULT -- bug spotted by Nick Ing-Simmons. + Added a BOOT check to test for equivalent versions of db.h & + libdb.a/so. */ @@ -441,13 +442,20 @@ u_int flags ; static void GetVersionInfo(pTHX) { - SV * version_sv = perl_get_sv("DB_File::db_version", TRUE) ; - SV * ver_sv = perl_get_sv("DB_File::db_ver", TRUE) ; + SV * version_sv = perl_get_sv("DB_File::db_version", GV_ADD|GV_ADDMULTI) ; + SV * ver_sv = perl_get_sv("DB_File::db_ver", GV_ADD|GV_ADDMULTI) ; #ifdef DB_VERSION_MAJOR int Major, Minor, Patch ; (void)db_version(&Major, &Minor, &Patch) ; + /* Check that the versions of db.h and libdb.a are the same */ + if (Major != DB_VERSION_MAJOR || Minor != DB_VERSION_MINOR + || Patch != DB_VERSION_PATCH) + croak("\nDB_File needs compatible versions of libdb & db.h\n\tyou have db.h version %d.%d.%d and libdb version %d.%d.%d\n", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, + Major, Minor, Patch) ; + /* check that libdb is recent enough -- we need 2.3.4 or greater */ if (Major == 2 && (Minor < 3 || (Minor == 3 && Patch < 4))) croak("DB_File needs Berkeley DB 2.3.4 or greater, you have %d.%d.%d\n",