summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>1999-08-05 00:22:22 +0100
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-05 08:05:13 +0000
commite07e341956f18e57659bfd4ab6881a29bbc725c9 (patch)
tree14775c1766a37f0d2162dd015bf2ee2bc48e4c99
parent1c98e7c8cff8d95239d35282a62d5c3c291ff3fa (diff)
downloadperl-e07e341956f18e57659bfd4ab6881a29bbc725c9.tar.gz
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
-rw-r--r--ext/DB_File/Changes10
-rw-r--r--ext/DB_File/DB_File.pm6
-rw-r--r--ext/DB_File/DB_File.xs22
3 files changed, 28 insertions, 10 deletions
diff --git a/ext/DB_File/Changes b/ext/DB_File/Changes
index 462056a34b..6d374bf1f1 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 c2b7b09921..e20a5621e7 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 1223ad446e..2ee1e61f0f 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 <Paul.Marquess@btinternet.com>
- 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",