@@ -112,7 +112,7 @@ use base 'Exporter';
our $VERSION;
BEGIN {
- $VERSION = '1.9';
+ $VERSION = '1.91';
our @BDB_REQ = qw(
db_env_open db_env_close db_env_txn_checkpoint db_env_lock_detect
@@ -773,12 +773,12 @@ END { flush }
Remember that, by default, BDB will execute requests in parallel, in
somewhat random order. That means that it is easy to run a C<db_get>
-request on thesa me database as a concurrent C<db_close> request, leading
+request on the same database as a concurrent C<db_close> request, leading
to a crash, silent data corruption, eventually the next world war on
terrorism.
If you only ever use foreground requests (without a callback), this will
-not be an issue.
+not be an issue (unless you use threads).
=head2 Unexpected Freezes or Deadlocks
@@ -488,7 +488,7 @@ static void start_thread (void)
croak ("unable to allocate worker thread data");
X_LOCK (wrklock);
- if (thread_create (&wrk->tid, bdb_proc, (void *)wrk))
+ if (xthread_create (&wrk->tid, bdb_proc, (void *)wrk))
{
wrk->prev = &wrk_first;
wrk->next = wrk_first.next;
@@ -1,8 +1,16 @@
Revision history for perl module BDB.
TODO: DB_RECNUM/DB_SET_RECNO?
-TODO: find changes for 5.2 - but documentation has been removed from oracles website
-TODO: libdb5.3
+TODO: 4.8 set_partition
+
+1.91 Fri Apr 11 06:22:38 CEST 2014
+ - perl5porters broke Async::Interrupt, BDB, EV, IO::AIO, OpenCL
+ without warning by switching the meaning of USE_SOCKETS_AS_HANDLES
+ in 5.18. What's so attractive about giving a shit about backwards
+ compatibility - I will never understand.
+ - make sure DBD.pm is installed to the correct directory.
+ - support up to bdb 6.0.
+ - (xthread) work around compile time bugs in ptw32.
1.9 Mon Dec 26 02:46:09 CET 2011
- partial: update for libdb 5.2 (to make it compile only).
@@ -4,7 +4,7 @@
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150",
+ "generated_by" : "ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380",
"license" : [
"unknown"
],
@@ -22,20 +22,20 @@
"prereqs" : {
"build" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : 0
+ "ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
- "common::sense" : 0
+ "common::sense" : "0"
}
}
},
"release_status" : "stable",
- "version" : "1.9"
+ "version" : "1.91"
}
@@ -7,7 +7,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150'
+generated_by: 'ExtUtils::MakeMaker version 6.86, CPAN::Meta::Converter version 2.133380'
license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,4 +19,4 @@ no_index:
- inc
requires:
common::sense: 0
-version: 1.9
+version: 1.91
@@ -52,7 +52,7 @@ my $mm = MM->new({
common::sense => 0,
},
PM => {
- 'BDB.pm' => '$(INST_LIBDIR)/BDB.pm',
+ 'BDB.pm' => '$(INST_LIB)/BDB.pm',
},
});
@@ -646,12 +646,12 @@ COMMON PITFALLS
Unexpected Crashes
Remember that, by default, BDB will execute requests in parallel, in
somewhat random order. That means that it is easy to run a "db_get"
- request on thesa me database as a concurrent "db_close" request, leading
+ request on the same database as a concurrent "db_close" request, leading
to a crash, silent data corruption, eventually the next world war on
terrorism.
If you only ever use foreground requests (without a callback), this will
- not be an issue.
+ not be an issue (unless you use threads).
Unexpected Freezes or Deadlocks
Remember that, by default, BDB will execute requests in parallel, which
@@ -3,6 +3,7 @@
/* WARNING
* This header file is a shared resource between many modules.
+ * perl header files MUST already be included.
*/
#include <signal.h>
@@ -51,6 +52,32 @@
# endif
#endif
+/* use NV for 32 bit perls as it allows larger offsets */
+#if IVSIZE >= 8
+typedef IV VAL64;
+# define SvVAL64(sv) SvIV (sv)
+# define newSVval64(i64) newSViv (i64)
+#else
+typedef NV VAL64;
+# define SvVAL64(sv) SvNV (sv)
+# define newSVval64(i64) newSVnv (i64)
+#endif
+
+/* typemap for the above */
+/*
+VAL64 T_VAL64
+
+INPUT
+
+T_VAL64
+ $var = ($type)SvVAL64 ($arg);
+
+OUTPUT
+
+T_VAL64
+ $arg = newSVval64 ($var);
+*/
+
/* 5.11 */
#ifndef CxHASARGS
# define CxHASARGS(cx) (cx)->blk_sub.hasargs
@@ -163,7 +190,7 @@ s_get_cv (SV *cb_sv)
dTHX;
HV *st;
GV *gvp;
-
+
return (SV *)sv_2cv (cb_sv, &st, &gvp, 0);
}
@@ -207,7 +234,7 @@ s_gensub (pTHX_ void (*xsub)(pTHX_ CV *), void *arg)
/*****************************************************************************/
/* portable pipe/socketpair */
-#ifdef USE_SOCKETS_AS_HANDLES
+#if defined(USE_SOCKETS_AS_HANDLES) || PERL_VERSION_ATLEAST(5,18,0)
# define S_TO_HANDLE(x) ((HANDLE)win32_get_osfhandle (x))
#else
# define S_TO_HANDLE(x) ((HANDLE)x)
@@ -228,7 +255,7 @@ s_pipe (int filedes [2])
SOCKET listener;
SOCKET sock [2] = { -1, -1 };
- if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
+ if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
return -1;
addr.sin_family = AF_INET;
@@ -244,7 +271,7 @@ s_pipe (int filedes [2])
if (listen (listener, 1))
goto fail;
- if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
+ if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
goto fail;
if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
@@ -17,8 +17,8 @@
#ifdef _WIN32
-#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls
-#define _WIN32_WINNT 0x400
+//#define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls, fails with mingw
+#define _WIN32_WINNT 0x400 // maybe working alternative for mingw
#include <stdio.h>//D
#include <fcntl.h>
#include <io.h>
@@ -26,6 +26,12 @@
#include <winsock2.h>
#include <process.h>
#include <windows.h>
+
+/* work around some bugs in ptw32 */
+#if defined(__MINGW32__) && defined(_TIMESPEC_DEFINED)
+#define HAVE_STRUCT_TIMESPEC 1
+#endif
+
#include <pthread.h>
#define sigset_t int
#define sigfillset(a)
@@ -47,11 +53,11 @@ typedef pthread_cond_t xcond_t;
#define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to))
typedef pthread_t xthread_t;
-#define X_THREAD_PROC(name) void *name (void *thr_arg)
+#define X_THREAD_PROC(name) static void *name (void *thr_arg)
#define X_THREAD_ATFORK(a,b,c)
static int
-thread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
+xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
{
int retval;
pthread_attr_t attr;
@@ -132,7 +138,7 @@ typedef pthread_t xthread_t;
#endif
static int
-thread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
+xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg)
{
int retval;
sigset_t fullsigset, oldsigset;