summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-02 10:35:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:30 -0500
commit6ddc797e3a6a5852c0d587ed1206f84e95b54210 (patch)
treefb2edf45fd6e64e891c9c41504d5580d6ab2685b /source4/lib/replace
parent03cb0224d4dc93e530342e73001a30722cdf75d1 (diff)
downloadsamba-6ddc797e3a6a5852c0d587ed1206f84e95b54210.tar.gz
samba-6ddc797e3a6a5852c0d587ed1206f84e95b54210.tar.bz2
samba-6ddc797e3a6a5852c0d587ed1206f84e95b54210.zip
r19033: prepare to use the libreplace testsuite as LOCAL-REPLACE in smbtorture
metze (This used to be commit 71fc73e11cee89f1b52cda5a32468a74a38cecc3)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/test/testsuite.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/replace/test/testsuite.c b/source4/lib/replace/test/testsuite.c
index 6644fce6bd..fa5265f66f 100644
--- a/source4/lib/replace/test/testsuite.c
+++ b/source4/lib/replace/test/testsuite.c
@@ -89,7 +89,7 @@ static int test_strlcpy(void)
char buf[4];
const struct {
const char *src;
- int result;
+ size_t result;
} tests[] = {
{ "abc", 3 },
{ "abcdef", 6 },
@@ -373,9 +373,11 @@ static int test_MAX(void)
return true;
}
-int torture_local_replace(void *ctx)
+struct torture_context;
+
+bool torture_local_replace(struct torture_context *torture)
{
- int ret = true;
+ bool ret = true;
ret &= test_ftruncate();
ret &= test_strlcpy();
ret &= test_strlcat();
@@ -423,7 +425,7 @@ int torture_local_replace(void *ctx)
return ret;
}
-#if !defined(_SAMBA_BUILD_) || ((SAMBA_VERSION_MAJOR==3)&&(SAMBA_VERSION_MINOR<9))
+#if _SAMBA_BUILD_<4
int main(void)
{
if (!torture_local_replace(NULL)) {