#AC_HEADER_SYS_WAIT
#AC_CHECK_HEADERS([getopt.h fcntl.h stdlib.h string.h strings.h unistd.h])
# do the very minimum - we can always extend this
-AC_CHECK_HEADERS([getopt.h stdlib.h stdio.h openssl/ssl.h assert.h netinet/in.h ctype.h])
+AC_CHECK_HEADERS([getopt.h stdbool.h stdlib.h stdio.h openssl/ssl.h assert.h netinet/in.h ctype.h])
AC_CHECK_HEADERS(sys/param.h sys/mount.h,,,
[
[
--- /dev/null
+/*
+ * common.h
+ *
+ * Common definitions for LDNS
+ *
+ * a Net::DNS like library for C
+ *
+ * (c) NLnet Labs, 2004
+ *
+ * See the file LICENSE for the license
+ */
+
+#ifndef _LDNS_COMMON_H
+#define _LDNS_COMMON_H
+
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else
+
+#ifndef __cplusplus
+
+typedef unsigned char bool;
+#define false 0
+#define true 1
+
+#endif /* !__cplusplus */
+
+#endif /* !HAVE_STDBOOL_H */
+
+#endif /* !_LDNS_COMMON_H */
--- /dev/null
+/*
+ * ldns.h
+ *
+ * Main include files for LDNS clients.
+ *
+ * a Net::DNS like library for C
+ *
+ * (c) NLnet Labs, 2004
+ *
+ * See the file LICENSE for the license
+ */
+
+#ifndef _LDNS_H
+#define _LDNS_H
+
+#include <ldns/common.h>
+#include <ldns/rdata.h>
+#include <ldns/rr.h>
+#include <ldns/packet.h>
+
+#endif /* _LDNS_H */
*
* See the file LICENSE for the license
*/
-#ifdef _PACKET_H
-#else
-#define _PACKET_H
-#include "config.h"
+
+#ifndef _LDNS_PACKET_H
+#define _LDNS_PACKET_H
+
+#include <ldns/rr.h>
/**
* \brief Header of a dns packet
*/
size_t dns_wire2packet(uint8_t *data, t_packet *packet);
-#endif
+#endif /* !_LDNS_PACKET_H */
*
* See the file LICENSE for the license
*/
-#ifdef _RDATA_H
-#else
-#define _RDATA_H
-#include <config.h>
+#ifndef _LDNS_RDATA_H
+#define _LDNS_RDATA_H
/**
* LibDNS DESIGN
t_rdata_field *_ldns_rd_field_new(uint16_t, t_rd_type, uint8_t *);
uint8_t *_ldns_rd_field_data(t_rdata_field *);
void _ldns_rd_field_destroy(t_rdata_field *);
-#endif /* _RDATA_H */
+
+#endif /* !_LDNS_RDATA_H */
*
* See the file LICENSE for the license
*/
-#ifdef _RR_H
-#else
-#define _RR_H
-#include "rdata.h"
-#include "rr.h"
+#ifndef _LDNS_RR_H
+#define _LDNS_RR_H
+
+#include "ldns/rdata.h"
+#include "ldns/rr.h"
/* the different RR types */
/** a host address */
uint8_t *ldns_rr_owner(t_rr *);
uint8_t ldns_rr_ttl(t_rr *);
uint16_t ldns_rr_rd_count(t_rr *);
-#endif /* _RR_H */
+
+#endif /* _LDNS_RR_H */
#include <config.h>
-#include "rdata.h"
-#include "rr.h"
-#include "prototype.h"
-#include "packet.h"
+#include <ldns/packet.h>
+
#include "util.h"
/* Access functions
return pos;
}
-
+++ /dev/null
-/*
- * prototype.h
- *
- * general prototyps
- *
- * a Net::DNS like library for C
- *
- * (c) NLnet Labs, 2004
- *
- * See the file LICENSE for the license
- */
-#ifdef _PROTOTYPE_H
-#else
-#define _PROTOTYPE_H
-
-/* empty for now */
-
-#endif /* _PROTOTYPE_H */
#include <config.h>
-#include "rdata.h"
-#include "rr.h"
+#include <ldns/rdata.h>
+
#include "util.h"
-#include "prototype.h"
/* Access functions
* do this as functions to get type checking
#include <config.h>
-#include "rdata.h"
-#include "rr.h"
-#include "prototype.h"
+#include <ldns/rr.h>
+
#include "util.h"
/**
#include <config.h>
-#include "rdata.h"
-#include "rr.h"
-#include "packet.h"
-#include "prototype.h"
+#include <ldns/ldns.h>
+
#include "util.h"
int
#include <config.h>
-#include "rdata.h"
-#include "rr.h"
+#include <ldns/rdata.h>
+#include <ldns/rr.h>
/* put this here tmp. for debugging */
void
* See the file LICENSE for the license
*/
-#ifdef _UTIL_H
-#else
+#ifndef _UTIL_H
#define _UTIL_H
+#include <ldns/rr.h>
+
/**
* Memory management macro's
*/
void xprintf_rd_field(t_rdata_field *);
void xprintf_rr(t_rr *);
-#endif /* _UTIL_H */
+#endif /* !_UTIL_H */