From f698831f0ae0cd86225eb647ae4aeb813f08d3b5 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 25 Sep 2008 01:51:49 -0400 Subject: Sync with upstream changes --- events/Makefile.in | 28 +++++++++++++---------- events/autogen.sh | 2 +- events/build_macros.m4 | 22 +++++++++--------- events/configure.ac | 2 +- events/libevents.m4 | 2 +- replace/Makefile.in | 20 ++++++++-------- replace/build_macros.m4 | 20 ++++++++-------- replace/configure.ac | 2 +- replace/getaddrinfo.h | 2 ++ replace/getpass.c | 7 ++---- replace/libreplace.m4 | 9 ++++++-- replace/libreplace_cc.m4 | 24 ++++++++++++++------ replace/replace.c | 2 +- replace/snprintf.c | 2 +- replace/system/network.h | 2 +- replace/system/passwd.h | 2 +- replace/test/main.c | 37 ++++++++++++++++++++++++++++++ talloc/Makefile.in | 18 +++++++-------- talloc/build_macros.m4 | 22 +++++++++--------- talloc/config.mk | 4 ++-- talloc/configure.ac | 2 +- talloc/libtalloc.m4 | 8 +++---- talloc/talloc.c | 12 ++++++++-- talloc/talloc.mk | 6 ++--- talloc/testsuite.c | 10 -------- talloc/testsuite_main.c | 37 ++++++++++++++++++++++++++++++ tdb/Makefile.in | 18 +++++++-------- tdb/build_macros.m4 | 22 +++++++++--------- tdb/common/io.c | 4 +++- tdb/common/tdb.c | 2 +- tdb/common/transaction.c | 2 +- tdb/config.mk | 12 +++++----- tdb/configure.ac | 2 +- tdb/libtdb.m4 | 2 +- tdb/tdb.i | 5 ++++ tdb/tdb.py | 5 +++- tdb/tdb_wrap.c | 59 ++++++++++++++++++++++++++---------------------- 37 files changed, 271 insertions(+), 166 deletions(-) create mode 100644 replace/test/main.c create mode 100644 talloc/testsuite_main.c diff --git a/events/Makefile.in b/events/Makefile.in index 5548e46e0..425711984 100644 --- a/events/Makefile.in +++ b/events/Makefile.in @@ -12,7 +12,7 @@ libdir = @libdir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ -buildinstdir = @buildinstdir@ +sharedbuilddir = @sharedbuilddir@ INSTALLCMD = @INSTALL@ CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude -I. LDFLAGS = @LDFLAGS@ @@ -35,9 +35,13 @@ TALLOC_CFLAGS = @TALLOC_CFLAGS@ TALLOC_LDFLAGS = @TALLOC_CFLAGS@ TALLOC_LIBS = @TALLOC_LIBS@ -CFLAGS = $(CPPFLAGS) $(TALLOC_CFLAGS) @CFLAGS@ -LDFLAGS = $(TALLOC_LDFLAGS) @LDFLAGS@ -LIBS = $(TALLOC_LIBS) @LIBS@ +EVENTS_CFLAGS = @EVENTS_CFLAGS@ +EVENTS_LDFLAGS = @EVENTS_CFLAGS@ +EVENTS_LIBS = @EVENTS_LIBS@ + +CFLAGS = $(CPPFLAGS) $(TALLOC_CFLAGS) $(EVENTS_CFLAGS) @CFLAGS@ +LDFLAGS = $(TALLOC_LDFLAGS) $(EVENTS_LDFLAGS) @LDFLAGS@ +LIBS = $(TALLOC_LIBS) $(EVENTS_LIBS) @LIBS@ EVENTS_OBJ = @EVENTS_OBJ@ @LIBREPLACEOBJ@ @@ -52,14 +56,14 @@ install:: all $(EVENTS_SOLIB): $(EVENTS_OBJ) $(SHLD) $(SHLD_FLAGS) $(LDFLAGS) $(LIBS) -o $@ $(EVENTS_OBJ) @SONAMEFLAG@$(EVENTS_SONAME) -build-install: all - ${INSTALLCMD} -d $(buildinstdir)/lib - ${INSTALLCMD} -m 755 libevents.a $(buildinstdir)/lib - ${INSTALLCMD} -m 755 $(EVENTS_SOLIB) $(buildinstdir)/lib - ln -sf $(EVENTS_SOLIB) $(buildinstdir)/lib/$(EVENTS_SONAME) - ln -sf $(EVENTS_SOLIB) $(buildinstdir)/lib/libevents.so - ${INSTALLCMD} -d $(buildinstdir)/include - ${INSTALLCMD} -m 644 $(srcdir)/events.h $(buildinstdir)/include +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libevents.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(EVENTS_SOLIB) $(sharedbuilddir)/lib + ln -sf $(EVENTS_SOLIB) $(sharedbuilddir)/lib/$(EVENTS_SONAME) + ln -sf $(EVENTS_SOLIB) $(sharedbuilddir)/lib/libevents.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/events.h $(sharedbuilddir)/include check: test diff --git a/events/autogen.sh b/events/autogen.sh index a3bb9bdd0..fec05f54d 100755 --- a/events/autogen.sh +++ b/events/autogen.sh @@ -3,7 +3,7 @@ rm -rf autom4te.cache rm -f configure config.h.in -IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace" +IPATHS="-I libreplace -I lib/replace -I ../libreplace -I ../replace -I ../../../lib/replace" autoconf $IPATHS || exit 1 autoheader $IPATHS || exit 1 diff --git a/events/build_macros.m4 b/events/build_macros.m4 index bb05a5822..c036668cd 100644 --- a/events/build_macros.m4 +++ b/events/build_macros.m4 @@ -1,14 +1,14 @@ -AC_DEFUN(BUILD_WITH_BUILD_INST_DIR, - [ AC_ARG_WITH([build-install-dir], - [AC_HELP_STRING([--with-build-install-dir=DIR], - [temporary build directory where libraries are installed [$srcdir/buildinst]])]) +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) - buildinstdir="$srcdir/buildinst" - if test x"$with_build_install_dir" != x; then - buildinstdir=$with_build_install_dir - CFLAGS="$CFLAGS -I$with_build_install_dir/include" - CPPFLAGS="$CPPFLAGS -I$with_build_install_dir/include" - LIBS="$LIBS -L$with_build_install_dir/lib" + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" fi - AC_SUBST(buildinstdir) + AC_SUBST(sharedbuilddir) ]) + diff --git a/events/configure.ac b/events/configure.ac index 0ee3bf869..895f2a1da 100644 --- a/events/configure.ac +++ b/events/configure.ac @@ -17,7 +17,7 @@ AC_LIBREPLACE_SHLD_FLAGS AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR m4_include(build_macros.m4) -BUILD_WITH_BUILD_INST_DIR +BUILD_WITH_SHARED_BUILD_DIR m4_include(pkg.m4) m4_include(libtalloc.m4) diff --git a/events/libevents.m4 b/events/libevents.m4 index d17da64b3..ed76b03d4 100644 --- a/events/libevents.m4 +++ b/events/libevents.m4 @@ -43,7 +43,7 @@ SMB_EXT_LIB(LIBAIO_LINUX, $AIO_LIBS) EVENTS_CFLAGS="-I$eventsdir" AC_SUBST(EVENTS_CFLAGS) -EVENTS_LIBS="" +EVENTS_LIBS="$AIO_LIBS" AC_SUBST(EVENTS_LIBS) diff --git a/replace/Makefile.in b/replace/Makefile.in index 008d1830b..65f8125ef 100644 --- a/replace/Makefile.in +++ b/replace/Makefile.in @@ -9,8 +9,8 @@ libdir = @libdir@ VPATH = @libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ -buildinstdir = @buildinstdir@ -INSTALL = @INSTALL@ +sharedbuilddir = @sharedbuilddir@ +INSTALLCMD = @INSTALL@ LIBS = @LIBS@ .PHONY: test all showflags install installcheck clean distclean realdistclean @@ -30,14 +30,14 @@ showflags: @echo ' LIBS = $(LIBS)' install: all - mkdir -p $(libdir) - $(INSTALL) libreplace.a $(libdir) + ${INSTALLCMD} -d $(libdir) + ${INSTALLCMD} -m 644 libreplace.a $(libdir) -build-install: all - mkdir -p $(buildinstdir)/include - $(INSTALL) replace.h $(buildinstdir)/include - mkdir -p $(buildinstdir)/lib - $(INSTALL) libreplace.a $(buildinstdir)/lib +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 replace.h $(sharedbuilddir)/include + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libreplace.a $(sharedbuilddir)/lib libreplace.a: $(OBJS) ar -rcsv $@ $(OBJS) @@ -47,7 +47,7 @@ test: all installcheck: install test -TEST_OBJS = test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o +TEST_OBJS = test/main.o test/testsuite.o test/os2_delete.o test/strptime.o test/getifaddrs.o testsuite: libreplace.a $(TEST_OBJS) $(CC) -o testsuite $(TEST_OBJS) -L. -lreplace $(LDFLAGS) $(LIBS) diff --git a/replace/build_macros.m4 b/replace/build_macros.m4 index bc3ec729d..c036668cd 100644 --- a/replace/build_macros.m4 +++ b/replace/build_macros.m4 @@ -1,14 +1,14 @@ -AC_DEFUN(BUILD_WITH_BUILD_INST_DIR, - [ AC_ARG_WITH([build-install-dir], - [AC_HELP_STRING([--with-build-install-dir=DIR], - [temporary build directory where libraries are installed [$srcdir/buildinst]])]) +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) - buildinstdir="$srcdir/buildinst" - if test x"$with_build_install_dir" != x; then - buildinstdir=$with_build_install_dir - CFLAGS="$CFLAGS -I$with_build_install_dir/include" - LDFLAGS="$LDFLAGS -L$with_build_install_dir/lib" + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" fi - AC_SUBST(buildinstdir) + AC_SUBST(sharedbuilddir) ]) diff --git a/replace/configure.ac b/replace/configure.ac index 20a7582b5..0361825a0 100644 --- a/replace/configure.ac +++ b/replace/configure.ac @@ -23,7 +23,7 @@ if test "$ac_cv_prog_gcc" = yes; then fi m4_include(build_macros.m4) -BUILD_WITH_BUILD_INST_DIR +BUILD_WITH_SHARED_BUILD_DIR LIBS="${LIBREPLACE_NETWORK_LIBS}" AC_SUBST(LIBS) diff --git a/replace/getaddrinfo.h b/replace/getaddrinfo.h index dddd699b6..cf040da2d 100644 --- a/replace/getaddrinfo.h +++ b/replace/getaddrinfo.h @@ -75,7 +75,9 @@ in lib/replace we use rep_xxx() #undef getnameinfo #endif #define getnameinfo rep_getnameinfo +#ifndef HAVE_GETNAMEINFO #define HAVE_GETNAMEINFO +#endif extern int rep_getaddrinfo(const char *node, const char *service, const struct addrinfo * hints, struct addrinfo ** res); diff --git a/replace/getpass.c b/replace/getpass.c index 73333b902..0be618fc9 100644 --- a/replace/getpass.c +++ b/replace/getpass.c @@ -187,10 +187,6 @@ char *rep_getpass(const char *prompt) in_fd = fileno(in); if (fgets(buf, bufsize, in) == NULL) { buf[0] = 0; - if (in && in != stdin) { - fclose(in); - } - return buf; } } nread = strlen(buf); @@ -201,8 +197,9 @@ char *rep_getpass(const char *prompt) /* Restore echoing. */ if (echo_off) { - if (gotintr && in_fd == -1) + if (gotintr && in_fd == -1) { in = fopen ("/dev/tty", "w+"); + } if (in != NULL) tcsetattr (fileno (in), TCSANOW, &t); } diff --git a/replace/libreplace.m4 b/replace/libreplace.m4 index 71fa04167..e563acfd7 100644 --- a/replace/libreplace.m4 +++ b/replace/libreplace.m4 @@ -5,7 +5,7 @@ echo "LIBREPLACE_LOCATION_CHECKS: START" dnl find the libreplace sources. This is meant to work both for dnl libreplace standalone builds, and builds of packages using libreplace libreplacedir="" -libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace" +libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" for d in $libreplacepaths; do if test -f "$d/replace.c"; then libreplacedir="$d" @@ -34,13 +34,18 @@ echo "LIBREPLACE_BROKEN_CHECKS: START" dnl find the libreplace sources. This is meant to work both for dnl libreplace standalone builds, and builds of packages using libreplace libreplacedir="" -for d in "$srcdir" "$srcdir/lib/replace" "$srcdir/libreplace" "$srcdir/../libreplace" "$srcdir/../replace"; do +libreplacepaths="$srcdir $srcdir/lib/replace $srcdir/libreplace $srcdir/../libreplace $srcdir/../replace $srcdir/../lib/replace $srcdir/../../../lib/replace" +for d in $libreplacepaths; do if test -f "$d/replace.c"; then libreplacedir="$d" AC_SUBST(libreplacedir) break; fi done +if test x"$libreplacedir" = "x"; then + AC_MSG_ERROR([cannot find libreplace in $libreplacepaths]) +fi + LIBREPLACEOBJ="replace.o" AC_SUBST(LIBREPLACEOBJ) diff --git a/replace/libreplace_cc.m4 b/replace/libreplace_cc.m4 index 0ce0958a9..30c63f2f0 100644 --- a/replace/libreplace_cc.m4 +++ b/replace/libreplace_cc.m4 @@ -109,25 +109,34 @@ AC_CHECK_HEADERS([standards.h]) # Solaris needs HAVE_LONG_LONG defined AC_CHECK_TYPES(long long) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(char) +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) + AC_CHECK_TYPE(uint_t, unsigned int) AC_CHECK_TYPE(int8_t, char) AC_CHECK_TYPE(uint8_t, unsigned char) AC_CHECK_TYPE(int16_t, short) AC_CHECK_TYPE(uint16_t, unsigned short) + +if test $ac_cv_sizeof_int -eq 4 ; then +AC_CHECK_TYPE(int32_t, int) +AC_CHECK_TYPE(uint32_t, unsigned int) +elif test $ac_cv_size_long -eq 4 ; then AC_CHECK_TYPE(int32_t, long) AC_CHECK_TYPE(uint32_t, unsigned long) +else +AC_MSG_ERROR([LIBREPLACE no 32-bit type found]) +fi + AC_CHECK_TYPE(int64_t, long long) AC_CHECK_TYPE(uint64_t, unsigned long long) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(ssize_t, int) -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(char) -AC_CHECK_SIZEOF(short) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(ssize_t) @@ -158,7 +167,8 @@ AC_CACHE_CHECK([for immediate structures],libreplace_cv_immediate_structures,[ FOOBAR y; } f2[] = { {FOO_ONE} - }; + }; + static const FOOBAR f3[] = {FOO_ONE}; ], libreplace_cv_immediate_structures=yes, libreplace_cv_immediate_structures=no, diff --git a/replace/replace.c b/replace/replace.c index 106c9dfe6..98d799b07 100644 --- a/replace/replace.c +++ b/replace/replace.c @@ -170,7 +170,7 @@ int rep_initgroups(char *name, gid_t id) #include gid_t *grouplst = NULL; - int max_gr = 32; + int max_gr = NGROUPS_MAX; int ret; int i,j; struct group *g; diff --git a/replace/snprintf.c b/replace/snprintf.c index a174dcffe..c54d721ce 100644 --- a/replace/snprintf.c +++ b/replace/snprintf.c @@ -526,7 +526,7 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in } } - /* retieve the format arguments */ + /* retrieve the format arguments */ for (pnum = 0; pnum < max_pos; pnum++) { int i; diff --git a/replace/system/network.h b/replace/system/network.h index 077892a54..473d79b5f 100644 --- a/replace/system/network.h +++ b/replace/system/network.h @@ -326,7 +326,7 @@ struct addrinfo { #ifndef SOCKET_WRAPPER_NOT_REPLACE #define SOCKET_WRAPPER_REPLACE #endif -#include "lib/socket_wrapper/socket_wrapper.h" +#include "../socket_wrapper/socket_wrapper.h" #endif #endif diff --git a/replace/system/passwd.h b/replace/system/passwd.h index cad3197cc..9d7de34bc 100644 --- a/replace/system/passwd.h +++ b/replace/system/passwd.h @@ -104,7 +104,7 @@ char *rep_getpass(const char *prompt); #ifndef NSS_WRAPPER_NOT_REPLACE #define NSS_WRAPPER_REPLACE #endif -#include "lib/nss_wrapper/nss_wrapper.h" +#include "../nss_wrapper/nss_wrapper.h" #endif #endif diff --git a/replace/test/main.c b/replace/test/main.c new file mode 100644 index 000000000..9bd12840a --- /dev/null +++ b/replace/test/main.c @@ -0,0 +1,37 @@ +/* + Unix SMB/CIFS implementation. + + libreplace tests + + Copyright (C) Jelmer Vernooij 2006 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +#include "replace.h" + +struct torture_context; +bool torture_local_replace(struct torture_context *ctx); + +int main(void) +{ + bool ret = torture_local_replace(NULL); + if (ret) + return 0; + return -1; +} diff --git a/talloc/Makefile.in b/talloc/Makefile.in index 9b1b6320b..c28693e2d 100644 --- a/talloc/Makefile.in +++ b/talloc/Makefile.in @@ -9,7 +9,7 @@ mandir = @mandir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ -buildinstdir = @buildinstdir@ +sharedbuilddir = @sharedbuilddir@ XSLTPROC = @XSLTPROC@ INSTALLCMD = @INSTALL@ CC = @CC@ @@ -32,14 +32,14 @@ include $(tallocdir)/talloc.mk $(TALLOC_SOLIB): $(LIBOBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(LIBOBJ) @SONAMEFLAG@$(TALLOC_SONAME) -build-install:: all - ${INSTALLCMD} -d $(buildinstdir)/lib - ${INSTALLCMD} -m 755 libtalloc.a $(buildinstdir)/lib - ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(buildinstdir)/lib - ln -sf $(TALLOC_SOLIB) $(buildinstdir)/lib/$(TALLOC_SONAME) - ln -sf $(TALLOC_SOLIB) $(buildinstdir)/lib/libtalloc.so - ${INSTALLCMD} -d $(buildinstdir)/include - ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(buildinstdir)/include +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libtalloc.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(TALLOC_SOLIB) $(sharedbuilddir)/lib + ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/$(TALLOC_SONAME) + ln -sf $(TALLOC_SOLIB) $(sharedbuilddir)/lib/libtalloc.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/talloc.h $(sharedbuilddir)/include check: test diff --git a/talloc/build_macros.m4 b/talloc/build_macros.m4 index bb05a5822..c036668cd 100644 --- a/talloc/build_macros.m4 +++ b/talloc/build_macros.m4 @@ -1,14 +1,14 @@ -AC_DEFUN(BUILD_WITH_BUILD_INST_DIR, - [ AC_ARG_WITH([build-install-dir], - [AC_HELP_STRING([--with-build-install-dir=DIR], - [temporary build directory where libraries are installed [$srcdir/buildinst]])]) +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) - buildinstdir="$srcdir/buildinst" - if test x"$with_build_install_dir" != x; then - buildinstdir=$with_build_install_dir - CFLAGS="$CFLAGS -I$with_build_install_dir/include" - CPPFLAGS="$CPPFLAGS -I$with_build_install_dir/include" - LIBS="$LIBS -L$with_build_install_dir/lib" + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" fi - AC_SUBST(buildinstdir) + AC_SUBST(sharedbuilddir) ]) + diff --git a/talloc/config.mk b/talloc/config.mk index c13e1b79a..5cdf3a1a8 100644 --- a/talloc/config.mk +++ b/talloc/config.mk @@ -1,7 +1,7 @@ [LIBRARY::LIBTALLOC] OUTPUT_TYPE = MERGED_OBJ -CFLAGS = -Ilib/talloc +CFLAGS = -I$(tallocsrcdir) -LIBTALLOC_OBJ_FILES = lib/talloc/talloc.o +LIBTALLOC_OBJ_FILES = $(tallocsrcdir)/talloc.o MANPAGES += $(tallocdir)/talloc.3 diff --git a/talloc/configure.ac b/talloc/configure.ac index 60314dcc7..d2538f922 100644 --- a/talloc/configure.ac +++ b/talloc/configure.ac @@ -22,6 +22,6 @@ AC_LIBREPLACE_SHLD AC_LIBREPLACE_SHLD_FLAGS m4_include(build_macros.m4) -BUILD_WITH_BUILD_INST_DIR +BUILD_WITH_SHARED_BUILD_DIR AC_OUTPUT(Makefile talloc.pc) diff --git a/talloc/libtalloc.m4 b/talloc/libtalloc.m4 index d2e8eba81..e6830fbef 100644 --- a/talloc/libtalloc.m4 +++ b/talloc/libtalloc.m4 @@ -1,10 +1,10 @@ dnl find the talloc sources. This is meant to work both for dnl talloc standalone builds, and builds of packages using talloc tallocdir="" -tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc" +tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc" for d in $tallocpaths; do - if test -f "$d/talloc.c"; then - tallocdir="$d" + if test -f "$srcdir/$d/talloc.c"; then + tallocdir="$d" AC_SUBST(tallocdir) break; fi @@ -15,7 +15,7 @@ fi TALLOC_OBJ="talloc.o" AC_SUBST(TALLOC_OBJ) -TALLOC_CFLAGS="-I$tallocdir" +TALLOC_CFLAGS="-I$srcdir/$tallocdir" AC_SUBST(TALLOC_CFLAGS) TALLOC_LIBS="" diff --git a/talloc/talloc.c b/talloc/talloc.c index 12b85f5a6..1f7e52439 100644 --- a/talloc/talloc.c +++ b/talloc/talloc.c @@ -82,11 +82,19 @@ #if (__GNUC__ >= 3) /* the strange !! is to ensure that __builtin_expect() takes either 0 or 1 as its first argument */ +#ifndef likely #define likely(x) __builtin_expect(!!(x), 1) +#endif +#ifndef unlikely #define unlikely(x) __builtin_expect(!!(x), 0) +#endif #else -#define likely(x) x -#define unlikely(x) x +#ifndef likely +#define likely(x) (x) +#endif +#ifndef unlikely +#define unlikely(x) (x) +#endif #endif /* this null_context is only used if talloc_enable_leak_report() or diff --git a/talloc/talloc.mk b/talloc/talloc.mk index 23331b636..f183cd57e 100644 --- a/talloc/talloc.mk +++ b/talloc/talloc.mk @@ -5,8 +5,8 @@ TALLOC_SONAME = libtalloc.$(SHLIBEXT).1 all:: libtalloc.a $(TALLOC_SOLIB) testsuite -testsuite:: $(LIBOBJ) testsuite.o - $(CC) $(CFLAGS) -o testsuite testsuite.o $(LIBOBJ) $(LIBS) +testsuite:: $(LIBOBJ) testsuite.o testsuite_main.o + $(CC) $(CFLAGS) -o testsuite testsuite.o testsuite_main.o $(LIBOBJ) $(LIBS) libtalloc.a: $(LIBOBJ) ar -rv $@ $(LIBOBJ) @@ -28,7 +28,7 @@ install:: all doc:: talloc.3 talloc.3.html clean:: - rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) libtalloc.a testsuite testsuite.o *.gc?? talloc.3 talloc.3.html + rm -f *~ $(LIBOBJ) $(TALLOC_SOLIB) libtalloc.a testsuite testsuite.o testsuite_main.o *.gc?? talloc.3 talloc.3.html test:: testsuite ./testsuite diff --git a/talloc/testsuite.c b/talloc/testsuite.c index 3f06eee56..3d490ddf4 100644 --- a/talloc/testsuite.c +++ b/talloc/testsuite.c @@ -1140,13 +1140,3 @@ bool torture_local_talloc(struct torture_context *tctx) return ret; } - -#if _SAMBA_BUILD_ < 4 -int main(void) -{ - bool ret = torture_local_talloc(NULL); - if (!ret) - return -1; - return 0; -} -#endif diff --git a/talloc/testsuite_main.c b/talloc/testsuite_main.c new file mode 100644 index 000000000..1b5133327 --- /dev/null +++ b/talloc/testsuite_main.c @@ -0,0 +1,37 @@ +/* + Unix SMB/CIFS implementation. + + local testing of talloc routines. + + Copyright (C) Andrew Tridgell 2004 + + ** NOTE! The following LGPL license applies to the talloc + ** library. This does NOT imply that all of Samba is released + ** under the LGPL + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . +*/ + +#include "replace.h" + +struct torture_context; +bool torture_local_talloc(struct torture_context *tctx); + +int main(void) +{ + bool ret = torture_local_talloc(NULL); + if (!ret) + return -1; + return 0; +} diff --git a/tdb/Makefile.in b/tdb/Makefile.in index 0ec6c1a8d..9915d8826 100644 --- a/tdb/Makefile.in +++ b/tdb/Makefile.in @@ -12,7 +12,7 @@ libdir = @libdir@ VPATH = @srcdir@:@libreplacedir@ srcdir = @srcdir@ builddir = @builddir@ -buildinstdir = @buildinstdir@ +sharedbuilddir = @sharedbuilddir@ INSTALLCMD = @INSTALL@ CPPFLAGS = @CPPFLAGS@ -I$(srcdir)/include -Iinclude CFLAGS = $(CPPFLAGS) @CFLAGS@ @@ -45,14 +45,14 @@ install:: all $(TDB_SOLIB): $(TDB_OBJ) $(SHLD) $(SHLD_FLAGS) -o $@ $(TDB_OBJ) @SONAMEFLAG@$(TDB_SONAME) -build-install: all - ${INSTALLCMD} -d $(buildinstdir)/lib - ${INSTALLCMD} -m 755 libtdb.a $(buildinstdir)/lib - ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(buildinstdir)/lib - ln -sf $(TDB_SOLIB) $(buildinstdir)/lib/$(TDB_SONAME) - ln -sf $(TDB_SOLIB) $(buildinstdir)/lib/libtdb.so - ${INSTALLCMD} -d $(buildinstdir)/include - ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(buildinstdir)/include +shared-build: all + ${INSTALLCMD} -d $(sharedbuilddir)/lib + ${INSTALLCMD} -m 644 libtdb.a $(sharedbuilddir)/lib + ${INSTALLCMD} -m 755 $(TDB_SOLIB) $(sharedbuilddir)/lib + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/$(TDB_SONAME) + ln -sf $(TDB_SOLIB) $(sharedbuilddir)/lib/libtdb.so + ${INSTALLCMD} -d $(sharedbuilddir)/include + ${INSTALLCMD} -m 644 $(srcdir)/include/tdb.h $(sharedbuilddir)/include check: test diff --git a/tdb/build_macros.m4 b/tdb/build_macros.m4 index bb05a5822..c036668cd 100644 --- a/tdb/build_macros.m4 +++ b/tdb/build_macros.m4 @@ -1,14 +1,14 @@ -AC_DEFUN(BUILD_WITH_BUILD_INST_DIR, - [ AC_ARG_WITH([build-install-dir], - [AC_HELP_STRING([--with-build-install-dir=DIR], - [temporary build directory where libraries are installed [$srcdir/buildinst]])]) +AC_DEFUN(BUILD_WITH_SHARED_BUILD_DIR, + [ AC_ARG_WITH([shared-build-dir], + [AC_HELP_STRING([--with-shared-build-dir=DIR], + [temporary build directory where libraries are installed [$srcdir/sharedbuild]])]) - buildinstdir="$srcdir/buildinst" - if test x"$with_build_install_dir" != x; then - buildinstdir=$with_build_install_dir - CFLAGS="$CFLAGS -I$with_build_install_dir/include" - CPPFLAGS="$CPPFLAGS -I$with_build_install_dir/include" - LIBS="$LIBS -L$with_build_install_dir/lib" + sharedbuilddir="$srcdir/sharedbuild" + if test x"$with_shared_build_dir" != x; then + sharedbuilddir=$with_shared_build_dir + CFLAGS="$CFLAGS -I$with_shared_build_dir/include" + LDFLAGS="$LDFLAGS -L$with_shared_build_dir/lib" fi - AC_SUBST(buildinstdir) + AC_SUBST(sharedbuilddir) ]) + diff --git a/tdb/common/io.c b/tdb/common/io.c index 172ab69d8..661f76148 100644 --- a/tdb/common/io.c +++ b/tdb/common/io.c @@ -189,7 +189,9 @@ int tdb_munmap(struct tdb_context *tdb) #ifdef HAVE_MMAP if (tdb->map_ptr) { - int ret = munmap(tdb->map_ptr, tdb->map_size); + int ret; + + ret = munmap(tdb->map_ptr, tdb->map_size); if (ret != 0) return ret; } diff --git a/tdb/common/tdb.c b/tdb/common/tdb.c index 767452c9b..c7cec297f 100644 --- a/tdb/common/tdb.c +++ b/tdb/common/tdb.c @@ -243,7 +243,7 @@ int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct if (tdb->read_only || tdb->traverse_read) return -1; - if (tdb->traverse_write != 0 || + if (((tdb->traverse_write != 0) && (!TDB_DEAD(rec))) || tdb_write_lock_record(tdb, rec_ptr) == -1) { /* Someone traversing here: mark it as dead */ rec->magic = TDB_DEAD_MAGIC; diff --git a/tdb/common/transaction.c b/tdb/common/transaction.c index 4e2127be6..7acda640c 100644 --- a/tdb/common/transaction.c +++ b/tdb/common/transaction.c @@ -563,7 +563,7 @@ static int transaction_sync(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction: fsync failed\n")); return -1; } -#ifdef MS_SYNC +#ifdef HAVE_MMAP if (tdb->map_ptr) { tdb_off_t moffset = offset & ~(tdb->page_size-1); if (msync(moffset + (char *)tdb->map_ptr, diff --git a/tdb/config.mk b/tdb/config.mk index b9a8f80dd..90c9ba286 100644 --- a/tdb/config.mk +++ b/tdb/config.mk @@ -2,12 +2,12 @@ # Start SUBSYSTEM LIBTDB [LIBRARY::LIBTDB] OUTPUT_TYPE = STATIC_LIBRARY -CFLAGS = -Ilib/tdb/include +CFLAGS = -I$(tdbsrcdir)/include # # End SUBSYSTEM ldb ################################################ -LIBTDB_OBJ_FILES = $(addprefix lib/tdb/common/, \ +LIBTDB_OBJ_FILES = $(addprefix $(tdbsrcdir)/common/, \ tdb.o dump.o io.o lock.o \ open.o traverse.o freelist.o \ error.o transaction.o) @@ -21,7 +21,7 @@ PRIVATE_DEPENDENCIES = \ # End BINARY tdbtool ################################################ -tdbtool_OBJ_FILES = lib/tdb/tools/tdbtool.o +tdbtool_OBJ_FILES = $(tdbsrcdir)/tools/tdbtool.o ################################################ # Start BINARY tdbtorture @@ -32,7 +32,7 @@ PRIVATE_DEPENDENCIES = \ # End BINARY tdbtorture ################################################ -tdbtorture_OBJ_FILES = lib/tdb/tools/tdbtorture.o +tdbtorture_OBJ_FILES = $(tdbsrcdir)/tools/tdbtorture.o ################################################ # Start BINARY tdbdump @@ -43,7 +43,7 @@ PRIVATE_DEPENDENCIES = \ # End BINARY tdbdump ################################################ -tdbdump_OBJ_FILES = lib/tdb/tools/tdbdump.o +tdbdump_OBJ_FILES = $(tdbsrcdir)/tools/tdbdump.o ################################################ # Start BINARY tdbbackup @@ -54,4 +54,4 @@ PRIVATE_DEPENDENCIES = \ # End BINARY tdbbackup ################################################ -tdbbackup_OBJ_FILES = lib/tdb/tools/tdbbackup.o +tdbbackup_OBJ_FILES = $(tdbsrcdir)/tools/tdbbackup.o diff --git a/tdb/configure.ac b/tdb/configure.ac index 5e07b5eb6..4bf2e98e8 100644 --- a/tdb/configure.ac +++ b/tdb/configure.ac @@ -29,6 +29,6 @@ if test -z "$PYTHON_CONFIG"; then fi m4_include(build_macros.m4) -BUILD_WITH_BUILD_INST_DIR +BUILD_WITH_SHARED_BUILD_DIR AC_OUTPUT(Makefile tdb.pc) diff --git a/tdb/libtdb.m4 b/tdb/libtdb.m4 index 1e17a7a4f..252e0b0be 100644 --- a/tdb/libtdb.m4 +++ b/tdb/libtdb.m4 @@ -1,7 +1,7 @@ dnl find the tdb sources. This is meant to work both for dnl tdb standalone builds, and builds of packages using tdb tdbdir="" -tdbpaths="$srcdir $srcdir/lib/tdb $srcdir/tdb $srcdir/../tdb" +tdbpaths="$srcdir $srcdir/lib/tdb $srcdir/tdb $srcdir/../tdb $srcdir/../lib/tdb" for d in $tdbpaths; do if test -f "$d/common/tdb.c"; then tdbdir="$d" diff --git a/tdb/tdb.i b/tdb/tdb.i index 3d8b69773..4b529913d 100644 --- a/tdb/tdb.i +++ b/tdb/tdb.i @@ -321,3 +321,8 @@ typedef struct tdb_context { # TODO: any other missing methods for container types } } tdb; + +%pythoncode { +__docformat__ = 'restructuredText' +open = Tdb +} diff --git a/tdb/tdb.py b/tdb/tdb.py index 9f306bab8..42129d209 100644 --- a/tdb/tdb.py +++ b/tdb/tdb.py @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 +# Version 1.3.36 # # Don't modify this file, modify the SWIG interface instead. @@ -337,5 +337,8 @@ Tdb.name = new_instancemethod(_tdb.Tdb_name,None,Tdb) Tdb_swigregister = _tdb.Tdb_swigregister Tdb_swigregister(Tdb) +__docformat__ = 'restructuredText' +open = Tdb + diff --git a/tdb/tdb_wrap.c b/tdb/tdb_wrap.c index 32665d79f..e997e8857 100644 --- a/tdb/tdb_wrap.c +++ b/tdb/tdb_wrap.c @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 1.3.36 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -52,6 +52,12 @@ # endif #endif +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ +# endif +#endif + #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) @@ -2518,7 +2524,7 @@ static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0}; #define SWIG_name "_tdb" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x010336 #define SWIG_VERSION SWIGVERSION @@ -2818,7 +2824,6 @@ SWIGINTERN PyObject *_wrap_new_Tdb(PyObject *SWIGUNUSEDPARM(self), PyObject *arg int arg3 ; int arg4 ; mode_t arg5 ; - tdb *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2838,6 +2843,7 @@ SWIGINTERN PyObject *_wrap_new_Tdb(PyObject *SWIGUNUSEDPARM(self), PyObject *arg char * kwnames[] = { (char *) "name",(char *) "hash_size",(char *) "tdb_flags",(char *) "flags",(char *) "mode", NULL }; + tdb *result = 0 ; arg2 = 0; arg3 = TDB_DEFAULT; @@ -2895,10 +2901,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - enum TDB_ERROR result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + enum TDB_ERROR result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -2930,7 +2936,6 @@ SWIGINTERN PyObject *_wrap_delete_Tdb(PyObject *SWIGUNUSEDPARM(self), PyObject * } arg1 = (tdb *)(argp1); delete_tdb(arg1); - resultobj = SWIG_Py_Void(); return resultobj; fail: @@ -2941,10 +2946,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -2966,7 +2971,6 @@ SWIGINTERN PyObject *_wrap_Tdb_append(PyObject *SWIGUNUSEDPARM(self), PyObject * tdb *arg1 = (tdb *) 0 ; TDB_DATA arg2 ; TDB_DATA arg3 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -2975,6 +2979,7 @@ SWIGINTERN PyObject *_wrap_Tdb_append(PyObject *SWIGUNUSEDPARM(self), PyObject * char * kwnames[] = { (char *) "self",(char *) "key",(char *) "new_dbuf", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:Tdb_append",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); @@ -3013,10 +3018,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_errorstr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3037,7 +3042,6 @@ SWIGINTERN PyObject *_wrap_Tdb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *arg PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; TDB_DATA arg2 ; - TDB_DATA result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -3045,6 +3049,7 @@ SWIGINTERN PyObject *_wrap_Tdb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *arg char * kwnames[] = { (char *) "self",(char *) "key", NULL }; + TDB_DATA result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Tdb_get",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); @@ -3079,7 +3084,6 @@ SWIGINTERN PyObject *_wrap_Tdb_delete(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; TDB_DATA arg2 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -3087,6 +3091,7 @@ SWIGINTERN PyObject *_wrap_Tdb_delete(PyObject *SWIGUNUSEDPARM(self), PyObject * char * kwnames[] = { (char *) "self",(char *) "key", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Tdb_delete",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); @@ -3118,7 +3123,6 @@ SWIGINTERN PyObject *_wrap_Tdb_store(PyObject *SWIGUNUSEDPARM(self), PyObject *a TDB_DATA arg2 ; TDB_DATA arg3 ; int arg4 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int val4 ; @@ -3130,6 +3134,7 @@ SWIGINTERN PyObject *_wrap_Tdb_store(PyObject *SWIGUNUSEDPARM(self), PyObject *a char * kwnames[] = { (char *) "self",(char *) "key",(char *) "dbuf",(char *) "flag", NULL }; + int result; arg4 = TDB_REPLACE; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Tdb_store",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail; @@ -3177,7 +3182,6 @@ SWIGINTERN PyObject *_wrap_Tdb_exists(PyObject *SWIGUNUSEDPARM(self), PyObject * PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; TDB_DATA arg2 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -3185,6 +3189,7 @@ SWIGINTERN PyObject *_wrap_Tdb_exists(PyObject *SWIGUNUSEDPARM(self), PyObject * char * kwnames[] = { (char *) "self",(char *) "key", NULL }; + int result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Tdb_exists",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); @@ -3213,10 +3218,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_firstkey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - TDB_DATA result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + TDB_DATA result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3242,7 +3247,6 @@ SWIGINTERN PyObject *_wrap_Tdb_nextkey(PyObject *SWIGUNUSEDPARM(self), PyObject PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; TDB_DATA arg2 ; - TDB_DATA result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; @@ -3250,6 +3254,7 @@ SWIGINTERN PyObject *_wrap_Tdb_nextkey(PyObject *SWIGUNUSEDPARM(self), PyObject char * kwnames[] = { (char *) "self",(char *) "key", NULL }; + TDB_DATA result; if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Tdb_nextkey",kwnames,&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_tdb_context, 0 | 0 ); @@ -3283,10 +3288,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_lock_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3306,10 +3311,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_unlock_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3329,10 +3334,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_read_lock_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3352,10 +3357,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_read_unlock_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3375,10 +3380,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_reopen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3398,10 +3403,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_transaction_start(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3421,10 +3426,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_transaction_commit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3444,10 +3449,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_transaction_cancel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3467,10 +3472,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_transaction_recover(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3490,10 +3495,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_hash_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3513,10 +3518,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_map_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - size_t result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + size_t result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3536,10 +3541,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_get_flags(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + int result; if (!args) SWIG_fail; swig_obj[0] = args; @@ -3592,10 +3597,10 @@ fail: SWIGINTERN PyObject *_wrap_Tdb_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; tdb *arg1 = (tdb *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; + char *result = 0 ; if (!args) SWIG_fail; swig_obj[0] = args; -- cgit