diff options
author | Tobias Markmann <tm@ayena.de> | 2012-03-12 17:32:02 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2012-03-21 20:41:16 (GMT) |
commit | 2878d950c11526094dc2faeb2caeeb1004f1690d (patch) | |
tree | 891760e443f9c90135165bb4ec29c72647179bcf /3rdParty/Ldns/src/include/ldns/common.h | |
parent | 2fa37f2976b933ca0bcf5f85dd1615805776d67d (diff) | |
download | swift-contrib-2878d950c11526094dc2faeb2caeeb1004f1690d.zip swift-contrib-2878d950c11526094dc2faeb2caeeb1004f1690d.tar.bz2 |
Adding basic unbound support.
Diffstat (limited to '3rdParty/Ldns/src/include/ldns/common.h')
-rw-r--r-- | 3rdParty/Ldns/src/include/ldns/common.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/3rdParty/Ldns/src/include/ldns/common.h b/3rdParty/Ldns/src/include/ldns/common.h new file mode 100644 index 0000000..ed3847f --- /dev/null +++ b/3rdParty/Ldns/src/include/ldns/common.h @@ -0,0 +1,69 @@ +/** + * \file common.h + * + * Common definitions for LDNS + */ + +/** + * a Net::DNS like library for C + * + * (c) NLnet Labs, 2004-2006 + * + * See the file LICENSE for the license + */ + +#ifndef LDNS_COMMON_H +#define LDNS_COMMON_H + +/* + * The build configuration that is used in the distributed headers, + * as detected and determined by the auto configure script. + */ +#define LDNS_BUILD_CONFIG_HAVE_SSL 1 +#define LDNS_BUILD_CONFIG_USE_ECDSA 0 +#define LDNS_BUILD_CONFIG_HAVE_INTTYPES_H 1 +#define LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT 1 +#define LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED 1 + +/* + * HAVE_STDBOOL_H is not available when distributed as a library, but no build + * configuration variables may be used (like those above) because the header + * is sometimes only available when using special compiler flags to enable the + * c99 environment. Because we cannot force the usage of this flag, we have to + * provide a default type. Below what is suggested by the autoconf manual. + */ +/*@ignore@*/ +/* splint barfs on this construct */ +#ifdef HAVE_STDBOOL_H +# include <stdbool.h> +#else +# ifndef HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# else +# define _Bool signed char +# endif +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +#endif +/*@end@*/ + +#if LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT +#define ATTR_FORMAT(archetype, string_index, first_to_check) \ + __attribute__ ((format (archetype, string_index, first_to_check))) +#else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */ +#define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */ +#endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */ + +#if defined(__cplusplus) +#define ATTR_UNUSED(x) +#elif LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED +#define ATTR_UNUSED(x) x __attribute__((unused)) +#else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */ +#define ATTR_UNUSED(x) x +#endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */ + +#endif /* LDNS_COMMON_H */ |