git.samba.org
/
samba.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'master' of ctdb into 'master' of samba
[samba.git]
/
lib
/
ccan
/
asearch
/
test
/
compile_fail-return-value.c
1
#include <ccan/asearch/asearch.h>
2
3
static int cmp(const char *key, char *const *elem)
4
{
5
return 0;
6
}
7
8
int main(int argc, char **argv)
9
{
10
const char key[] = "key";
11
12
#ifdef FAIL
13
int **p;
14
#if !HAVE_TYPEOF
15
#error "Unfortunately we don't fail if no typeof."
16
#endif
17
#else
18
char **p;
19
#endif
20
p = asearch(key, argv+1, argc-1, cmp);
21
return p ? 0 : 1;
22
}