~ubuntu-branches/ubuntu/wily/maradns/wily-proposed

« back to all changes in this revision

Viewing changes to deadwood-3.2.05/update/2.9.06/deadwood-2.9.05-other_stuff.patch

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski, Tomasz Buchert, Dariusz Dwornikowski
  • Date: 2015-03-27 18:34:08 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20150327183408-wnfachdkdjt96yu6
Tags: 2.0.11-1
[ Tomasz Buchert ]
* Imported Upstream version 2.0.11

[ Dariusz Dwornikowski ]
* d/patches: 
  - refreshed all patches for new deadwood version
  - removed generating of random prime on build (Closes: #785536) 
* d/rules: date taken from changelog (Closes: #785535)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
I like keeping Deadwood's code small and lean; this patch doesn't compile
2
 
in some library functions never used by Deadwood unless compiled with
3
 
-DOTHER_STUFF.  
4
 
 
5
 
--- deadwood-2.9.05/src/DwRecurse.c     2010-08-20 00:54:13.000000000 -0700
6
 
+++ deadwood-2.9.06/src/DwRecurse.c     2010-08-29 08:16:16.000000000 -0700
7
 
@@ -50,7 +50,7 @@
8
 
 extern u_long dont_block;
9
 
 #endif /* MINGW */
10
 
 
11
 
-#ifdef XTRA_STUFF
12
 
+#ifdef OTHER_STUFF
13
 
 /* Show a single character on the standard output, escaping the
14
 
  * character if it's not printable ASCII */
15
 
 
16
 
@@ -158,7 +158,7 @@
17
 
         }
18
 
 }
19
 
 
20
 
-#endif /* XTRA_STUFF */
21
 
+#endif /* OTHER_STUFF */
22
 
 
23
 
 /* See if two strings pointing to dname objects are the
24
 
  * same.  p1: pointer to the first string; p2: pointer to the second
25
 
--- deadwood-2.9.05/src/DwStr_functions.h       2010-08-20 00:54:13.000000000 -0700
26
 
+++ deadwood-2.9.06/src/DwStr_functions.h       2010-08-29 08:15:36.000000000 -0700
27
 
@@ -144,12 +144,14 @@
28
 
  */
29
 
 int dw_put_u8(dw_str *obj, uint8_t value, int32_t offset);
30
 
 
31
 
+#ifdef OTHER_STUFF
32
 
 /* Read a single bit from a dw_str object.  The way we choose the bit is
33
 
  * to first choose the byte with the desired bit, then to choose the
34
 
  * bit in that byte.  0 is the least significant (rightmost) bit; 7 is the
35
 
  * most significant bit.
36
 
  * We return -1 on error, 0 if the bit is 0, and 1 if the bit is 1 */
37
 
 int dw_get_bit(dw_str *obj, int32_t byte, int8_t bit);
38
 
+#endif /* OTHER_STUFF */
39
 
 
40
 
 /* Compare two dw_string objects to see if they are the same (different max
41
 
  * lengths are allowed).  -1 on error, 0 if not the same, and 1 if they are
42
 
--- deadwood-2.9.05/src/DwStr.c 2010-08-20 00:54:13.000000000 -0700
43
 
+++ deadwood-2.9.06/src/DwStr.c 2010-08-29 08:27:40.000000000 -0700
44
 
@@ -1,4 +1,4 @@
45
 
-/* Copyright (c) 2007-2009 Sam Trenholme
46
 
+/* Copyright (c) 2007-2010 Sam Trenholme
47
 
  *
48
 
  * TERMS
49
 
  *
50
 
@@ -154,6 +154,7 @@
51
 
         return 0;
52
 
 }
53
 
 
54
 
+#ifdef OTHER_STUFF
55
 
 /* Add an arbitrary null-terminated string of length "len" to a DwStr object */
56
 
 int dw_bin_append(uint8_t *add, int len, dw_str *object) {
57
 
         if(dw_assert_sanity(object) == -1) {
58
 
@@ -170,7 +171,9 @@
59
 
         }
60
 
         return 0;
61
 
 }
62
 
+#endif /* OTHER_STUFF */
63
 
 
64
 
+#ifdef OTHER_STUFF
65
 
 /* Add a null-terminated string to a DwStr; if the DwStr is non-0 length,
66
 
  * first add a comma.  If the null-terminated string has a comma, stop
67
 
  * appending the string.
68
 
@@ -195,6 +198,7 @@
69
 
         }
70
 
         return 0;
71
 
 }
72
 
+#endif /* OTHER_STUFF */
73
 
 
74
 
 #ifdef XTRA_STUFF
75
 
 /* For debug purposes: Output a dw_str object on the standard output. */
76
 
@@ -471,6 +475,7 @@
77
 
         return 0;
78
 
 }
79
 
 
80
 
+#ifdef OTHER_STUFF
81
 
 /* Read a single bit from a dw_str object.  The way we choose the bit is
82
 
  * to first choose the byte with the desired bit, then to choose the
83
 
  * bit in that byte.  0 is the least significant (rightmost) bit; 7 is the
84
 
@@ -497,6 +502,7 @@
85
 
                 return 0;
86
 
         }
87
 
 }
88
 
+#endif /* OTHER_STUFF */
89
 
 
90
 
 /* Compare two dw_string objects to see if they are the same (different max
91
 
  * lengths are allowed).  -1 on error, 0 if not the same, and 1 if they are
92
 
@@ -954,6 +960,7 @@
93
 
         return out;
94
 
 }
95
 
 
96
 
+#ifdef OTHER_STUFF
97
 
 /* Given a dw_str object, where the dw_str is a raw DNS packet, determine
98
 
  * the TTL for the packet.  Note that this only looks at the TTL for the
99
 
  * first RR in a reply.  Things like "www.foo.bar. +86400 CNAME www.baz.bar. ~
100
 
@@ -982,6 +989,7 @@
101
 
         /* BUG: This will not work with packets with only CNAME answers */
102
 
         return dw_get_a_dnsttl(in,offset,31536000,32);
103
 
 }
104
 
+#endif /* OTHER_STUFF */
105
 
 
106
 
 /* Given a packet in the form put in the DNS cache (with things like type,
107
 
  * ancount, nscount, and arcount at the end of the string), tell the user how
108
 
--- deadwood-2.9.05/doc/compile.options 2010-08-20 00:54:13.000000000 -0700
109
 
+++ deadwood-2.9.06/doc/compile.options 2010-08-29 08:31:39.000000000 -0700
110
 
@@ -48,6 +48,9 @@
111
 
 XTRA_STUFF (-DXTRA_STUFF): Add some routines that allow the printing of
112
 
        debug information to standard output.  
113
 
 
114
 
+OTHER_STUFF (-DOTHER_STUFF): Add some routines that aren't actually used 
115
 
+       by Deadwood
116
 
+
117
 
 HASH_DEBUG (-DHASH_DEBUG): Add information used by the 
118
 
        dwood2rc_n_hash_magic_number SQA regression
119