Browse Source

compiler, talloc, tap, tdb2: use #if instead of #ifdef.

Rusty Russell 15 years ago
parent
commit
1dcd3ad51b
4 changed files with 4 additions and 4 deletions
  1. 1 1
      ccan/compiler/test/run-is_compile_constant.c
  2. 1 1
      ccan/talloc/talloc.h
  3. 1 1
      ccan/tap/tap.c
  4. 1 1
      ccan/tdb2/private.h

+ 1 - 1
ccan/compiler/test/run-is_compile_constant.c

@@ -6,7 +6,7 @@ int main(int argc, char *argv[])
 	plan_tests(2);
 	plan_tests(2);
 
 
 	ok1(!IS_COMPILE_CONSTANT(argc));
 	ok1(!IS_COMPILE_CONSTANT(argc));
-#ifdef HAVE_BUILTIN_CONSTANT_P
+#if HAVE_BUILTIN_CONSTANT_P
 	ok1(IS_COMPILE_CONSTANT(7));
 	ok1(IS_COMPILE_CONSTANT(7));
 #else
 #else
 	pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false");
 	pass("If !HAVE_BUILTIN_CONSTANT_P, IS_COMPILE_CONSTANT always false");

+ 1 - 1
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__)
 #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
  * talloc_steal - change/set the parent context of a talloc pointer
  * @ctx: the new parent
  * @ctx: the new parent

+ 1 - 1
ccan/tap/tap.c

@@ -49,7 +49,7 @@ static int test_pid;
 
 
 /* Encapsulate the pthread code in a conditional.  In the absence of
 /* Encapsulate the pthread code in a conditional.  In the absence of
    libpthread the code does nothing */
    libpthread the code does nothing */
-#ifdef HAVE_LIBPTHREAD
+#if HAVE_LIBPTHREAD
 #include <pthread.h>
 #include <pthread.h>
 static pthread_mutex_t M = PTHREAD_MUTEX_INITIALIZER;
 static pthread_mutex_t M = PTHREAD_MUTEX_INITIALIZER;
 # define LOCK pthread_mutex_lock(&M)
 # define LOCK pthread_mutex_lock(&M)

+ 1 - 1
ccan/tdb2/private.h

@@ -37,7 +37,7 @@
 #include <ccan/tdb2/tdb2.h>
 #include <ccan/tdb2/tdb2.h>
 #include <ccan/likely/likely.h>
 #include <ccan/likely/likely.h>
 #include <ccan/compiler/compiler.h>
 #include <ccan/compiler/compiler.h>
-#ifdef HAVE_BYTESWAP_H
+#if HAVE_BYTESWAP_H
 #include <byteswap.h>
 #include <byteswap.h>
 #endif
 #endif