Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 magnus 1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 20_spf_dns_include_std_headers.dpatch by Magnus Holmgren <magnus@kibibyte.se>
3
##
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Include arpa/nameser.h and netdb.h from spf_dns.h instead of defining
6
## DP: the constants needed unless certain HAVE_ macros are defined.
7
 
8
@DPATCH@
9
 
10
diff -Nur libspf2-1.2.5.dfsg/src/include/spf_dns.h libspf2-1.2.5.dfsg.new/src/include/spf_dns.h
11
--- libspf2-1.2.5.dfsg/src/include/spf_dns.h	2004-08-29 16:59:33.000000000 +0200
12
+++ libspf2-1.2.5.dfsg.new/src/include/spf_dns.h	2007-03-23 18:04:17.000000000 +0100
30 magnus 13
@@ -61,48 +61,16 @@
2 magnus 14
  *
15
  */
16
 
17
-
18
-/*
19
- * For those who don't have <arpa/nameserv.h>
20
+/* The following two header files might not exist on all platforms,
21
+ * but at least they exist on Debian with libc6.
22
  */
23
+#include <arpa/nameser.h>
24
+#include <netdb.h>
25
 
30 magnus 26
-/* XXX This should use a more sensible define. */
2 magnus 27
-#if !defined( HAVE_NS_TYPE )
28
-
29
-#define	ns_t_invalid	0
30
-#define	ns_t_a		1
31
-#define	ns_t_ns		2
32
-#define	ns_t_cname	5
33
-#define	ns_t_ptr	12
34
-#define	ns_t_mx		15
35
-#define	ns_t_txt	16
36
-#define ns_t_aaaa	28
37
-/* #define ns_t_a6		38 */
38
-#define	ns_t_any        255		/* Wildcard match. */
39
-
40
-typedef int	ns_type;
41
-#endif
42
-
30 magnus 43
 #if ! HAVE_DECL_NS_T_SPF
44
 #define ns_t_spf	99
45
 #endif
46
 
47
-#if ! HAVE_DECL_NS_T_INVALID
2 magnus 48
-#define	ns_t_invalid	0
49
-#endif
50
-
51
-
52
-/*
53
- * For those who don't have <netdb.h>
54
- */
55
-
56
-#if !defined(HAVE_NETDB_H) && !defined(_WIN32)
57
-#define NETDB_SUCCESS	0
58
-#define	HOST_NOT_FOUND 	1		/* NXDOMAIN (authoritative answer)*/
59
-#define	TRY_AGAIN	2		/* SERVFAIL (no authoritative answer)*/
60
-#define	NO_RECOVERY	3		/* invalid/unimplmeneted query	*/
61
-#define	NO_DATA		4		/* host found, but no RR of req type*/
62
-#endif
63
 typedef int SPF_dns_stat_t;
64
 
65
 typedef struct SPF_dns_server_struct SPF_dns_server_t;