common.h

Go to the documentation of this file.
00001 
00015 #ifndef LDNS_COMMON_H
00016 #define LDNS_COMMON_H
00017 
00018 /*
00019  * The build configuration that is used in the distributed headers,
00020  * as detected and determined by the auto configure script.
00021  */
00022 #define LDNS_BUILD_CONFIG_HAVE_SSL         1
00023 #define LDNS_BUILD_CONFIG_USE_ECDSA        0
00024 #define LDNS_BUILD_CONFIG_HAVE_INTTYPES_H  1
00025 #define LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT 1
00026 #define LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED 1
00027 
00028 /*
00029  * HAVE_STDBOOL_H is not available when distributed as a library, but no build 
00030  * configuration variables may be used (like those above) because the header
00031  * is sometimes only available when using special compiler flags to enable the
00032  * c99 environment. Because we cannot force the usage of this flag, we have to
00033  * provide a default type. Below what is suggested by the autoconf manual.
00034  */
00035 /*@ignore@*/
00036 /* splint barfs on this construct */
00037 #ifdef HAVE_STDBOOL_H
00038 # include <stdbool.h>
00039 #else
00040 # ifndef HAVE__BOOL
00041 #  ifdef __cplusplus
00042 typedef bool _Bool;
00043 #  else
00044 #   define _Bool signed char
00045 #  endif
00046 # endif
00047 # define bool _Bool
00048 # define false 0
00049 # define true 1
00050 # define __bool_true_false_are_defined 1
00051 #endif
00052 /*@end@*/
00053 
00054 #if LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT
00055 #define ATTR_FORMAT(archetype, string_index, first_to_check) \
00056     __attribute__ ((format (archetype, string_index, first_to_check)))
00057 #else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */
00058 #define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
00059 #endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT */
00060 
00061 #if defined(__cplusplus)
00062 #define ATTR_UNUSED(x)
00063 #elif LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED
00064 #define ATTR_UNUSED(x)  x __attribute__((unused))
00065 #else /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */
00066 #define ATTR_UNUSED(x)  x
00067 #endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */
00068 
00069 #endif /* LDNS_COMMON_H */

Generated on 5 Apr 2012 for ldns by  doxygen 1.6.1