]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Moved external include files to ldns directory.
authorErik Rozendaal <erik@NLnetLabs.nl>
Tue, 14 Dec 2004 13:26:51 +0000 (13:26 +0000)
committerErik Rozendaal <erik@NLnetLabs.nl>
Tue, 14 Dec 2004 13:26:51 +0000 (13:26 +0000)
13 files changed:
configure.ac
ldns/common.h [new file with mode: 0644]
ldns/ldns.h [new file with mode: 0644]
ldns/packet.h [moved from packet.h with 96% similarity]
ldns/rdata.h [moved from rdata.h with 97% similarity]
ldns/rr.h [moved from rr.h with 97% similarity]
packet.c
prototype.h [deleted file]
rdata.c
rr.c
run-test0.c
util.c
util.h

index 7dfc26ab341e694b811a207b6ca3c110aeca550c..d6e2a2d22c621bf61dc4f50ce6bbbfcdae2071c2 100644 (file)
@@ -20,7 +20,7 @@ AC_PATH_PROG(doxygen, doxygen, "/usr/bin/doxygen")
 #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,,,
 [
   [
diff --git a/ldns/common.h b/ldns/common.h
new file mode 100644 (file)
index 0000000..f74b32c
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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 */
diff --git a/ldns/ldns.h b/ldns/ldns.h
new file mode 100644 (file)
index 0000000..94d8787
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * 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 */
similarity index 96%
rename from packet.h
rename to ldns/packet.h
index bf5c5a9c2ced79124fe1629d71dcb6bad4f5ceae..30fe2c5c903b16e3a4df2ecbb57c7e99fd7a2563 100644 (file)
--- a/packet.h
@@ -9,10 +9,11 @@
  *
  * 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
@@ -119,4 +120,4 @@ t_packet *dns_packet_new();
  */
 size_t dns_wire2packet(uint8_t *data, t_packet *packet);
 
-#endif
+#endif  /* !_LDNS_PACKET_H */
similarity index 97%
rename from rdata.h
rename to ldns/rdata.h
index 6e790810e4390e3bf5484842cd88d590857e0daf..dadae330e77bdfb9c5057b4dcccbffb9b804907b 100644 (file)
--- a/rdata.h
@@ -9,11 +9,9 @@
  *
  * 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 
@@ -139,4 +137,5 @@ t_rd_type       _ldns_rd_field_type(t_rdata_field *);
 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 */
diff --git a/rr.h b/ldns/rr.h
similarity index 97%
rename from rr.h
rename to ldns/rr.h
index fd74bbb090bc5519b3dbf1248e086d2a7f0fb614..0969af984ff781f81877909559314816ee0517e3 100644 (file)
--- a/rr.h
+++ b/ldns/rr.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 */
@@ -168,4 +168,5 @@ void ldns_rr_push_rd_field(t_rr *, t_rdata_field *);
 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 */
index b7f7293568b470bab6d3de24dbe2f69b7e8fd5ac..bd7b6c6e1baf1b1355fb745a24ff2a0be2ae790c 100644 (file)
--- a/packet.c
+++ b/packet.c
 
 #include <config.h>
 
-#include "rdata.h"
-#include "rr.h"
-#include "prototype.h"
-#include "packet.h"
+#include <ldns/packet.h>
+
 #include "util.h"
 
 /* Access functions 
@@ -274,4 +272,3 @@ dns_wire2packet(uint8_t *wire, t_packet *packet)
 
        return pos;
 }
-
diff --git a/prototype.h b/prototype.h
deleted file mode 100644 (file)
index 6d5e1bc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * 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 */
diff --git a/rdata.c b/rdata.c
index 3658675db3b78e1b1f1bea3f7a81804889f476d7..00c020b2280dfe0fda68c348cf84a06c4fa5add2 100644 (file)
--- a/rdata.c
+++ b/rdata.c
 
 #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
diff --git a/rr.c b/rr.c
index 209e64f54b1ac739e42d68e63000b921028d3465..7f3332159989757e01968eeb7ac6671383dd21db 100644 (file)
--- a/rr.c
+++ b/rr.c
@@ -12,9 +12,8 @@
 
 #include <config.h>
 
-#include "rdata.h"
-#include "rr.h"
-#include "prototype.h"
+#include <ldns/rr.h>
+
 #include "util.h"
 
 /**
index 34a32045908049090c809fcb403cc71334040173..b32a5a5a8e5fc98c8750fd4c6cfea930779fa7a0 100644 (file)
@@ -5,10 +5,8 @@
 
 #include <config.h>
 
-#include "rdata.h"
-#include "rr.h"
-#include "packet.h"
-#include "prototype.h"
+#include <ldns/ldns.h>
+
 #include "util.h"
 
 int
diff --git a/util.c b/util.c
index f53472dcedb1e9668c75531215bf7c991feb4200..70a28c80bfe7f20cf8a4952c233a05efa8d0aab0 100644 (file)
--- a/util.c
+++ b/util.c
@@ -12,8 +12,8 @@
 
 #include <config.h>
 
-#include "rdata.h"
-#include "rr.h"
+#include <ldns/rdata.h>
+#include <ldns/rr.h>
 
 /* put this here tmp. for debugging */
 void
diff --git a/util.h b/util.h
index 67ce5f9b4cf41fc472323a97189d2cfd63541dbc..4ffb8e1c018c65c2341499908fd686e98fd71115 100644 (file)
--- a/util.h
+++ b/util.h
  * 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
  */
@@ -38,4 +39,4 @@
 void    xprintf_rd_field(t_rdata_field *);
 void    xprintf_rr(t_rr *);
 
-#endif /* _UTIL_H */
+#endif /* !_UTIL_H */