Merged in a bunch of patches that I got as reaction to the 3.99 release.
See the ChangeLog for details
diff --git a/stream.c b/stream.c
index f242b63..0ddb5f1 100644
--- a/stream.c
+++ b/stream.c
@@ -78,7 +78,7 @@
 		if (getting)
 			tprintf("maxlen=%d, ", sbp->maxlen);
 		tprintf("len=%d, buf=", sbp->len);
-		printstr(tcp, (int) sbp->buf, sbp->len);
+		printstr(tcp, (unsigned long) sbp->buf, sbp->len);
 		tprintf("}");
 	}
 }