summaryrefslogtreecommitdiff
path: root/lib/ext2fs/tdb/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs/tdb/patches')
-rw-r--r--lib/ext2fs/tdb/patches/copyright10
-rw-r--r--lib/ext2fs/tdb/patches/ext2tdb-rename17
-rw-r--r--lib/ext2fs/tdb/patches/replace-includes10
-rw-r--r--lib/ext2fs/tdb/patches/static-functions23
-rw-r--r--lib/ext2fs/tdb/patches/static-prototypes16
-rw-r--r--lib/ext2fs/tdb/patches/tdbtool-includes6
6 files changed, 46 insertions, 36 deletions
diff --git a/lib/ext2fs/tdb/patches/copyright b/lib/ext2fs/tdb/patches/copyright
index f519ac68..d9d1d840 100644
--- a/lib/ext2fs/tdb/patches/copyright
+++ b/lib/ext2fs/tdb/patches/copyright
@@ -1,8 +1,10 @@
-Index: tdb-sa/tdb.c
+Index: tdbsa/tdb.c
===================================================================
---- tdb-sa.orig/tdb.c 2007-04-04 12:16:26.000000000 -0400
-+++ tdb-sa/tdb.c 2007-04-04 12:16:53.000000000 -0400
-@@ -1,9 +1,9 @@
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -4,11 +4,11 @@ Rev: 23371
+ Last Changed Date: 2007-06-06 20:14:06 -0400 (Wed, 06 Jun 2007)
+ */
/*
- Unix SMB/CIFS implementation.
+ trivial database library - standalone version
diff --git a/lib/ext2fs/tdb/patches/ext2tdb-rename b/lib/ext2fs/tdb/patches/ext2tdb-rename
index 44a37057..15bf085c 100644
--- a/lib/ext2fs/tdb/patches/ext2tdb-rename
+++ b/lib/ext2fs/tdb/patches/ext2tdb-rename
@@ -1,8 +1,8 @@
Index: tdb/tdb.h
===================================================================
---- tdb.orig/tdb.h 2007-04-04 20:39:26.000000000 -0400
-+++ tdb/tdb.h 2007-04-04 20:40:13.000000000 -0400
-@@ -76,6 +76,51 @@
+--- tdb.orig/tdb.h
++++ tdb/tdb.h
+@@ -76,6 +76,60 @@ typedef struct TDB_DATA {
#endif
#endif
@@ -49,7 +49,16 @@ Index: tdb/tdb.h
+#define tdb_dump_all ext2fs_tdb_dump_all
+#define tdb_printfreelist ext2fs_tdb_printfreelist
+#define tdb_validate_freelist ext2fs_tdb_validate_freelist
-+
++#define tdb_chainlock_mark ext2fs_tdb_chainlock_mark
++#define tdb_chainlock_nonblock ext2fs_tdb_chainlock_nonblock
++#define tdb_chainlock_unmark ext2fs_tdb_chainlock_unmark
++#define tdb_enable_seqnum ext2fs_tdb_enable_seqnum
++#define tdb_increment_seqnum_nonblock ext2fs_tdb_increment_seqnum_nonblock
++#define tdb_lock_nonblock ext2fs_tdb_lock_nonblock
++#define tdb_lockall_mark ext2fs_tdb_lockall_mark
++#define tdb_lockall_nonblock ext2fs_tdb_lockall_nonblock
++#define tdb_lockall_read_nonblock ext2fs_tdb_lockall_read_nonblock
++#define tdb_lockall_unmark ext2fs_tdb_lockall_unmark
+
/* this is the context structure that is returned from a db open */
typedef struct tdb_context TDB_CONTEXT;
diff --git a/lib/ext2fs/tdb/patches/replace-includes b/lib/ext2fs/tdb/patches/replace-includes
index e552533d..b1d0d576 100644
--- a/lib/ext2fs/tdb/patches/replace-includes
+++ b/lib/ext2fs/tdb/patches/replace-includes
@@ -1,8 +1,8 @@
Index: tdb/tdb.c
===================================================================
---- tdb.orig/tdb.c 2007-04-04 20:26:11.000000000 -0400
-+++ tdb/tdb.c 2007-04-04 20:39:58.000000000 -0400
-@@ -24,11 +24,78 @@
+--- tdb.orig/tdb.c
++++ tdb/tdb.c
+@@ -29,11 +29,82 @@ Last Changed Date: 2007-06-22 13:36:10 -
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -27,7 +27,9 @@ Index: tdb/tdb.c
+#include <stddef.h>
+#include <errno.h>
+#include <string.h>
++#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
++#endif
+#include <sys/time.h>
+#include <sys/types.h>
+#include <time.h>
@@ -83,6 +85,8 @@ Index: tdb/tdb.c
+#endif
+#endif
+
++typedef int bool;
++
#include "tdb.h"
#ifndef u32
diff --git a/lib/ext2fs/tdb/patches/static-functions b/lib/ext2fs/tdb/patches/static-functions
index 7fb76efb..ab0fbefb 100644
--- a/lib/ext2fs/tdb/patches/static-functions
+++ b/lib/ext2fs/tdb/patches/static-functions
@@ -1,24 +1,13 @@
-Index: tdb/tdb.c
+Index: tdbsa/tdb.c
===================================================================
---- tdb.orig/tdb.c 2007-04-04 20:40:06.000000000 -0400
-+++ tdb/tdb.c 2007-04-04 20:40:08.000000000 -0400
-@@ -1423,8 +1423,8 @@
- /*
- brlock during a transaction - ignore them
- */
--int transaction_brlock(struct tdb_context *tdb, tdb_off_t offset,
-- int rw_type, int lck_type, int probe, size_t len)
-+static int transaction_brlock(struct tdb_context *tdb, tdb_off_t offset,
-+ int rw_type, int lck_type, int probe, size_t len)
- {
- return 0;
- }
-@@ -2118,7 +2118,7 @@
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -2254,7 +2254,7 @@ int tdb_transaction_recover(struct tdb_c
/* file: freelist.c */
/* read a freelist record and check for simple errors */
--int rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
-+static int rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
+-int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
++static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, struct list_struct *rec)
{
if (tdb->methods->tdb_read(tdb, off, rec, sizeof(*rec),DOCONV()) == -1)
return -1;
diff --git a/lib/ext2fs/tdb/patches/static-prototypes b/lib/ext2fs/tdb/patches/static-prototypes
index c1049df1..cf8af611 100644
--- a/lib/ext2fs/tdb/patches/static-prototypes
+++ b/lib/ext2fs/tdb/patches/static-prototypes
@@ -1,8 +1,8 @@
-Index: tdb/tdb.c
+Index: tdbsa/tdb.c
===================================================================
---- tdb.orig/tdb.c 2007-04-04 20:39:58.000000000 -0400
-+++ tdb/tdb.c 2007-04-04 20:40:06.000000000 -0400
-@@ -243,36 +243,36 @@
+--- tdbsa.orig/tdb.c
++++ tdbsa/tdb.c
+@@ -251,39 +251,39 @@ struct tdb_context {
/*
internal prototypes
*/
@@ -11,6 +11,8 @@ Index: tdb/tdb.c
-int tdb_lock(struct tdb_context *tdb, int list, int ltype);
-int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
-int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
+-int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
+-int tdb_transaction_unlock(struct tdb_context *tdb);
-int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
-int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
-int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
@@ -33,6 +35,8 @@ Index: tdb/tdb.c
+static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
+static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
+static int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len);
++static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
++static int tdb_transaction_unlock(struct tdb_context *tdb);
+static int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len);
+static int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off);
+static int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off);
@@ -59,8 +63,10 @@ Index: tdb/tdb.c
struct list_struct *rec);
-void tdb_io_init(struct tdb_context *tdb);
-int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
+-int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
+static void tdb_io_init(struct tdb_context *tdb);
+static int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
++static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
+ struct list_struct *rec);
- /* file: error.c */
diff --git a/lib/ext2fs/tdb/patches/tdbtool-includes b/lib/ext2fs/tdb/patches/tdbtool-includes
index 3743edf3..c076c791 100644
--- a/lib/ext2fs/tdb/patches/tdbtool-includes
+++ b/lib/ext2fs/tdb/patches/tdbtool-includes
@@ -1,7 +1,7 @@
-Index: tdb/tdbtool.c
+Index: tdbsa/tdbtool.c
===================================================================
---- tdb.orig/tdbtool.c 2007-04-04 20:39:28.000000000 -0400
-+++ tdb/tdbtool.c 2007-04-04 20:40:10.000000000 -0400
+--- tdbsa.orig/tdbtool.c
++++ tdbsa/tdbtool.c
@@ -21,10 +21,21 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/