From 1dcd3ad51bbeb4ba8048b08d62278df8e428031a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 1 Mar 2011 17:50:07 +1030 Subject: [PATCH] compiler, talloc, tap, tdb2: use #if instead of #ifdef. --- ccan/compiler/test/run-is_compile_constant.c | 2 +- ccan/talloc/talloc.h | 2 +- ccan/tap/tap.c | 2 +- ccan/tdb2/private.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ccan/compiler/test/run-is_compile_constant.c b/ccan/compiler/test/run-is_compile_constant.c index 0a15280b..a66f2e13 100644 --- a/ccan/compiler/test/run-is_compile_constant.c +++ b/ccan/compiler/test/run-is_compile_constant.c @@ -6,7 +6,7 @@ int main(int argc, char *argv[]) plan_tests(2); ok1(!IS_COMPILE_CONSTANT(argc)); -#ifdef HAVE_BUILTIN_CONSTANT_P +#if HAVE_BUILTIN_CONSTANT_P ok1(IS_COMPILE_CONSTANT(7)); #else pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false"); diff --git a/ccan/talloc/talloc.h b/ccan/talloc/talloc.h index 59c132ed..b1b5e9ac 100644 --- a/ccan/talloc/talloc.h +++ b/ccan/talloc/talloc.h @@ -276,7 +276,7 @@ int talloc_free(const void *ptr); */ #define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__) -#ifdef HAVE_TYPEOF +#if HAVE_TYPEOF /** * talloc_steal - change/set the parent context of a talloc pointer * @ctx: the new parent diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index 106da912..9c92f7f2 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -49,7 +49,7 @@ static int test_pid; /* Encapsulate the pthread code in a conditional. In the absence of libpthread the code does nothing */ -#ifdef HAVE_LIBPTHREAD +#if HAVE_LIBPTHREAD #include static pthread_mutex_t M = PTHREAD_MUTEX_INITIALIZER; # define LOCK pthread_mutex_lock(&M) diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index 09f447f9..de832af6 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -37,7 +37,7 @@ #include #include #include -#ifdef HAVE_BYTESWAP_H +#if HAVE_BYTESWAP_H #include #endif -- 2.39.2