ccanlint: check for #ifdef
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Mar 2011 07:20:32 +0000 (17:50 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Mar 2011 07:20:32 +0000 (17:50 +1030)
commit9450cb3c1dff76e09305d18687291bce4221e9b6
tree7a26bb6b081d2a7a20776b1883c26e2644ae9d00
parent6c1d3e2739e97674069862ec7369677d25e80312
ccanlint: check for #ifdef

Old habits die hard; it's better to use #if <FEATURE> than #ifdef <FEATURE>;
they're similar, because undefined identifiers evaluate to zero, but with
GCC's -Wundef flag you can detect mis-spelled or missing features with
#if.

autoconf-style config.h leave unset features undefined, so this works for
those config.h too.
tools/ccanlint/tests/hash_if.c [new file with mode: 0644]