]> git.pld-linux.org Git - packages/php4.git/blame - php4-allow-db31.patch
- x32 fixes
[packages/php4.git] / php4-allow-db31.patch
CommitLineData
53a7e884
JB
1--- php-4.3.2/ext/dba/config.m4.orig Wed May 21 02:35:29 2003
2+++ php-4.3.2/ext/dba/config.m4 Mon Jun 23 11:53:32 2003
3@@ -176,13 +176,13 @@
32192ed5 4 AC_MSG_CHECKING(if dba can be used as shared extension)
53a7e884
JB
5 AC_EGREP_CPP(yes,[
6 #include "$THIS_INCLUDE"
7-#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 2)
8+#if DB_VERSION_MAJOR > 3 || (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR > 0)
9 yes
10 #endif
11 ],[
12 AC_MSG_RESULT(yes)
13 ],[
14- AC_MSG_ERROR(At least version 3.3 is required)
15+ AC_MSG_ERROR(At least version 3.1 is required)
16 ])
17 fi
18 if test -n "$THIS_LIBS"; then
d87bdf18
AM
19diff -urN php-4.4.9.org/ext/dba/config.m4 php-4.4.9/ext/dba/config.m4
20--- php-4.4.9.org/ext/dba/config.m4 2006-11-28 12:41:35.000000000 +0100
21+++ php-4.4.9/ext/dba/config.m4 2013-02-19 22:27:18.489827804 +0100
22@@ -144,7 +144,7 @@
23 ],[
24 AC_EGREP_CPP(yes,[
25 #include "$THIS_INCLUDE"
26-#if DB_VERSION_MAJOR == $1
27+#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR == 5)
28 yes
29 #endif
30 ],[
31@@ -201,7 +201,11 @@
32 if test "$withval" != "no"; then
33 PHP_DBA_STD_BEGIN
34 for i in $withval /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do
35- if test -f "$i/db4/db.h"; then
36+ if test -f "$i/db5/db.h"; then
37+ THIS_PREFIX=$i
38+ THIS_INCLUDE=$i/db5/db.h
39+ break
40+ elif test -f "$i/db4/db.h"; then
41 THIS_PREFIX=$i
42 THIS_INCLUDE=$i/db4/db.h
43 break
44@@ -223,7 +227,7 @@
45 break
46 fi
47 done
48- PHP_DBA_DB_CHECK(4, db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
49+ PHP_DBA_DB_CHECK(4, db-5.3 db-5.2 db-5.1 db-5.0 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
50 fi
51 ])
52 AC_DBA_STD_RESULT(db4,Berkeley DB4)
53
54--- php-4.4.9/ext/dba/dba_db4.c~ 2007-12-31 08:22:46.000000000 +0100
55+++ php-4.4.9/ext/dba/dba_db4.c 2013-02-19 22:49:25.452772010 +0100
56@@ -35,7 +35,11 @@
57 #include <db.h>
58 #endif
59
60-static void php_dba_db4_errcall_fcn(const char *errpfx, char *msg)
61+static void php_dba_db4_errcall_fcn(
62+#if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3))
63+ const DB_ENV *dbenv,
64+#endif
65+ const char *errpfx, const char *msg)
66 {
67 TSRMLS_FETCH();
68
69@@ -85,14 +89,10 @@
70 filemode = Z_LVAL_PP(info->argv[0]);
71 }
72
73-#ifdef DB_FCNTL_LOCKING
74- gmode |= DB_FCNTL_LOCKING;
75-#endif
76-
77 if ((err=db_create(&dbp, NULL, 0)) == 0) {
78 dbp->set_errcall(dbp, php_dba_db4_errcall_fcn);
79 if (
80-#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)
81+#if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1))
82 (err=dbp->open(dbp, 0, info->path, NULL, type, gmode, filemode)) == 0) {
83 #else
84 (err=dbp->open(dbp, info->path, NULL, type, gmode, filemode)) == 0) {
This page took 0.135842 seconds and 4 git commands to generate.