4 * Common definitions for LDNS
8 * a Net::DNS like library for C
10 * (c) NLnet Labs, 2004-2006
12 * See the file LICENSE for the license
18 #if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
20 #if defined(HAVE_STDBOOL_H)
25 /* splint barfs on this construct */
26 typedef unsigned char bool;
30 #define __bool_true_false_are_defined 1
37 #ifdef HAVE_ATTR_FORMAT
38 #define ATTR_FORMAT(archetype, string_index, first_to_check) \
39 __attribute__ ((format (archetype, string_index, first_to_check)))
40 #else /* !HAVE_ATTR_FORMAT */
41 #define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
42 #endif /* !HAVE_ATTR_FORMAT */
44 #if defined(__cplusplus)
45 #define ATTR_UNUSED(x)
46 #elif defined(HAVE_ATTR_UNUSED)
47 #define ATTR_UNUSED(x) x __attribute__((unused))
48 #else /* !HAVE_ATTR_UNUSED */
49 #define ATTR_UNUSED(x) x
50 #endif /* !HAVE_ATTR_UNUSED */
52 #endif /* LDNS_COMMON_H */