summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-01 05:06:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:54 -0500
commitf9e507980e6a3340ae135e81d3106a836116d6b0 (patch)
tree5d8197633914d86d3a95e6046fa21e235d643347 /source4/torture
parentf80ce3ecb9f7ee2ccf5d71970f9c61ccc18e8c76 (diff)
downloadsamba-f9e507980e6a3340ae135e81d3106a836116d6b0.tar.gz
samba-f9e507980e6a3340ae135e81d3106a836116d6b0.tar.bz2
samba-f9e507980e6a3340ae135e81d3106a836116d6b0.zip
r4466: rather than defining "STANDALONE" for building tdb, ldb and talloc
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba build. This makes it easier to pull code out of Samba for external use. (This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/local/talloc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/torture/local/talloc.c b/source4/torture/local/talloc.c
index 2eedb2b9b0..69becf67cc 100644
--- a/source4/torture/local/talloc.c
+++ b/source4/torture/local/talloc.c
@@ -20,7 +20,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef _STANDALONE_
+#ifdef _SAMBA_BUILD_
+#include "includes.h"
+#else
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -28,12 +30,10 @@
#include <sys/time.h>
#include <time.h>
#include "talloc.h"
-#else
-#include "includes.h"
#endif
/* the test suite can be built standalone, or as part of Samba */
-#ifdef _STANDALONE_
+#ifndef _SAMBA_BUILD_
typedef enum {False=0,True=1} BOOL;
static struct timeval current_time(void)
@@ -49,7 +49,7 @@ static double elapsed_time(struct timeval *tv)
return (tv2.tv_sec - tv->tv_sec) +
(tv2.tv_usec - tv->tv_usec)*1.0e-6;
}
-#endif /* _STANDALONE_ */
+#endif /* _SAMBA_BUILD_ */
#define CHECK_SIZE(ptr, tsize) do { \
@@ -712,7 +712,7 @@ BOOL torture_local_talloc(void)
-#ifdef _STANDALONE_
+#ifndef _SAMBA_BUILD_
int main(void)
{
if (!torture_local_talloc(0)) {
@@ -722,4 +722,3 @@ int main(void)
return 0;
}
#endif
-