r22366: sync lib/talloc/ with samba4
authorStefan Metzmacher <metze@samba.org>
Thu, 19 Apr 2007 09:08:53 +0000 (09:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:29 +0000 (12:19 -0500)
metze

source/lib/talloc/config.mk
source/lib/talloc/talloc.h
source/lib/talloc/talloc.pc.in
source/lib/talloc/testsuite.c

index 0b06687dabdf4e70a09f22807b426f18110bcfcf..714ad72d1cdbee8e985c3d1f3f6d4ecddf980a60 100644 (file)
@@ -11,8 +11,3 @@ DESCRIPTION = A hierarchical pool based memory system with destructors
 #
 # End LIBRARY LIBTALLOC
 ################################################
-
-[BINARY::TALLOC]
-OBJ_FILES = testsuite.o
-PRIVATE_DEPENDENCIES = LIBTALLOC
-INSTALLDIR = TORTUREDIR/LOCAL
index 51640bb28d5e9607648d3e01b7c45dc26fc2ea5b..195c6c25b6d34f40c993ec868623af4e33558be9 100644 (file)
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+
 /* this is only needed for compatibility with the old talloc */
 typedef void TALLOC_CTX;
 
index 7f9ef754cbdeb7471276a1e2dace78a934be5247..f93036a33dbba718af32e8fa8f418a563193571c 100644 (file)
@@ -6,5 +6,6 @@ includedir=@includedir@
 Name: talloc 
 Description: A hierarchical pool based memory system with destructors
 Version: 4.0
-Libs: @LIBS@ -L${libdir} -ltalloc
-Cflags: -I${includedir} @CFLAGS@
+Libs: -L${libdir} -ltalloc
+Cflags: -I${includedir} 
+URL: http://talloc.samba.org/
index f51252e57bc47e3c7f957945e6724b53a7b38def..d122a5de0d4b6ad2c8fa5cf805d99c4c7e28b58f 100644 (file)
@@ -1012,6 +1012,8 @@ static bool test_talloc_ptrtype(void)
 
 static bool test_autofree(void)
 {
+#if _SAMBA_BUILD_ < 4
+       /* autofree test would kill smbtorture */
        void *p;
        printf("test: autofree [\nTALLOC AUTOFREE CONTEXT\n]\n");
 
@@ -1022,13 +1024,17 @@ static bool test_autofree(void)
        talloc_free(p);
 
        printf("success: autofree\n");
+#endif
        return true;
 }
 
-int main(void)
+struct torture_context;
+bool torture_local_talloc(struct torture_context *tctx)
 {
        bool ret = true;
 
+       setlinebuf(stdout);
+
        talloc_disable_null_tracking();
        talloc_enable_null_tracking();
 
@@ -1055,7 +1061,15 @@ int main(void)
        }
        ret &= test_autofree();
 
+       return ret;
+}
+
+#if _SAMBA_BUILD_ < 4
+int main(void)
+{
+       bool ret = torture_local_talloc(NULL);
        if (!ret)
                return -1;
        return 0;
 }
+#endif