I like keeping Deadwood's code small and lean; this patch doesn't compile
in some library functions never used by Deadwood unless compiled with
-DOTHER_STUFF.  

--- deadwood-2.9.05/src/DwRecurse.c	2010-08-20 00:54:13.000000000 -0700
+++ deadwood-2.9.06/src/DwRecurse.c	2010-08-29 08:16:16.000000000 -0700
@@ -50,7 +50,7 @@
 extern u_long dont_block;
 #endif /* MINGW */
 
-#ifdef XTRA_STUFF
+#ifdef OTHER_STUFF
 /* Show a single character on the standard output, escaping the
  * character if it's not printable ASCII */
 
@@ -158,7 +158,7 @@
         }
 }
 
-#endif /* XTRA_STUFF */
+#endif /* OTHER_STUFF */
 
 /* See if two strings pointing to dname objects are the
  * same.  p1: pointer to the first string; p2: pointer to the second
--- deadwood-2.9.05/src/DwStr_functions.h	2010-08-20 00:54:13.000000000 -0700
+++ deadwood-2.9.06/src/DwStr_functions.h	2010-08-29 08:15:36.000000000 -0700
@@ -144,12 +144,14 @@
  */
 int dw_put_u8(dw_str *obj, uint8_t value, int32_t offset);
 
+#ifdef OTHER_STUFF
 /* Read a single bit from a dw_str object.  The way we choose the bit is
  * to first choose the byte with the desired bit, then to choose the
  * bit in that byte.  0 is the least significant (rightmost) bit; 7 is the
  * most significant bit.
  * We return -1 on error, 0 if the bit is 0, and 1 if the bit is 1 */
 int dw_get_bit(dw_str *obj, int32_t byte, int8_t bit);
+#endif /* OTHER_STUFF */
 
 /* Compare two dw_string objects to see if they are the same (different max
  * lengths are allowed).  -1 on error, 0 if not the same, and 1 if they are
--- deadwood-2.9.05/src/DwStr.c	2010-08-20 00:54:13.000000000 -0700
+++ deadwood-2.9.06/src/DwStr.c	2010-08-29 08:27:40.000000000 -0700
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2009 Sam Trenholme
+/* Copyright (c) 2007-2010 Sam Trenholme
  *
  * TERMS
  *
@@ -154,6 +154,7 @@
         return 0;
 }
 
+#ifdef OTHER_STUFF
 /* Add an arbitrary null-terminated string of length "len" to a DwStr object */
 int dw_bin_append(uint8_t *add, int len, dw_str *object) {
         if(dw_assert_sanity(object) == -1) {
@@ -170,7 +171,9 @@
         }
         return 0;
 }
+#endif /* OTHER_STUFF */
 
+#ifdef OTHER_STUFF
 /* Add a null-terminated string to a DwStr; if the DwStr is non-0 length,
  * first add a comma.  If the null-terminated string has a comma, stop
  * appending the string.
@@ -195,6 +198,7 @@
         }
         return 0;
 }
+#endif /* OTHER_STUFF */
 
 #ifdef XTRA_STUFF
 /* For debug purposes: Output a dw_str object on the standard output. */
@@ -471,6 +475,7 @@
         return 0;
 }
 
+#ifdef OTHER_STUFF
 /* Read a single bit from a dw_str object.  The way we choose the bit is
  * to first choose the byte with the desired bit, then to choose the
  * bit in that byte.  0 is the least significant (rightmost) bit; 7 is the
@@ -497,6 +502,7 @@
                 return 0;
         }
 }
+#endif /* OTHER_STUFF */
 
 /* Compare two dw_string objects to see if they are the same (different max
  * lengths are allowed).  -1 on error, 0 if not the same, and 1 if they are
@@ -954,6 +960,7 @@
         return out;
 }
 
+#ifdef OTHER_STUFF
 /* Given a dw_str object, where the dw_str is a raw DNS packet, determine
  * the TTL for the packet.  Note that this only looks at the TTL for the
  * first RR in a reply.  Things like "www.foo.bar. +86400 CNAME www.baz.bar. ~
@@ -982,6 +989,7 @@
         /* BUG: This will not work with packets with only CNAME answers */
         return dw_get_a_dnsttl(in,offset,31536000,32);
 }
+#endif /* OTHER_STUFF */
 
 /* Given a packet in the form put in the DNS cache (with things like type,
  * ancount, nscount, and arcount at the end of the string), tell the user how
--- deadwood-2.9.05/doc/compile.options	2010-08-20 00:54:13.000000000 -0700
+++ deadwood-2.9.06/doc/compile.options	2010-08-29 08:31:39.000000000 -0700
@@ -48,6 +48,9 @@
 XTRA_STUFF (-DXTRA_STUFF): Add some routines that allow the printing of
 	debug information to standard output.  
 
+OTHER_STUFF (-DOTHER_STUFF): Add some routines that aren't actually used 
+	by Deadwood
+
 HASH_DEBUG (-DHASH_DEBUG): Add information used by the 
 	dwood2rc_n_hash_magic_number SQA regression
 
