00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _LDNS_COMMON_H
00014 #define _LDNS_COMMON_H
00015
00016 #if !defined(__cplusplus) && !defined(__bool_true_false_are_defined)
00017
00018 #if defined(HAVE_STDBOOL_H)
00019 #include <stdbool.h>
00020 #else
00021
00022
00023
00024 typedef unsigned char bool;
00025 #define bool bool
00026 #define false 0
00027 #define true 1
00028 #define __bool_true_false_are_defined 1
00029
00030
00031 #endif
00032
00033 #endif
00034
00035 #ifdef HAVE_ATTR_FORMAT
00036 #define ATTR_FORMAT(archetype, string_index, first_to_check) \
00037 __attribute__ ((format (archetype, string_index, first_to_check)))
00038 #else
00039 #define ATTR_FORMAT(archetype, string_index, first_to_check)
00040 #endif
00041
00042 #if defined(__cplusplus)
00043 #define ATTR_UNUSED(x)
00044 #elif defined(HAVE_ATTR_UNUSED)
00045 #define ATTR_UNUSED(x) x __attribute__((unused))
00046 #else
00047 #define ATTR_UNUSED(x) x
00048 #endif
00049
00050 #endif