ccan: fix likely redefinition warnings with --enable-tdb2
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 04:27:14 +0000 (13:57 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 04:27:14 +0000 (13:57 +0930)
commitb88e0c40b777480e101a7524697656d6a03fb563
treeeaec73435c2356a4e001d331a2a1aff31b8628a4
parentb10ad70f8fd5ee359b4409b373ba93ff050c82d4
ccan: fix likely redefinition warnings with --enable-tdb2

When we do --enable-tdb2, we start clashing with the replace.h
version:

In file included from ../lib/tdb2/tools/../private.h:25:0,
                 from ../lib/tdb2/tools/tdb2torture.c:60:
../lib/ccan/likely/likely.h:32:0: warning: "likely" redefined
../lib/replace/replace.h:762:0: note: this is the location of the previous definition
../lib/ccan/likely/likely.h:53:0: warning: "unlikely" redefined
../lib/replace/replace.h:765:0: note: this is the location of the previous definition

I don't like to #ifndef-protect them in general, since you don't want
different parts of the code to silently have different definitions,
but it's the simplest fix for now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/ccan/likely/likely.h