diff -ruN tarsnap-autoconf-1.0.33/COPYING tarsnap-autoconf-1.0.34/COPYING
--- tarsnap-autoconf-1.0.33/COPYING	2012-08-10 00:05:27.000000000 -0700
+++ tarsnap-autoconf-1.0.34/COPYING	2013-07-06 14:38:24.000000000 -0700
@@ -1,7 +1,8 @@
-Unless specified otherwise in individual files, the contents of this
-package is covered by the following copyright, license, and disclaimer:
+Unless specified otherwise in individual files or directories, the
+contents of this package is covered by the following copyright, license,
+and disclaimer:
 
-Copyright 2006, 2007, 2008, 2009, 2010, 2011 Colin Percival
+Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Colin Percival
 All rights reserved.
 
 Redistribution and use in source and binary forms, without modification,
diff -ruN tarsnap-autoconf-1.0.33/Makefile.in tarsnap-autoconf-1.0.34/Makefile.in
--- tarsnap-autoconf-1.0.33/Makefile.in	2012-08-10 00:05:26.000000000 -0700
+++ tarsnap-autoconf-1.0.34/Makefile.in	2013-07-06 14:38:23.000000000 -0700
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -100,10 +100,6 @@
 lib_libtarsnap_a_LIBADD =
 am__dirstamp = $(am__leading_dot)dirstamp
 am_lib_libtarsnap_a_OBJECTS =  \
-	lib/crypto/lib_libtarsnap_a-crypto_aesctr.$(OBJEXT) \
-	lib/crypto/lib_libtarsnap_a-crypto_dh.$(OBJEXT) \
-	lib/crypto/lib_libtarsnap_a-crypto_dh_group14.$(OBJEXT) \
-	lib/crypto/lib_libtarsnap_a-crypto_entropy.$(OBJEXT) \
 	lib/crypto/lib_libtarsnap_a-crypto_file.$(OBJEXT) \
 	lib/crypto/lib_libtarsnap_a-crypto_hash.$(OBJEXT) \
 	lib/crypto/lib_libtarsnap_a-crypto_keys.$(OBJEXT) \
@@ -113,8 +109,6 @@
 	lib/crypto/lib_libtarsnap_a-crypto_rsa.$(OBJEXT) \
 	lib/crypto/lib_libtarsnap_a-crypto_scrypt-@SCRYPTVER@.$(OBJEXT) \
 	lib/crypto/lib_libtarsnap_a-crypto_session.$(OBJEXT) \
-	lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.$(OBJEXT) \
-	lib/crypto/lib_libtarsnap_a-sha256.$(OBJEXT) \
 	lib/datastruct/lib_libtarsnap_a-patricia.$(OBJEXT) \
 	lib/datastruct/lib_libtarsnap_a-rwhashtab.$(OBJEXT) \
 	lib/keyfile/lib_libtarsnap_a-keyfile.$(OBJEXT) \
@@ -130,27 +124,49 @@
 	lib/netproto/lib_libtarsnap_a-netproto_connect.$(OBJEXT) \
 	lib/netproto/lib_libtarsnap_a-netproto_keyexchange.$(OBJEXT) \
 	lib/netproto/lib_libtarsnap_a-netproto_packet.$(OBJEXT) \
-	lib/network/lib_libtarsnap_a-network_buf.$(OBJEXT) \
-	lib/network/lib_libtarsnap_a-network_connect.$(OBJEXT) \
-	lib/network/lib_libtarsnap_a-network_cork.$(OBJEXT) \
-	lib/network/lib_libtarsnap_a-network_select.$(OBJEXT) \
-	lib/network/lib_libtarsnap_a-network_writeq.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_buf.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_connect.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_cork.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_register.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_select.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_sleep.$(OBJEXT) \
+	lib/network/lib_libtarsnap_a-tsnetwork_writeq.$(OBJEXT) \
 	lib/scryptenc/lib_libtarsnap_a-scryptenc.$(OBJEXT) \
 	lib/scryptenc/lib_libtarsnap_a-scryptenc_cpuperf.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-asprintf.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-b64encode.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-dirutil.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-entropy.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-getfstype.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-hexify.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-hexlink.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-humansize.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-memlimit.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-monoclock.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-readpass.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-sigquit.$(OBJEXT) \
 	lib/util/lib_libtarsnap_a-tvmath.$(OBJEXT) \
-	lib/util/lib_libtarsnap_a-warnp.$(OBJEXT)
+	libcperciva/alg/lib_libtarsnap_a-sha256.$(OBJEXT) \
+	libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.$(OBJEXT) \
+	libcperciva/crypto/lib_libtarsnap_a-crypto_dh.$(OBJEXT) \
+	libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.$(OBJEXT) \
+	libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.$(OBJEXT) \
+	libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.$(OBJEXT) \
+	libcperciva/datastruct/lib_libtarsnap_a-elasticarray.$(OBJEXT) \
+	libcperciva/datastruct/lib_libtarsnap_a-ptrheap.$(OBJEXT) \
+	libcperciva/datastruct/lib_libtarsnap_a-timerqueue.$(OBJEXT) \
+	libcperciva/events/lib_libtarsnap_a-events.$(OBJEXT) \
+	libcperciva/events/lib_libtarsnap_a-events_immediate.$(OBJEXT) \
+	libcperciva/events/lib_libtarsnap_a-events_network.$(OBJEXT) \
+	libcperciva/events/lib_libtarsnap_a-events_network_selectstats.$(OBJEXT) \
+	libcperciva/events/lib_libtarsnap_a-events_timer.$(OBJEXT) \
+	libcperciva/network/lib_libtarsnap_a-network_accept.$(OBJEXT) \
+	libcperciva/network/lib_libtarsnap_a-network_buf.$(OBJEXT) \
+	libcperciva/network/lib_libtarsnap_a-network_connect.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-asprintf.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-b64encode.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-entropy.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-hexify.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-humansize.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-monoclock.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-readpass.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-sock.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-sock_util.$(OBJEXT) \
+	libcperciva/util/lib_libtarsnap_a-warnp.$(OBJEXT)
 lib_libtarsnap_a_OBJECTS = $(am_lib_libtarsnap_a_OBJECTS)
 libarchive_libarchive_a_AR = $(AR) $(ARFLAGS)
 libarchive_libarchive_a_LIBADD =
@@ -622,57 +638,73 @@
 #
 #
 lib_libtarsnap_a_SOURCES = \
-		lib/crypto/crypto_aesctr.c		\
-		lib/crypto/crypto_dh.c			\
-		lib/crypto/crypto_dh_group14.c		\
-		lib/crypto/crypto_entropy.c		\
-		lib/crypto/crypto_file.c		\
-		lib/crypto/crypto_hash.c		\
-		lib/crypto/crypto_keys.c		\
-		lib/crypto/crypto_keys_server.c		\
-		lib/crypto/crypto_keys_subr.c		\
-		lib/crypto/crypto_passwd_to_dh.c	\
-		lib/crypto/crypto_rsa.c			\
-		lib/crypto/crypto_scrypt-@SCRYPTVER@.c	\
-		lib/crypto/crypto_session.c		\
-		lib/crypto/crypto_verify_bytes.c	\
-		lib/crypto/sha256.c			\
-		lib/datastruct/patricia.c		\
-		lib/datastruct/rwhashtab.c		\
-		lib/keyfile/keyfile.c			\
-		lib/netpacket/netpacket_delete.c	\
-		lib/netpacket/netpacket_directory.c	\
-		lib/netpacket/netpacket_hmac.c		\
-		lib/netpacket/netpacket_op.c		\
-		lib/netpacket/netpacket_read.c		\
-		lib/netpacket/netpacket_register.c	\
-		lib/netpacket/netpacket_transaction.c	\
-		lib/netpacket/netpacket_write.c		\
-		lib/netproto/netproto.c			\
-		lib/netproto/netproto_connect.c		\
-		lib/netproto/netproto_keyexchange.c	\
-		lib/netproto/netproto_packet.c		\
-		lib/network/network_buf.c		\
-		lib/network/network_connect.c		\
-		lib/network/network_cork.c		\
-		lib/network/network_select.c		\
-		lib/network/network_writeq.c		\
-		lib/scryptenc/scryptenc.c		\
-		lib/scryptenc/scryptenc_cpuperf.c	\
-		lib/util/asprintf.c			\
-		lib/util/b64encode.c			\
-		lib/util/dirutil.c			\
-		lib/util/entropy.c			\
-		lib/util/getfstype.c			\
-		lib/util/hexify.c			\
-		lib/util/hexlink.c			\
-		lib/util/humansize.c			\
-		lib/util/memlimit.c			\
-		lib/util/monoclock.c			\
-		lib/util/readpass.c			\
-		lib/util/sigquit.c			\
-		lib/util/tvmath.c			\
-		lib/util/warnp.c
+		lib/crypto/crypto_file.c			\
+		lib/crypto/crypto_hash.c			\
+		lib/crypto/crypto_keys.c			\
+		lib/crypto/crypto_keys_server.c			\
+		lib/crypto/crypto_keys_subr.c			\
+		lib/crypto/crypto_passwd_to_dh.c		\
+		lib/crypto/crypto_rsa.c				\
+		lib/crypto/crypto_scrypt-@SCRYPTVER@.c		\
+		lib/crypto/crypto_session.c			\
+		lib/datastruct/patricia.c			\
+		lib/datastruct/rwhashtab.c			\
+		lib/keyfile/keyfile.c				\
+		lib/netpacket/netpacket_delete.c		\
+		lib/netpacket/netpacket_directory.c		\
+		lib/netpacket/netpacket_hmac.c			\
+		lib/netpacket/netpacket_op.c			\
+		lib/netpacket/netpacket_read.c			\
+		lib/netpacket/netpacket_register.c		\
+		lib/netpacket/netpacket_transaction.c		\
+		lib/netpacket/netpacket_write.c			\
+		lib/netproto/netproto.c				\
+		lib/netproto/netproto_connect.c			\
+		lib/netproto/netproto_keyexchange.c		\
+		lib/netproto/netproto_packet.c			\
+		lib/network/tsnetwork_buf.c			\
+		lib/network/tsnetwork_bwlimit.c			\
+		lib/network/tsnetwork_connect.c			\
+		lib/network/tsnetwork_cork.c			\
+		lib/network/tsnetwork_register.c		\
+		lib/network/tsnetwork_select.c			\
+		lib/network/tsnetwork_sleep.c			\
+		lib/network/tsnetwork_writeq.c			\
+		lib/scryptenc/scryptenc.c			\
+		lib/scryptenc/scryptenc_cpuperf.c		\
+		lib/util/dirutil.c				\
+		lib/util/getfstype.c				\
+		lib/util/hexlink.c				\
+		lib/util/memlimit.c				\
+		lib/util/sigquit.c				\
+		lib/util/tvmath.c				\
+		libcperciva/alg/sha256.c			\
+		libcperciva/crypto/crypto_aesctr.c		\
+		libcperciva/crypto/crypto_dh.c			\
+		libcperciva/crypto/crypto_dh_group14.c		\
+		libcperciva/crypto/crypto_entropy.c		\
+		libcperciva/crypto/crypto_verify_bytes.c	\
+		libcperciva/datastruct/elasticarray.c		\
+		libcperciva/datastruct/ptrheap.c		\
+		libcperciva/datastruct/timerqueue.c		\
+		libcperciva/events/events.c			\
+		libcperciva/events/events_immediate.c		\
+		libcperciva/events/events_network.c		\
+		libcperciva/events/events_network_selectstats.c	\
+		libcperciva/events/events_timer.c		\
+		libcperciva/network/network_accept.c		\
+		libcperciva/network/network_buf.c		\
+		libcperciva/network/network_connect.c		\
+		libcperciva/util/asprintf.c			\
+		libcperciva/util/b64encode.c			\
+		libcperciva/util/entropy.c			\
+		libcperciva/util/hexify.c			\
+		libcperciva/util/humansize.c			\
+		libcperciva/util/monoclock.c			\
+		libcperciva/util/readpass.c			\
+		libcperciva/util/sock.c				\
+		libcperciva/util/sock_util.c			\
+		libcperciva/util/warnp.c
 
 lib_libtarsnap_a_CFLAGS = \
 		-I${top_srcdir}/tar			\
@@ -684,7 +716,13 @@
 		-I$(top_srcdir)/lib/netproto		\
 		-I$(top_srcdir)/lib/network		\
 		-I$(top_srcdir)/lib/scryptenc		\
-		-I$(top_srcdir)/lib/util
+		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/alg		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/datastruct	\
+		-I$(top_srcdir)/libcperciva/events	\
+		-I$(top_srcdir)/libcperciva/network	\
+		-I$(top_srcdir)/libcperciva/util
 
 
 #
@@ -738,6 +776,8 @@
 		-I$(top_srcdir)/lib/netproto		\
 		-I$(top_srcdir)/lib/network		\
 		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/util	\
 		-DETC_TARSNAP_CONF=\"${sysconfdir}/tarsnap.conf\"	\
 		-DUSERAGENT=\"tarsnap-${VERSION}\"
 
@@ -759,6 +799,8 @@
 		-I$(top_srcdir)/lib/netproto		\
 		-I$(top_srcdir)/lib/network		\
 		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/util	\
 		-DUSERAGENT=\"tarsnap-keygen-${VERSION}\"
 
 tarsnap_keygen_dist_man_MANS = keygen/tarsnap-keygen.1
@@ -779,6 +821,8 @@
 		-I$(top_srcdir)/lib/netproto		\
 		-I$(top_srcdir)/lib/network		\
 		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/util	\
 		-DUSERAGENT=\"tarsnap-keyregen-${VERSION}\"
 
 tarsnap_keyregen_dist_man_MANS = keyregen/tarsnap-keyregen.1
@@ -817,6 +861,8 @@
 		-I$(top_srcdir)/lib/netproto		\
 		-I$(top_srcdir)/lib/network		\
 		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/util	\
 		-DUSERAGENT=\"tarsnap-recrypt-${VERSION}\"
 
 tarsnap_recrypt_dist_man_MANS = recrypt/tarsnap-recrypt.1
@@ -834,7 +880,9 @@
 		-I${top_srcdir}/lib/crypto		\
 		-I$(top_srcdir)/lib/datastruct		\
 		-I${top_srcdir}/lib/keyfile		\
-		-I$(top_srcdir)/lib/util
+		-I$(top_srcdir)/lib/util		\
+		-I$(top_srcdir)/libcperciva/crypto	\
+		-I$(top_srcdir)/libcperciva/util
 
 tarsnap_keymgmt_dist_man_MANS = keymgmt/tarsnap-keymgmt.1
 
@@ -903,18 +951,6 @@
 lib/crypto/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) lib/crypto/$(DEPDIR)
 	@: > lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-crypto_aesctr.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-crypto_dh.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-crypto_dh_group14.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-crypto_entropy.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
 lib/crypto/lib_libtarsnap_a-crypto_file.$(OBJEXT):  \
 	lib/crypto/$(am__dirstamp) \
 	lib/crypto/$(DEPDIR)/$(am__dirstamp)
@@ -942,12 +978,6 @@
 lib/crypto/lib_libtarsnap_a-crypto_session.$(OBJEXT):  \
 	lib/crypto/$(am__dirstamp) \
 	lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
-lib/crypto/lib_libtarsnap_a-sha256.$(OBJEXT):  \
-	lib/crypto/$(am__dirstamp) \
-	lib/crypto/$(DEPDIR)/$(am__dirstamp)
 lib/datastruct/$(am__dirstamp):
 	@$(MKDIR_P) lib/datastruct
 	@: > lib/datastruct/$(am__dirstamp)
@@ -1023,19 +1053,28 @@
 lib/network/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) lib/network/$(DEPDIR)
 	@: > lib/network/$(DEPDIR)/$(am__dirstamp)
-lib/network/lib_libtarsnap_a-network_buf.$(OBJEXT):  \
+lib/network/lib_libtarsnap_a-tsnetwork_buf.$(OBJEXT):  \
+	lib/network/$(am__dirstamp) \
+	lib/network/$(DEPDIR)/$(am__dirstamp)
+lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.$(OBJEXT):  \
+	lib/network/$(am__dirstamp) \
+	lib/network/$(DEPDIR)/$(am__dirstamp)
+lib/network/lib_libtarsnap_a-tsnetwork_connect.$(OBJEXT):  \
 	lib/network/$(am__dirstamp) \
 	lib/network/$(DEPDIR)/$(am__dirstamp)
-lib/network/lib_libtarsnap_a-network_connect.$(OBJEXT):  \
+lib/network/lib_libtarsnap_a-tsnetwork_cork.$(OBJEXT):  \
 	lib/network/$(am__dirstamp) \
 	lib/network/$(DEPDIR)/$(am__dirstamp)
-lib/network/lib_libtarsnap_a-network_cork.$(OBJEXT):  \
+lib/network/lib_libtarsnap_a-tsnetwork_register.$(OBJEXT):  \
 	lib/network/$(am__dirstamp) \
 	lib/network/$(DEPDIR)/$(am__dirstamp)
-lib/network/lib_libtarsnap_a-network_select.$(OBJEXT):  \
+lib/network/lib_libtarsnap_a-tsnetwork_select.$(OBJEXT):  \
 	lib/network/$(am__dirstamp) \
 	lib/network/$(DEPDIR)/$(am__dirstamp)
-lib/network/lib_libtarsnap_a-network_writeq.$(OBJEXT):  \
+lib/network/lib_libtarsnap_a-tsnetwork_sleep.$(OBJEXT):  \
+	lib/network/$(am__dirstamp) \
+	lib/network/$(DEPDIR)/$(am__dirstamp)
+lib/network/lib_libtarsnap_a-tsnetwork_writeq.$(OBJEXT):  \
 	lib/network/$(am__dirstamp) \
 	lib/network/$(DEPDIR)/$(am__dirstamp)
 lib/scryptenc/$(am__dirstamp):
@@ -1056,34 +1095,135 @@
 lib/util/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) lib/util/$(DEPDIR)
 	@: > lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-asprintf.$(OBJEXT):  \
-	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-b64encode.$(OBJEXT):  \
-	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-dirutil.$(OBJEXT): lib/util/$(am__dirstamp) \
 	lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-entropy.$(OBJEXT): lib/util/$(am__dirstamp) \
-	lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-getfstype.$(OBJEXT):  \
 	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-hexify.$(OBJEXT): lib/util/$(am__dirstamp) \
-	lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-hexlink.$(OBJEXT): lib/util/$(am__dirstamp) \
 	lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-humansize.$(OBJEXT):  \
-	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-memlimit.$(OBJEXT):  \
 	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-monoclock.$(OBJEXT):  \
-	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-readpass.$(OBJEXT):  \
-	lib/util/$(am__dirstamp) lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-sigquit.$(OBJEXT): lib/util/$(am__dirstamp) \
 	lib/util/$(DEPDIR)/$(am__dirstamp)
 lib/util/lib_libtarsnap_a-tvmath.$(OBJEXT): lib/util/$(am__dirstamp) \
 	lib/util/$(DEPDIR)/$(am__dirstamp)
-lib/util/lib_libtarsnap_a-warnp.$(OBJEXT): lib/util/$(am__dirstamp) \
-	lib/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/alg/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/alg
+	@: > libcperciva/alg/$(am__dirstamp)
+libcperciva/alg/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/alg/$(DEPDIR)
+	@: > libcperciva/alg/$(DEPDIR)/$(am__dirstamp)
+libcperciva/alg/lib_libtarsnap_a-sha256.$(OBJEXT):  \
+	libcperciva/alg/$(am__dirstamp) \
+	libcperciva/alg/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/crypto
+	@: > libcperciva/crypto/$(am__dirstamp)
+libcperciva/crypto/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/crypto/$(DEPDIR)
+	@: > libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.$(OBJEXT):  \
+	libcperciva/crypto/$(am__dirstamp) \
+	libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh.$(OBJEXT):  \
+	libcperciva/crypto/$(am__dirstamp) \
+	libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.$(OBJEXT):  \
+	libcperciva/crypto/$(am__dirstamp) \
+	libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.$(OBJEXT):  \
+	libcperciva/crypto/$(am__dirstamp) \
+	libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.$(OBJEXT):  \
+	libcperciva/crypto/$(am__dirstamp) \
+	libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+libcperciva/datastruct/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/datastruct
+	@: > libcperciva/datastruct/$(am__dirstamp)
+libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/datastruct/$(DEPDIR)
+	@: > libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp)
+libcperciva/datastruct/lib_libtarsnap_a-elasticarray.$(OBJEXT):  \
+	libcperciva/datastruct/$(am__dirstamp) \
+	libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp)
+libcperciva/datastruct/lib_libtarsnap_a-ptrheap.$(OBJEXT):  \
+	libcperciva/datastruct/$(am__dirstamp) \
+	libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp)
+libcperciva/datastruct/lib_libtarsnap_a-timerqueue.$(OBJEXT):  \
+	libcperciva/datastruct/$(am__dirstamp) \
+	libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/events
+	@: > libcperciva/events/$(am__dirstamp)
+libcperciva/events/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/events/$(DEPDIR)
+	@: > libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/lib_libtarsnap_a-events.$(OBJEXT):  \
+	libcperciva/events/$(am__dirstamp) \
+	libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/lib_libtarsnap_a-events_immediate.$(OBJEXT):  \
+	libcperciva/events/$(am__dirstamp) \
+	libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/lib_libtarsnap_a-events_network.$(OBJEXT):  \
+	libcperciva/events/$(am__dirstamp) \
+	libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/lib_libtarsnap_a-events_network_selectstats.$(OBJEXT):  \
+	libcperciva/events/$(am__dirstamp) \
+	libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/events/lib_libtarsnap_a-events_timer.$(OBJEXT):  \
+	libcperciva/events/$(am__dirstamp) \
+	libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+libcperciva/network/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/network
+	@: > libcperciva/network/$(am__dirstamp)
+libcperciva/network/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/network/$(DEPDIR)
+	@: > libcperciva/network/$(DEPDIR)/$(am__dirstamp)
+libcperciva/network/lib_libtarsnap_a-network_accept.$(OBJEXT):  \
+	libcperciva/network/$(am__dirstamp) \
+	libcperciva/network/$(DEPDIR)/$(am__dirstamp)
+libcperciva/network/lib_libtarsnap_a-network_buf.$(OBJEXT):  \
+	libcperciva/network/$(am__dirstamp) \
+	libcperciva/network/$(DEPDIR)/$(am__dirstamp)
+libcperciva/network/lib_libtarsnap_a-network_connect.$(OBJEXT):  \
+	libcperciva/network/$(am__dirstamp) \
+	libcperciva/network/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/util
+	@: > libcperciva/util/$(am__dirstamp)
+libcperciva/util/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) libcperciva/util/$(DEPDIR)
+	@: > libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-asprintf.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-b64encode.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-entropy.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-hexify.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-humansize.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-monoclock.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-readpass.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-sock.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-sock_util.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+libcperciva/util/lib_libtarsnap_a-warnp.$(OBJEXT):  \
+	libcperciva/util/$(am__dirstamp) \
+	libcperciva/util/$(DEPDIR)/$(am__dirstamp)
 lib/$(am__dirstamp):
 	@$(MKDIR_P) lib
 	@: > lib/$(am__dirstamp)
@@ -1525,6 +1665,12 @@
 	-rm -f lib/scryptenc/*.$(OBJEXT)
 	-rm -f lib/util/*.$(OBJEXT)
 	-rm -f libarchive/*.$(OBJEXT)
+	-rm -f libcperciva/alg/*.$(OBJEXT)
+	-rm -f libcperciva/crypto/*.$(OBJEXT)
+	-rm -f libcperciva/datastruct/*.$(OBJEXT)
+	-rm -f libcperciva/events/*.$(OBJEXT)
+	-rm -f libcperciva/network/*.$(OBJEXT)
+	-rm -f libcperciva/util/*.$(OBJEXT)
 	-rm -f recrypt/*.$(OBJEXT)
 	-rm -f tar/*.$(OBJEXT)
 	-rm -f tar/ccache/*.$(OBJEXT)
@@ -1539,10 +1685,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@keygen/$(DEPDIR)/tarsnap_keygen-keygen.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@keymgmt/$(DEPDIR)/tarsnap_keymgmt-keymgmt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@keyregen/$(DEPDIR)/tarsnap_keyregen-keyregen.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_file.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_hash.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_keys.Po@am__quote@
@@ -1552,8 +1694,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_rsa.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_scrypt-@SCRYPTVER@.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_session.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/datastruct/$(DEPDIR)/lib_libtarsnap_a-patricia.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/datastruct/$(DEPDIR)/lib_libtarsnap_a-rwhashtab.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/keyfile/$(DEPDIR)/lib_libtarsnap_a-keyfile.Po@am__quote@
@@ -1569,27 +1709,22 @@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/netproto/$(DEPDIR)/lib_libtarsnap_a-netproto_connect.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/netproto/$(DEPDIR)/lib_libtarsnap_a-netproto_keyexchange.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/netproto/$(DEPDIR)/lib_libtarsnap_a-netproto_packet.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/scryptenc/$(DEPDIR)/lib_libtarsnap_a-scryptenc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/scryptenc/$(DEPDIR)/lib_libtarsnap_a-scryptenc_cpuperf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-dirutil.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-getfstype.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-hexlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-memlimit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-sigquit.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-tvmath.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-archive_check_magic.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-archive_entry.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-archive_entry_copy_stat.Po@am__quote@
@@ -1638,6 +1773,33 @@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-archive_write_set_format_ustar.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-filter_fork.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/libarchive_libarchive_a-filter_fork_windows.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@recrypt/$(DEPDIR)/tarsnap_recrypt-recrypt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/tarsnap-bsdtar.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@tar/$(DEPDIR)/tarsnap-bsdtar_cygwin.Po@am__quote@
@@ -1710,62 +1872,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
-lib/crypto/lib_libtarsnap_a-crypto_aesctr.o: lib/crypto/crypto_aesctr.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_aesctr.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_aesctr.o `test -f 'lib/crypto/crypto_aesctr.c' || echo '$(srcdir)/'`lib/crypto/crypto_aesctr.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_aesctr.c' object='lib/crypto/lib_libtarsnap_a-crypto_aesctr.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_aesctr.o `test -f 'lib/crypto/crypto_aesctr.c' || echo '$(srcdir)/'`lib/crypto/crypto_aesctr.c
-
-lib/crypto/lib_libtarsnap_a-crypto_aesctr.obj: lib/crypto/crypto_aesctr.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_aesctr.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_aesctr.obj `if test -f 'lib/crypto/crypto_aesctr.c'; then $(CYGPATH_W) 'lib/crypto/crypto_aesctr.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_aesctr.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_aesctr.c' object='lib/crypto/lib_libtarsnap_a-crypto_aesctr.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_aesctr.obj `if test -f 'lib/crypto/crypto_aesctr.c'; then $(CYGPATH_W) 'lib/crypto/crypto_aesctr.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_aesctr.c'; fi`
-
-lib/crypto/lib_libtarsnap_a-crypto_dh.o: lib/crypto/crypto_dh.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_dh.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_dh.o `test -f 'lib/crypto/crypto_dh.c' || echo '$(srcdir)/'`lib/crypto/crypto_dh.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_dh.c' object='lib/crypto/lib_libtarsnap_a-crypto_dh.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_dh.o `test -f 'lib/crypto/crypto_dh.c' || echo '$(srcdir)/'`lib/crypto/crypto_dh.c
-
-lib/crypto/lib_libtarsnap_a-crypto_dh.obj: lib/crypto/crypto_dh.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_dh.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_dh.obj `if test -f 'lib/crypto/crypto_dh.c'; then $(CYGPATH_W) 'lib/crypto/crypto_dh.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_dh.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_dh.c' object='lib/crypto/lib_libtarsnap_a-crypto_dh.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_dh.obj `if test -f 'lib/crypto/crypto_dh.c'; then $(CYGPATH_W) 'lib/crypto/crypto_dh.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_dh.c'; fi`
-
-lib/crypto/lib_libtarsnap_a-crypto_dh_group14.o: lib/crypto/crypto_dh_group14.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_dh_group14.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_dh_group14.o `test -f 'lib/crypto/crypto_dh_group14.c' || echo '$(srcdir)/'`lib/crypto/crypto_dh_group14.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_dh_group14.c' object='lib/crypto/lib_libtarsnap_a-crypto_dh_group14.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_dh_group14.o `test -f 'lib/crypto/crypto_dh_group14.c' || echo '$(srcdir)/'`lib/crypto/crypto_dh_group14.c
-
-lib/crypto/lib_libtarsnap_a-crypto_dh_group14.obj: lib/crypto/crypto_dh_group14.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_dh_group14.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_dh_group14.obj `if test -f 'lib/crypto/crypto_dh_group14.c'; then $(CYGPATH_W) 'lib/crypto/crypto_dh_group14.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_dh_group14.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_dh_group14.c' object='lib/crypto/lib_libtarsnap_a-crypto_dh_group14.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_dh_group14.obj `if test -f 'lib/crypto/crypto_dh_group14.c'; then $(CYGPATH_W) 'lib/crypto/crypto_dh_group14.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_dh_group14.c'; fi`
-
-lib/crypto/lib_libtarsnap_a-crypto_entropy.o: lib/crypto/crypto_entropy.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_entropy.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_entropy.o `test -f 'lib/crypto/crypto_entropy.c' || echo '$(srcdir)/'`lib/crypto/crypto_entropy.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_entropy.c' object='lib/crypto/lib_libtarsnap_a-crypto_entropy.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_entropy.o `test -f 'lib/crypto/crypto_entropy.c' || echo '$(srcdir)/'`lib/crypto/crypto_entropy.c
-
-lib/crypto/lib_libtarsnap_a-crypto_entropy.obj: lib/crypto/crypto_entropy.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_entropy.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_entropy.obj `if test -f 'lib/crypto/crypto_entropy.c'; then $(CYGPATH_W) 'lib/crypto/crypto_entropy.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_entropy.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_entropy.c' object='lib/crypto/lib_libtarsnap_a-crypto_entropy.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_entropy.obj `if test -f 'lib/crypto/crypto_entropy.c'; then $(CYGPATH_W) 'lib/crypto/crypto_entropy.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_entropy.c'; fi`
-
 lib/crypto/lib_libtarsnap_a-crypto_file.o: lib/crypto/crypto_file.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_file.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_file.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_file.o `test -f 'lib/crypto/crypto_file.c' || echo '$(srcdir)/'`lib/crypto/crypto_file.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_file.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_file.Po
@@ -1892,34 +1998,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_session.obj `if test -f 'lib/crypto/crypto_session.c'; then $(CYGPATH_W) 'lib/crypto/crypto_session.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_session.c'; fi`
 
-lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.o: lib/crypto/crypto_verify_bytes.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.o `test -f 'lib/crypto/crypto_verify_bytes.c' || echo '$(srcdir)/'`lib/crypto/crypto_verify_bytes.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_verify_bytes.c' object='lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.o `test -f 'lib/crypto/crypto_verify_bytes.c' || echo '$(srcdir)/'`lib/crypto/crypto_verify_bytes.c
-
-lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj: lib/crypto/crypto_verify_bytes.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo -c -o lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj `if test -f 'lib/crypto/crypto_verify_bytes.c'; then $(CYGPATH_W) 'lib/crypto/crypto_verify_bytes.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_verify_bytes.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/crypto_verify_bytes.c' object='lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj `if test -f 'lib/crypto/crypto_verify_bytes.c'; then $(CYGPATH_W) 'lib/crypto/crypto_verify_bytes.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/crypto_verify_bytes.c'; fi`
-
-lib/crypto/lib_libtarsnap_a-sha256.o: lib/crypto/sha256.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-sha256.o -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo -c -o lib/crypto/lib_libtarsnap_a-sha256.o `test -f 'lib/crypto/sha256.c' || echo '$(srcdir)/'`lib/crypto/sha256.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/sha256.c' object='lib/crypto/lib_libtarsnap_a-sha256.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-sha256.o `test -f 'lib/crypto/sha256.c' || echo '$(srcdir)/'`lib/crypto/sha256.c
-
-lib/crypto/lib_libtarsnap_a-sha256.obj: lib/crypto/sha256.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/crypto/lib_libtarsnap_a-sha256.obj -MD -MP -MF lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo -c -o lib/crypto/lib_libtarsnap_a-sha256.obj `if test -f 'lib/crypto/sha256.c'; then $(CYGPATH_W) 'lib/crypto/sha256.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/sha256.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo lib/crypto/$(DEPDIR)/lib_libtarsnap_a-sha256.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/crypto/sha256.c' object='lib/crypto/lib_libtarsnap_a-sha256.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/crypto/lib_libtarsnap_a-sha256.obj `if test -f 'lib/crypto/sha256.c'; then $(CYGPATH_W) 'lib/crypto/sha256.c'; else $(CYGPATH_W) '$(srcdir)/lib/crypto/sha256.c'; fi`
-
 lib/datastruct/lib_libtarsnap_a-patricia.o: lib/datastruct/patricia.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/datastruct/lib_libtarsnap_a-patricia.o -MD -MP -MF lib/datastruct/$(DEPDIR)/lib_libtarsnap_a-patricia.Tpo -c -o lib/datastruct/lib_libtarsnap_a-patricia.o `test -f 'lib/datastruct/patricia.c' || echo '$(srcdir)/'`lib/datastruct/patricia.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/datastruct/$(DEPDIR)/lib_libtarsnap_a-patricia.Tpo lib/datastruct/$(DEPDIR)/lib_libtarsnap_a-patricia.Po
@@ -2130,75 +2208,117 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/netproto/lib_libtarsnap_a-netproto_packet.obj `if test -f 'lib/netproto/netproto_packet.c'; then $(CYGPATH_W) 'lib/netproto/netproto_packet.c'; else $(CYGPATH_W) '$(srcdir)/lib/netproto/netproto_packet.c'; fi`
 
-lib/network/lib_libtarsnap_a-network_buf.o: lib/network/network_buf.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_buf.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo -c -o lib/network/lib_libtarsnap_a-network_buf.o `test -f 'lib/network/network_buf.c' || echo '$(srcdir)/'`lib/network/network_buf.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_buf.c' object='lib/network/lib_libtarsnap_a-network_buf.o' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_buf.o: lib/network/tsnetwork_buf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_buf.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_buf.o `test -f 'lib/network/tsnetwork_buf.c' || echo '$(srcdir)/'`lib/network/tsnetwork_buf.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_buf.c' object='lib/network/lib_libtarsnap_a-tsnetwork_buf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_buf.o `test -f 'lib/network/tsnetwork_buf.c' || echo '$(srcdir)/'`lib/network/tsnetwork_buf.c
+
+lib/network/lib_libtarsnap_a-tsnetwork_buf.obj: lib/network/tsnetwork_buf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_buf.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_buf.obj `if test -f 'lib/network/tsnetwork_buf.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_buf.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_buf.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_buf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_buf.c' object='lib/network/lib_libtarsnap_a-tsnetwork_buf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_buf.obj `if test -f 'lib/network/tsnetwork_buf.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_buf.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_buf.c'; fi`
+
+lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.o: lib/network/tsnetwork_bwlimit.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.o `test -f 'lib/network/tsnetwork_bwlimit.c' || echo '$(srcdir)/'`lib/network/tsnetwork_bwlimit.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_bwlimit.c' object='lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.o `test -f 'lib/network/tsnetwork_bwlimit.c' || echo '$(srcdir)/'`lib/network/tsnetwork_bwlimit.c
+
+lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.obj: lib/network/tsnetwork_bwlimit.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.obj `if test -f 'lib/network/tsnetwork_bwlimit.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_bwlimit.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_bwlimit.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_bwlimit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_bwlimit.c' object='lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_bwlimit.obj `if test -f 'lib/network/tsnetwork_bwlimit.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_bwlimit.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_bwlimit.c'; fi`
+
+lib/network/lib_libtarsnap_a-tsnetwork_connect.o: lib/network/tsnetwork_connect.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_connect.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_connect.o `test -f 'lib/network/tsnetwork_connect.c' || echo '$(srcdir)/'`lib/network/tsnetwork_connect.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_connect.c' object='lib/network/lib_libtarsnap_a-tsnetwork_connect.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_buf.o `test -f 'lib/network/network_buf.c' || echo '$(srcdir)/'`lib/network/network_buf.c
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_connect.o `test -f 'lib/network/tsnetwork_connect.c' || echo '$(srcdir)/'`lib/network/tsnetwork_connect.c
 
-lib/network/lib_libtarsnap_a-network_buf.obj: lib/network/network_buf.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_buf.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo -c -o lib/network/lib_libtarsnap_a-network_buf.obj `if test -f 'lib/network/network_buf.c'; then $(CYGPATH_W) 'lib/network/network_buf.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_buf.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_buf.c' object='lib/network/lib_libtarsnap_a-network_buf.obj' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_connect.obj: lib/network/tsnetwork_connect.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_connect.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_connect.obj `if test -f 'lib/network/tsnetwork_connect.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_connect.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_connect.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_connect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_connect.c' object='lib/network/lib_libtarsnap_a-tsnetwork_connect.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_buf.obj `if test -f 'lib/network/network_buf.c'; then $(CYGPATH_W) 'lib/network/network_buf.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_buf.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_connect.obj `if test -f 'lib/network/tsnetwork_connect.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_connect.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_connect.c'; fi`
 
-lib/network/lib_libtarsnap_a-network_connect.o: lib/network/network_connect.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_connect.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo -c -o lib/network/lib_libtarsnap_a-network_connect.o `test -f 'lib/network/network_connect.c' || echo '$(srcdir)/'`lib/network/network_connect.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_connect.c' object='lib/network/lib_libtarsnap_a-network_connect.o' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_cork.o: lib/network/tsnetwork_cork.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_cork.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_cork.o `test -f 'lib/network/tsnetwork_cork.c' || echo '$(srcdir)/'`lib/network/tsnetwork_cork.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_cork.c' object='lib/network/lib_libtarsnap_a-tsnetwork_cork.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_connect.o `test -f 'lib/network/network_connect.c' || echo '$(srcdir)/'`lib/network/network_connect.c
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_cork.o `test -f 'lib/network/tsnetwork_cork.c' || echo '$(srcdir)/'`lib/network/tsnetwork_cork.c
 
-lib/network/lib_libtarsnap_a-network_connect.obj: lib/network/network_connect.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_connect.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo -c -o lib/network/lib_libtarsnap_a-network_connect.obj `if test -f 'lib/network/network_connect.c'; then $(CYGPATH_W) 'lib/network/network_connect.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_connect.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_connect.c' object='lib/network/lib_libtarsnap_a-network_connect.obj' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_cork.obj: lib/network/tsnetwork_cork.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_cork.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_cork.obj `if test -f 'lib/network/tsnetwork_cork.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_cork.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_cork.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_cork.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_cork.c' object='lib/network/lib_libtarsnap_a-tsnetwork_cork.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_connect.obj `if test -f 'lib/network/network_connect.c'; then $(CYGPATH_W) 'lib/network/network_connect.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_connect.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_cork.obj `if test -f 'lib/network/tsnetwork_cork.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_cork.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_cork.c'; fi`
 
-lib/network/lib_libtarsnap_a-network_cork.o: lib/network/network_cork.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_cork.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Tpo -c -o lib/network/lib_libtarsnap_a-network_cork.o `test -f 'lib/network/network_cork.c' || echo '$(srcdir)/'`lib/network/network_cork.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_cork.c' object='lib/network/lib_libtarsnap_a-network_cork.o' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_register.o: lib/network/tsnetwork_register.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_register.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_register.o `test -f 'lib/network/tsnetwork_register.c' || echo '$(srcdir)/'`lib/network/tsnetwork_register.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_register.c' object='lib/network/lib_libtarsnap_a-tsnetwork_register.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_cork.o `test -f 'lib/network/network_cork.c' || echo '$(srcdir)/'`lib/network/network_cork.c
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_register.o `test -f 'lib/network/tsnetwork_register.c' || echo '$(srcdir)/'`lib/network/tsnetwork_register.c
 
-lib/network/lib_libtarsnap_a-network_cork.obj: lib/network/network_cork.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_cork.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Tpo -c -o lib/network/lib_libtarsnap_a-network_cork.obj `if test -f 'lib/network/network_cork.c'; then $(CYGPATH_W) 'lib/network/network_cork.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_cork.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_cork.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_cork.c' object='lib/network/lib_libtarsnap_a-network_cork.obj' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_register.obj: lib/network/tsnetwork_register.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_register.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_register.obj `if test -f 'lib/network/tsnetwork_register.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_register.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_register.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_register.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_register.c' object='lib/network/lib_libtarsnap_a-tsnetwork_register.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_cork.obj `if test -f 'lib/network/network_cork.c'; then $(CYGPATH_W) 'lib/network/network_cork.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_cork.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_register.obj `if test -f 'lib/network/tsnetwork_register.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_register.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_register.c'; fi`
 
-lib/network/lib_libtarsnap_a-network_select.o: lib/network/network_select.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_select.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Tpo -c -o lib/network/lib_libtarsnap_a-network_select.o `test -f 'lib/network/network_select.c' || echo '$(srcdir)/'`lib/network/network_select.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_select.c' object='lib/network/lib_libtarsnap_a-network_select.o' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_select.o: lib/network/tsnetwork_select.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_select.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_select.o `test -f 'lib/network/tsnetwork_select.c' || echo '$(srcdir)/'`lib/network/tsnetwork_select.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_select.c' object='lib/network/lib_libtarsnap_a-tsnetwork_select.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_select.o `test -f 'lib/network/network_select.c' || echo '$(srcdir)/'`lib/network/network_select.c
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_select.o `test -f 'lib/network/tsnetwork_select.c' || echo '$(srcdir)/'`lib/network/tsnetwork_select.c
 
-lib/network/lib_libtarsnap_a-network_select.obj: lib/network/network_select.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_select.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Tpo -c -o lib/network/lib_libtarsnap_a-network_select.obj `if test -f 'lib/network/network_select.c'; then $(CYGPATH_W) 'lib/network/network_select.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_select.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_select.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_select.c' object='lib/network/lib_libtarsnap_a-network_select.obj' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_select.obj: lib/network/tsnetwork_select.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_select.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_select.obj `if test -f 'lib/network/tsnetwork_select.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_select.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_select.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_select.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_select.c' object='lib/network/lib_libtarsnap_a-tsnetwork_select.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_select.obj `if test -f 'lib/network/network_select.c'; then $(CYGPATH_W) 'lib/network/network_select.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_select.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_select.obj `if test -f 'lib/network/tsnetwork_select.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_select.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_select.c'; fi`
 
-lib/network/lib_libtarsnap_a-network_writeq.o: lib/network/network_writeq.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_writeq.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Tpo -c -o lib/network/lib_libtarsnap_a-network_writeq.o `test -f 'lib/network/network_writeq.c' || echo '$(srcdir)/'`lib/network/network_writeq.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_writeq.c' object='lib/network/lib_libtarsnap_a-network_writeq.o' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_sleep.o: lib/network/tsnetwork_sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_sleep.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_sleep.o `test -f 'lib/network/tsnetwork_sleep.c' || echo '$(srcdir)/'`lib/network/tsnetwork_sleep.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_sleep.c' object='lib/network/lib_libtarsnap_a-tsnetwork_sleep.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_writeq.o `test -f 'lib/network/network_writeq.c' || echo '$(srcdir)/'`lib/network/network_writeq.c
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_sleep.o `test -f 'lib/network/tsnetwork_sleep.c' || echo '$(srcdir)/'`lib/network/tsnetwork_sleep.c
 
-lib/network/lib_libtarsnap_a-network_writeq.obj: lib/network/network_writeq.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-network_writeq.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Tpo -c -o lib/network/lib_libtarsnap_a-network_writeq.obj `if test -f 'lib/network/network_writeq.c'; then $(CYGPATH_W) 'lib/network/network_writeq.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_writeq.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-network_writeq.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/network_writeq.c' object='lib/network/lib_libtarsnap_a-network_writeq.obj' libtool=no @AMDEPBACKSLASH@
+lib/network/lib_libtarsnap_a-tsnetwork_sleep.obj: lib/network/tsnetwork_sleep.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_sleep.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_sleep.obj `if test -f 'lib/network/tsnetwork_sleep.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_sleep.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_sleep.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_sleep.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_sleep.c' object='lib/network/lib_libtarsnap_a-tsnetwork_sleep.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-network_writeq.obj `if test -f 'lib/network/network_writeq.c'; then $(CYGPATH_W) 'lib/network/network_writeq.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/network_writeq.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_sleep.obj `if test -f 'lib/network/tsnetwork_sleep.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_sleep.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_sleep.c'; fi`
+
+lib/network/lib_libtarsnap_a-tsnetwork_writeq.o: lib/network/tsnetwork_writeq.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_writeq.o -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_writeq.o `test -f 'lib/network/tsnetwork_writeq.c' || echo '$(srcdir)/'`lib/network/tsnetwork_writeq.c
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_writeq.c' object='lib/network/lib_libtarsnap_a-tsnetwork_writeq.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_writeq.o `test -f 'lib/network/tsnetwork_writeq.c' || echo '$(srcdir)/'`lib/network/tsnetwork_writeq.c
+
+lib/network/lib_libtarsnap_a-tsnetwork_writeq.obj: lib/network/tsnetwork_writeq.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/network/lib_libtarsnap_a-tsnetwork_writeq.obj -MD -MP -MF lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Tpo -c -o lib/network/lib_libtarsnap_a-tsnetwork_writeq.obj `if test -f 'lib/network/tsnetwork_writeq.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_writeq.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_writeq.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Tpo lib/network/$(DEPDIR)/lib_libtarsnap_a-tsnetwork_writeq.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/network/tsnetwork_writeq.c' object='lib/network/lib_libtarsnap_a-tsnetwork_writeq.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/network/lib_libtarsnap_a-tsnetwork_writeq.obj `if test -f 'lib/network/tsnetwork_writeq.c'; then $(CYGPATH_W) 'lib/network/tsnetwork_writeq.c'; else $(CYGPATH_W) '$(srcdir)/lib/network/tsnetwork_writeq.c'; fi`
 
 lib/scryptenc/lib_libtarsnap_a-scryptenc.o: lib/scryptenc/scryptenc.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/scryptenc/lib_libtarsnap_a-scryptenc.o -MD -MP -MF lib/scryptenc/$(DEPDIR)/lib_libtarsnap_a-scryptenc.Tpo -c -o lib/scryptenc/lib_libtarsnap_a-scryptenc.o `test -f 'lib/scryptenc/scryptenc.c' || echo '$(srcdir)/'`lib/scryptenc/scryptenc.c
@@ -2228,34 +2348,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/scryptenc/lib_libtarsnap_a-scryptenc_cpuperf.obj `if test -f 'lib/scryptenc/scryptenc_cpuperf.c'; then $(CYGPATH_W) 'lib/scryptenc/scryptenc_cpuperf.c'; else $(CYGPATH_W) '$(srcdir)/lib/scryptenc/scryptenc_cpuperf.c'; fi`
 
-lib/util/lib_libtarsnap_a-asprintf.o: lib/util/asprintf.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-asprintf.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo -c -o lib/util/lib_libtarsnap_a-asprintf.o `test -f 'lib/util/asprintf.c' || echo '$(srcdir)/'`lib/util/asprintf.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/asprintf.c' object='lib/util/lib_libtarsnap_a-asprintf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-asprintf.o `test -f 'lib/util/asprintf.c' || echo '$(srcdir)/'`lib/util/asprintf.c
-
-lib/util/lib_libtarsnap_a-asprintf.obj: lib/util/asprintf.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-asprintf.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo -c -o lib/util/lib_libtarsnap_a-asprintf.obj `if test -f 'lib/util/asprintf.c'; then $(CYGPATH_W) 'lib/util/asprintf.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/asprintf.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/asprintf.c' object='lib/util/lib_libtarsnap_a-asprintf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-asprintf.obj `if test -f 'lib/util/asprintf.c'; then $(CYGPATH_W) 'lib/util/asprintf.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/asprintf.c'; fi`
-
-lib/util/lib_libtarsnap_a-b64encode.o: lib/util/b64encode.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-b64encode.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo -c -o lib/util/lib_libtarsnap_a-b64encode.o `test -f 'lib/util/b64encode.c' || echo '$(srcdir)/'`lib/util/b64encode.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/b64encode.c' object='lib/util/lib_libtarsnap_a-b64encode.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-b64encode.o `test -f 'lib/util/b64encode.c' || echo '$(srcdir)/'`lib/util/b64encode.c
-
-lib/util/lib_libtarsnap_a-b64encode.obj: lib/util/b64encode.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-b64encode.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo -c -o lib/util/lib_libtarsnap_a-b64encode.obj `if test -f 'lib/util/b64encode.c'; then $(CYGPATH_W) 'lib/util/b64encode.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/b64encode.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/b64encode.c' object='lib/util/lib_libtarsnap_a-b64encode.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-b64encode.obj `if test -f 'lib/util/b64encode.c'; then $(CYGPATH_W) 'lib/util/b64encode.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/b64encode.c'; fi`
-
 lib/util/lib_libtarsnap_a-dirutil.o: lib/util/dirutil.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-dirutil.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-dirutil.Tpo -c -o lib/util/lib_libtarsnap_a-dirutil.o `test -f 'lib/util/dirutil.c' || echo '$(srcdir)/'`lib/util/dirutil.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-dirutil.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-dirutil.Po
@@ -2270,20 +2362,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-dirutil.obj `if test -f 'lib/util/dirutil.c'; then $(CYGPATH_W) 'lib/util/dirutil.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/dirutil.c'; fi`
 
-lib/util/lib_libtarsnap_a-entropy.o: lib/util/entropy.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-entropy.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo -c -o lib/util/lib_libtarsnap_a-entropy.o `test -f 'lib/util/entropy.c' || echo '$(srcdir)/'`lib/util/entropy.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/entropy.c' object='lib/util/lib_libtarsnap_a-entropy.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-entropy.o `test -f 'lib/util/entropy.c' || echo '$(srcdir)/'`lib/util/entropy.c
-
-lib/util/lib_libtarsnap_a-entropy.obj: lib/util/entropy.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-entropy.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo -c -o lib/util/lib_libtarsnap_a-entropy.obj `if test -f 'lib/util/entropy.c'; then $(CYGPATH_W) 'lib/util/entropy.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/entropy.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/entropy.c' object='lib/util/lib_libtarsnap_a-entropy.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-entropy.obj `if test -f 'lib/util/entropy.c'; then $(CYGPATH_W) 'lib/util/entropy.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/entropy.c'; fi`
-
 lib/util/lib_libtarsnap_a-getfstype.o: lib/util/getfstype.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-getfstype.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-getfstype.Tpo -c -o lib/util/lib_libtarsnap_a-getfstype.o `test -f 'lib/util/getfstype.c' || echo '$(srcdir)/'`lib/util/getfstype.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-getfstype.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-getfstype.Po
@@ -2298,20 +2376,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-getfstype.obj `if test -f 'lib/util/getfstype.c'; then $(CYGPATH_W) 'lib/util/getfstype.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/getfstype.c'; fi`
 
-lib/util/lib_libtarsnap_a-hexify.o: lib/util/hexify.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-hexify.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo -c -o lib/util/lib_libtarsnap_a-hexify.o `test -f 'lib/util/hexify.c' || echo '$(srcdir)/'`lib/util/hexify.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/hexify.c' object='lib/util/lib_libtarsnap_a-hexify.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-hexify.o `test -f 'lib/util/hexify.c' || echo '$(srcdir)/'`lib/util/hexify.c
-
-lib/util/lib_libtarsnap_a-hexify.obj: lib/util/hexify.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-hexify.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo -c -o lib/util/lib_libtarsnap_a-hexify.obj `if test -f 'lib/util/hexify.c'; then $(CYGPATH_W) 'lib/util/hexify.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/hexify.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/hexify.c' object='lib/util/lib_libtarsnap_a-hexify.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-hexify.obj `if test -f 'lib/util/hexify.c'; then $(CYGPATH_W) 'lib/util/hexify.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/hexify.c'; fi`
-
 lib/util/lib_libtarsnap_a-hexlink.o: lib/util/hexlink.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-hexlink.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-hexlink.Tpo -c -o lib/util/lib_libtarsnap_a-hexlink.o `test -f 'lib/util/hexlink.c' || echo '$(srcdir)/'`lib/util/hexlink.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-hexlink.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-hexlink.Po
@@ -2326,20 +2390,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-hexlink.obj `if test -f 'lib/util/hexlink.c'; then $(CYGPATH_W) 'lib/util/hexlink.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/hexlink.c'; fi`
 
-lib/util/lib_libtarsnap_a-humansize.o: lib/util/humansize.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-humansize.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo -c -o lib/util/lib_libtarsnap_a-humansize.o `test -f 'lib/util/humansize.c' || echo '$(srcdir)/'`lib/util/humansize.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/humansize.c' object='lib/util/lib_libtarsnap_a-humansize.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-humansize.o `test -f 'lib/util/humansize.c' || echo '$(srcdir)/'`lib/util/humansize.c
-
-lib/util/lib_libtarsnap_a-humansize.obj: lib/util/humansize.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-humansize.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo -c -o lib/util/lib_libtarsnap_a-humansize.obj `if test -f 'lib/util/humansize.c'; then $(CYGPATH_W) 'lib/util/humansize.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/humansize.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/humansize.c' object='lib/util/lib_libtarsnap_a-humansize.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-humansize.obj `if test -f 'lib/util/humansize.c'; then $(CYGPATH_W) 'lib/util/humansize.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/humansize.c'; fi`
-
 lib/util/lib_libtarsnap_a-memlimit.o: lib/util/memlimit.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-memlimit.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-memlimit.Tpo -c -o lib/util/lib_libtarsnap_a-memlimit.o `test -f 'lib/util/memlimit.c' || echo '$(srcdir)/'`lib/util/memlimit.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-memlimit.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-memlimit.Po
@@ -2354,34 +2404,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-memlimit.obj `if test -f 'lib/util/memlimit.c'; then $(CYGPATH_W) 'lib/util/memlimit.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/memlimit.c'; fi`
 
-lib/util/lib_libtarsnap_a-monoclock.o: lib/util/monoclock.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-monoclock.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo -c -o lib/util/lib_libtarsnap_a-monoclock.o `test -f 'lib/util/monoclock.c' || echo '$(srcdir)/'`lib/util/monoclock.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/monoclock.c' object='lib/util/lib_libtarsnap_a-monoclock.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-monoclock.o `test -f 'lib/util/monoclock.c' || echo '$(srcdir)/'`lib/util/monoclock.c
-
-lib/util/lib_libtarsnap_a-monoclock.obj: lib/util/monoclock.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-monoclock.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo -c -o lib/util/lib_libtarsnap_a-monoclock.obj `if test -f 'lib/util/monoclock.c'; then $(CYGPATH_W) 'lib/util/monoclock.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/monoclock.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/monoclock.c' object='lib/util/lib_libtarsnap_a-monoclock.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-monoclock.obj `if test -f 'lib/util/monoclock.c'; then $(CYGPATH_W) 'lib/util/monoclock.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/monoclock.c'; fi`
-
-lib/util/lib_libtarsnap_a-readpass.o: lib/util/readpass.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-readpass.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo -c -o lib/util/lib_libtarsnap_a-readpass.o `test -f 'lib/util/readpass.c' || echo '$(srcdir)/'`lib/util/readpass.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/readpass.c' object='lib/util/lib_libtarsnap_a-readpass.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-readpass.o `test -f 'lib/util/readpass.c' || echo '$(srcdir)/'`lib/util/readpass.c
-
-lib/util/lib_libtarsnap_a-readpass.obj: lib/util/readpass.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-readpass.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo -c -o lib/util/lib_libtarsnap_a-readpass.obj `if test -f 'lib/util/readpass.c'; then $(CYGPATH_W) 'lib/util/readpass.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/readpass.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/readpass.c' object='lib/util/lib_libtarsnap_a-readpass.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-readpass.obj `if test -f 'lib/util/readpass.c'; then $(CYGPATH_W) 'lib/util/readpass.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/readpass.c'; fi`
-
 lib/util/lib_libtarsnap_a-sigquit.o: lib/util/sigquit.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-sigquit.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-sigquit.Tpo -c -o lib/util/lib_libtarsnap_a-sigquit.o `test -f 'lib/util/sigquit.c' || echo '$(srcdir)/'`lib/util/sigquit.c
 @am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-sigquit.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-sigquit.Po
@@ -2410,19 +2432,383 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-tvmath.obj `if test -f 'lib/util/tvmath.c'; then $(CYGPATH_W) 'lib/util/tvmath.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/tvmath.c'; fi`
 
-lib/util/lib_libtarsnap_a-warnp.o: lib/util/warnp.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-warnp.o -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo -c -o lib/util/lib_libtarsnap_a-warnp.o `test -f 'lib/util/warnp.c' || echo '$(srcdir)/'`lib/util/warnp.c
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/warnp.c' object='lib/util/lib_libtarsnap_a-warnp.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-warnp.o `test -f 'lib/util/warnp.c' || echo '$(srcdir)/'`lib/util/warnp.c
-
-lib/util/lib_libtarsnap_a-warnp.obj: lib/util/warnp.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT lib/util/lib_libtarsnap_a-warnp.obj -MD -MP -MF lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo -c -o lib/util/lib_libtarsnap_a-warnp.obj `if test -f 'lib/util/warnp.c'; then $(CYGPATH_W) 'lib/util/warnp.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/warnp.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo lib/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='lib/util/warnp.c' object='lib/util/lib_libtarsnap_a-warnp.obj' libtool=no @AMDEPBACKSLASH@
+libcperciva/alg/lib_libtarsnap_a-sha256.o: libcperciva/alg/sha256.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/alg/lib_libtarsnap_a-sha256.o -MD -MP -MF libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo -c -o libcperciva/alg/lib_libtarsnap_a-sha256.o `test -f 'libcperciva/alg/sha256.c' || echo '$(srcdir)/'`libcperciva/alg/sha256.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/alg/sha256.c' object='libcperciva/alg/lib_libtarsnap_a-sha256.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/alg/lib_libtarsnap_a-sha256.o `test -f 'libcperciva/alg/sha256.c' || echo '$(srcdir)/'`libcperciva/alg/sha256.c
+
+libcperciva/alg/lib_libtarsnap_a-sha256.obj: libcperciva/alg/sha256.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/alg/lib_libtarsnap_a-sha256.obj -MD -MP -MF libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo -c -o libcperciva/alg/lib_libtarsnap_a-sha256.obj `if test -f 'libcperciva/alg/sha256.c'; then $(CYGPATH_W) 'libcperciva/alg/sha256.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/alg/sha256.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Tpo libcperciva/alg/$(DEPDIR)/lib_libtarsnap_a-sha256.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/alg/sha256.c' object='libcperciva/alg/lib_libtarsnap_a-sha256.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/alg/lib_libtarsnap_a-sha256.obj `if test -f 'libcperciva/alg/sha256.c'; then $(CYGPATH_W) 'libcperciva/alg/sha256.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/alg/sha256.c'; fi`
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.o: libcperciva/crypto/crypto_aesctr.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.o -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.o `test -f 'libcperciva/crypto/crypto_aesctr.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_aesctr.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_aesctr.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.o `test -f 'libcperciva/crypto/crypto_aesctr.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_aesctr.c
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.obj: libcperciva/crypto/crypto_aesctr.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.obj -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.obj `if test -f 'libcperciva/crypto/crypto_aesctr.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_aesctr.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_aesctr.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_aesctr.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_aesctr.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_aesctr.obj `if test -f 'libcperciva/crypto/crypto_aesctr.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_aesctr.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_aesctr.c'; fi`
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh.o: libcperciva/crypto/crypto_dh.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_dh.o -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh.o `test -f 'libcperciva/crypto/crypto_dh.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_dh.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_dh.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_dh.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh.o `test -f 'libcperciva/crypto/crypto_dh.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_dh.c
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh.obj: libcperciva/crypto/crypto_dh.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_dh.obj -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh.obj `if test -f 'libcperciva/crypto/crypto_dh.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_dh.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_dh.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_dh.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_dh.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh.obj `if test -f 'libcperciva/crypto/crypto_dh.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_dh.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_dh.c'; fi`
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.o: libcperciva/crypto/crypto_dh_group14.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.o -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.o `test -f 'libcperciva/crypto/crypto_dh_group14.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_dh_group14.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_dh_group14.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.o `test -f 'libcperciva/crypto/crypto_dh_group14.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_dh_group14.c
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.obj: libcperciva/crypto/crypto_dh_group14.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.obj -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.obj `if test -f 'libcperciva/crypto/crypto_dh_group14.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_dh_group14.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_dh_group14.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_dh_group14.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_dh_group14.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_dh_group14.obj `if test -f 'libcperciva/crypto/crypto_dh_group14.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_dh_group14.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_dh_group14.c'; fi`
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.o: libcperciva/crypto/crypto_entropy.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.o -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.o `test -f 'libcperciva/crypto/crypto_entropy.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_entropy.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_entropy.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.o `test -f 'libcperciva/crypto/crypto_entropy.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_entropy.c
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.obj: libcperciva/crypto/crypto_entropy.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.obj -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.obj `if test -f 'libcperciva/crypto/crypto_entropy.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_entropy.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_entropy.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_entropy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_entropy.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_entropy.obj `if test -f 'libcperciva/crypto/crypto_entropy.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_entropy.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_entropy.c'; fi`
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.o: libcperciva/crypto/crypto_verify_bytes.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.o -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.o `test -f 'libcperciva/crypto/crypto_verify_bytes.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_verify_bytes.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_verify_bytes.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.o `test -f 'libcperciva/crypto/crypto_verify_bytes.c' || echo '$(srcdir)/'`libcperciva/crypto/crypto_verify_bytes.c
+
+libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj: libcperciva/crypto/crypto_verify_bytes.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj -MD -MP -MF libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj `if test -f 'libcperciva/crypto/crypto_verify_bytes.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_verify_bytes.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_verify_bytes.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Tpo libcperciva/crypto/$(DEPDIR)/lib_libtarsnap_a-crypto_verify_bytes.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/crypto/crypto_verify_bytes.c' object='libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/crypto/lib_libtarsnap_a-crypto_verify_bytes.obj `if test -f 'libcperciva/crypto/crypto_verify_bytes.c'; then $(CYGPATH_W) 'libcperciva/crypto/crypto_verify_bytes.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/crypto/crypto_verify_bytes.c'; fi`
+
+libcperciva/datastruct/lib_libtarsnap_a-elasticarray.o: libcperciva/datastruct/elasticarray.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-elasticarray.o -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-elasticarray.o `test -f 'libcperciva/datastruct/elasticarray.c' || echo '$(srcdir)/'`libcperciva/datastruct/elasticarray.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/elasticarray.c' object='libcperciva/datastruct/lib_libtarsnap_a-elasticarray.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-elasticarray.o `test -f 'libcperciva/datastruct/elasticarray.c' || echo '$(srcdir)/'`libcperciva/datastruct/elasticarray.c
+
+libcperciva/datastruct/lib_libtarsnap_a-elasticarray.obj: libcperciva/datastruct/elasticarray.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-elasticarray.obj -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-elasticarray.obj `if test -f 'libcperciva/datastruct/elasticarray.c'; then $(CYGPATH_W) 'libcperciva/datastruct/elasticarray.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/elasticarray.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-elasticarray.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/elasticarray.c' object='libcperciva/datastruct/lib_libtarsnap_a-elasticarray.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-elasticarray.obj `if test -f 'libcperciva/datastruct/elasticarray.c'; then $(CYGPATH_W) 'libcperciva/datastruct/elasticarray.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/elasticarray.c'; fi`
+
+libcperciva/datastruct/lib_libtarsnap_a-ptrheap.o: libcperciva/datastruct/ptrheap.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-ptrheap.o -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-ptrheap.o `test -f 'libcperciva/datastruct/ptrheap.c' || echo '$(srcdir)/'`libcperciva/datastruct/ptrheap.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/ptrheap.c' object='libcperciva/datastruct/lib_libtarsnap_a-ptrheap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-ptrheap.o `test -f 'libcperciva/datastruct/ptrheap.c' || echo '$(srcdir)/'`libcperciva/datastruct/ptrheap.c
+
+libcperciva/datastruct/lib_libtarsnap_a-ptrheap.obj: libcperciva/datastruct/ptrheap.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-ptrheap.obj -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-ptrheap.obj `if test -f 'libcperciva/datastruct/ptrheap.c'; then $(CYGPATH_W) 'libcperciva/datastruct/ptrheap.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/ptrheap.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-ptrheap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/ptrheap.c' object='libcperciva/datastruct/lib_libtarsnap_a-ptrheap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-ptrheap.obj `if test -f 'libcperciva/datastruct/ptrheap.c'; then $(CYGPATH_W) 'libcperciva/datastruct/ptrheap.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/ptrheap.c'; fi`
+
+libcperciva/datastruct/lib_libtarsnap_a-timerqueue.o: libcperciva/datastruct/timerqueue.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-timerqueue.o -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-timerqueue.o `test -f 'libcperciva/datastruct/timerqueue.c' || echo '$(srcdir)/'`libcperciva/datastruct/timerqueue.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/timerqueue.c' object='libcperciva/datastruct/lib_libtarsnap_a-timerqueue.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-timerqueue.o `test -f 'libcperciva/datastruct/timerqueue.c' || echo '$(srcdir)/'`libcperciva/datastruct/timerqueue.c
+
+libcperciva/datastruct/lib_libtarsnap_a-timerqueue.obj: libcperciva/datastruct/timerqueue.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/datastruct/lib_libtarsnap_a-timerqueue.obj -MD -MP -MF libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Tpo -c -o libcperciva/datastruct/lib_libtarsnap_a-timerqueue.obj `if test -f 'libcperciva/datastruct/timerqueue.c'; then $(CYGPATH_W) 'libcperciva/datastruct/timerqueue.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/timerqueue.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Tpo libcperciva/datastruct/$(DEPDIR)/lib_libtarsnap_a-timerqueue.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/datastruct/timerqueue.c' object='libcperciva/datastruct/lib_libtarsnap_a-timerqueue.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/datastruct/lib_libtarsnap_a-timerqueue.obj `if test -f 'libcperciva/datastruct/timerqueue.c'; then $(CYGPATH_W) 'libcperciva/datastruct/timerqueue.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/datastruct/timerqueue.c'; fi`
+
+libcperciva/events/lib_libtarsnap_a-events.o: libcperciva/events/events.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events.o -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events.o `test -f 'libcperciva/events/events.c' || echo '$(srcdir)/'`libcperciva/events/events.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events.c' object='libcperciva/events/lib_libtarsnap_a-events.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events.o `test -f 'libcperciva/events/events.c' || echo '$(srcdir)/'`libcperciva/events/events.c
+
+libcperciva/events/lib_libtarsnap_a-events.obj: libcperciva/events/events.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events.obj -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events.obj `if test -f 'libcperciva/events/events.c'; then $(CYGPATH_W) 'libcperciva/events/events.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events.c' object='libcperciva/events/lib_libtarsnap_a-events.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events.obj `if test -f 'libcperciva/events/events.c'; then $(CYGPATH_W) 'libcperciva/events/events.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events.c'; fi`
+
+libcperciva/events/lib_libtarsnap_a-events_immediate.o: libcperciva/events/events_immediate.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_immediate.o -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_immediate.o `test -f 'libcperciva/events/events_immediate.c' || echo '$(srcdir)/'`libcperciva/events/events_immediate.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_immediate.c' object='libcperciva/events/lib_libtarsnap_a-events_immediate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_immediate.o `test -f 'libcperciva/events/events_immediate.c' || echo '$(srcdir)/'`libcperciva/events/events_immediate.c
+
+libcperciva/events/lib_libtarsnap_a-events_immediate.obj: libcperciva/events/events_immediate.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_immediate.obj -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_immediate.obj `if test -f 'libcperciva/events/events_immediate.c'; then $(CYGPATH_W) 'libcperciva/events/events_immediate.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_immediate.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_immediate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_immediate.c' object='libcperciva/events/lib_libtarsnap_a-events_immediate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_immediate.obj `if test -f 'libcperciva/events/events_immediate.c'; then $(CYGPATH_W) 'libcperciva/events/events_immediate.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_immediate.c'; fi`
+
+libcperciva/events/lib_libtarsnap_a-events_network.o: libcperciva/events/events_network.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_network.o -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_network.o `test -f 'libcperciva/events/events_network.c' || echo '$(srcdir)/'`libcperciva/events/events_network.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_network.c' object='libcperciva/events/lib_libtarsnap_a-events_network.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_network.o `test -f 'libcperciva/events/events_network.c' || echo '$(srcdir)/'`libcperciva/events/events_network.c
+
+libcperciva/events/lib_libtarsnap_a-events_network.obj: libcperciva/events/events_network.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_network.obj -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_network.obj `if test -f 'libcperciva/events/events_network.c'; then $(CYGPATH_W) 'libcperciva/events/events_network.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_network.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_network.c' object='libcperciva/events/lib_libtarsnap_a-events_network.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_network.obj `if test -f 'libcperciva/events/events_network.c'; then $(CYGPATH_W) 'libcperciva/events/events_network.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_network.c'; fi`
+
+libcperciva/events/lib_libtarsnap_a-events_network_selectstats.o: libcperciva/events/events_network_selectstats.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_network_selectstats.o -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_network_selectstats.o `test -f 'libcperciva/events/events_network_selectstats.c' || echo '$(srcdir)/'`libcperciva/events/events_network_selectstats.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_network_selectstats.c' object='libcperciva/events/lib_libtarsnap_a-events_network_selectstats.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_network_selectstats.o `test -f 'libcperciva/events/events_network_selectstats.c' || echo '$(srcdir)/'`libcperciva/events/events_network_selectstats.c
+
+libcperciva/events/lib_libtarsnap_a-events_network_selectstats.obj: libcperciva/events/events_network_selectstats.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_network_selectstats.obj -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_network_selectstats.obj `if test -f 'libcperciva/events/events_network_selectstats.c'; then $(CYGPATH_W) 'libcperciva/events/events_network_selectstats.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_network_selectstats.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_network_selectstats.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_network_selectstats.c' object='libcperciva/events/lib_libtarsnap_a-events_network_selectstats.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_network_selectstats.obj `if test -f 'libcperciva/events/events_network_selectstats.c'; then $(CYGPATH_W) 'libcperciva/events/events_network_selectstats.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_network_selectstats.c'; fi`
+
+libcperciva/events/lib_libtarsnap_a-events_timer.o: libcperciva/events/events_timer.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_timer.o -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_timer.o `test -f 'libcperciva/events/events_timer.c' || echo '$(srcdir)/'`libcperciva/events/events_timer.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_timer.c' object='libcperciva/events/lib_libtarsnap_a-events_timer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_timer.o `test -f 'libcperciva/events/events_timer.c' || echo '$(srcdir)/'`libcperciva/events/events_timer.c
+
+libcperciva/events/lib_libtarsnap_a-events_timer.obj: libcperciva/events/events_timer.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/events/lib_libtarsnap_a-events_timer.obj -MD -MP -MF libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Tpo -c -o libcperciva/events/lib_libtarsnap_a-events_timer.obj `if test -f 'libcperciva/events/events_timer.c'; then $(CYGPATH_W) 'libcperciva/events/events_timer.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_timer.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Tpo libcperciva/events/$(DEPDIR)/lib_libtarsnap_a-events_timer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/events/events_timer.c' object='libcperciva/events/lib_libtarsnap_a-events_timer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/events/lib_libtarsnap_a-events_timer.obj `if test -f 'libcperciva/events/events_timer.c'; then $(CYGPATH_W) 'libcperciva/events/events_timer.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/events/events_timer.c'; fi`
+
+libcperciva/network/lib_libtarsnap_a-network_accept.o: libcperciva/network/network_accept.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_accept.o -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_accept.o `test -f 'libcperciva/network/network_accept.c' || echo '$(srcdir)/'`libcperciva/network/network_accept.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_accept.c' object='libcperciva/network/lib_libtarsnap_a-network_accept.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_accept.o `test -f 'libcperciva/network/network_accept.c' || echo '$(srcdir)/'`libcperciva/network/network_accept.c
+
+libcperciva/network/lib_libtarsnap_a-network_accept.obj: libcperciva/network/network_accept.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_accept.obj -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_accept.obj `if test -f 'libcperciva/network/network_accept.c'; then $(CYGPATH_W) 'libcperciva/network/network_accept.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_accept.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_accept.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_accept.c' object='libcperciva/network/lib_libtarsnap_a-network_accept.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_accept.obj `if test -f 'libcperciva/network/network_accept.c'; then $(CYGPATH_W) 'libcperciva/network/network_accept.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_accept.c'; fi`
+
+libcperciva/network/lib_libtarsnap_a-network_buf.o: libcperciva/network/network_buf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_buf.o -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_buf.o `test -f 'libcperciva/network/network_buf.c' || echo '$(srcdir)/'`libcperciva/network/network_buf.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_buf.c' object='libcperciva/network/lib_libtarsnap_a-network_buf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_buf.o `test -f 'libcperciva/network/network_buf.c' || echo '$(srcdir)/'`libcperciva/network/network_buf.c
+
+libcperciva/network/lib_libtarsnap_a-network_buf.obj: libcperciva/network/network_buf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_buf.obj -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_buf.obj `if test -f 'libcperciva/network/network_buf.c'; then $(CYGPATH_W) 'libcperciva/network/network_buf.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_buf.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_buf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_buf.c' object='libcperciva/network/lib_libtarsnap_a-network_buf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_buf.obj `if test -f 'libcperciva/network/network_buf.c'; then $(CYGPATH_W) 'libcperciva/network/network_buf.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_buf.c'; fi`
+
+libcperciva/network/lib_libtarsnap_a-network_connect.o: libcperciva/network/network_connect.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_connect.o -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_connect.o `test -f 'libcperciva/network/network_connect.c' || echo '$(srcdir)/'`libcperciva/network/network_connect.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_connect.c' object='libcperciva/network/lib_libtarsnap_a-network_connect.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_connect.o `test -f 'libcperciva/network/network_connect.c' || echo '$(srcdir)/'`libcperciva/network/network_connect.c
+
+libcperciva/network/lib_libtarsnap_a-network_connect.obj: libcperciva/network/network_connect.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/network/lib_libtarsnap_a-network_connect.obj -MD -MP -MF libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo -c -o libcperciva/network/lib_libtarsnap_a-network_connect.obj `if test -f 'libcperciva/network/network_connect.c'; then $(CYGPATH_W) 'libcperciva/network/network_connect.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_connect.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Tpo libcperciva/network/$(DEPDIR)/lib_libtarsnap_a-network_connect.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/network/network_connect.c' object='libcperciva/network/lib_libtarsnap_a-network_connect.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/network/lib_libtarsnap_a-network_connect.obj `if test -f 'libcperciva/network/network_connect.c'; then $(CYGPATH_W) 'libcperciva/network/network_connect.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/network/network_connect.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-asprintf.o: libcperciva/util/asprintf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-asprintf.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo -c -o libcperciva/util/lib_libtarsnap_a-asprintf.o `test -f 'libcperciva/util/asprintf.c' || echo '$(srcdir)/'`libcperciva/util/asprintf.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/asprintf.c' object='libcperciva/util/lib_libtarsnap_a-asprintf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-asprintf.o `test -f 'libcperciva/util/asprintf.c' || echo '$(srcdir)/'`libcperciva/util/asprintf.c
+
+libcperciva/util/lib_libtarsnap_a-asprintf.obj: libcperciva/util/asprintf.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-asprintf.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo -c -o libcperciva/util/lib_libtarsnap_a-asprintf.obj `if test -f 'libcperciva/util/asprintf.c'; then $(CYGPATH_W) 'libcperciva/util/asprintf.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/asprintf.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-asprintf.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/asprintf.c' object='libcperciva/util/lib_libtarsnap_a-asprintf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-asprintf.obj `if test -f 'libcperciva/util/asprintf.c'; then $(CYGPATH_W) 'libcperciva/util/asprintf.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/asprintf.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-b64encode.o: libcperciva/util/b64encode.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-b64encode.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo -c -o libcperciva/util/lib_libtarsnap_a-b64encode.o `test -f 'libcperciva/util/b64encode.c' || echo '$(srcdir)/'`libcperciva/util/b64encode.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/b64encode.c' object='libcperciva/util/lib_libtarsnap_a-b64encode.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-b64encode.o `test -f 'libcperciva/util/b64encode.c' || echo '$(srcdir)/'`libcperciva/util/b64encode.c
+
+libcperciva/util/lib_libtarsnap_a-b64encode.obj: libcperciva/util/b64encode.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-b64encode.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo -c -o libcperciva/util/lib_libtarsnap_a-b64encode.obj `if test -f 'libcperciva/util/b64encode.c'; then $(CYGPATH_W) 'libcperciva/util/b64encode.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/b64encode.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-b64encode.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/b64encode.c' object='libcperciva/util/lib_libtarsnap_a-b64encode.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-b64encode.obj `if test -f 'libcperciva/util/b64encode.c'; then $(CYGPATH_W) 'libcperciva/util/b64encode.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/b64encode.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-entropy.o: libcperciva/util/entropy.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-entropy.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo -c -o libcperciva/util/lib_libtarsnap_a-entropy.o `test -f 'libcperciva/util/entropy.c' || echo '$(srcdir)/'`libcperciva/util/entropy.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/entropy.c' object='libcperciva/util/lib_libtarsnap_a-entropy.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-entropy.o `test -f 'libcperciva/util/entropy.c' || echo '$(srcdir)/'`libcperciva/util/entropy.c
+
+libcperciva/util/lib_libtarsnap_a-entropy.obj: libcperciva/util/entropy.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-entropy.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo -c -o libcperciva/util/lib_libtarsnap_a-entropy.obj `if test -f 'libcperciva/util/entropy.c'; then $(CYGPATH_W) 'libcperciva/util/entropy.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/entropy.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-entropy.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/entropy.c' object='libcperciva/util/lib_libtarsnap_a-entropy.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-entropy.obj `if test -f 'libcperciva/util/entropy.c'; then $(CYGPATH_W) 'libcperciva/util/entropy.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/entropy.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-hexify.o: libcperciva/util/hexify.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-hexify.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo -c -o libcperciva/util/lib_libtarsnap_a-hexify.o `test -f 'libcperciva/util/hexify.c' || echo '$(srcdir)/'`libcperciva/util/hexify.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/hexify.c' object='libcperciva/util/lib_libtarsnap_a-hexify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-hexify.o `test -f 'libcperciva/util/hexify.c' || echo '$(srcdir)/'`libcperciva/util/hexify.c
+
+libcperciva/util/lib_libtarsnap_a-hexify.obj: libcperciva/util/hexify.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-hexify.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo -c -o libcperciva/util/lib_libtarsnap_a-hexify.obj `if test -f 'libcperciva/util/hexify.c'; then $(CYGPATH_W) 'libcperciva/util/hexify.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/hexify.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-hexify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/hexify.c' object='libcperciva/util/lib_libtarsnap_a-hexify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-hexify.obj `if test -f 'libcperciva/util/hexify.c'; then $(CYGPATH_W) 'libcperciva/util/hexify.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/hexify.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-humansize.o: libcperciva/util/humansize.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-humansize.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo -c -o libcperciva/util/lib_libtarsnap_a-humansize.o `test -f 'libcperciva/util/humansize.c' || echo '$(srcdir)/'`libcperciva/util/humansize.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/humansize.c' object='libcperciva/util/lib_libtarsnap_a-humansize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-humansize.o `test -f 'libcperciva/util/humansize.c' || echo '$(srcdir)/'`libcperciva/util/humansize.c
+
+libcperciva/util/lib_libtarsnap_a-humansize.obj: libcperciva/util/humansize.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-humansize.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo -c -o libcperciva/util/lib_libtarsnap_a-humansize.obj `if test -f 'libcperciva/util/humansize.c'; then $(CYGPATH_W) 'libcperciva/util/humansize.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/humansize.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-humansize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/humansize.c' object='libcperciva/util/lib_libtarsnap_a-humansize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-humansize.obj `if test -f 'libcperciva/util/humansize.c'; then $(CYGPATH_W) 'libcperciva/util/humansize.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/humansize.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-monoclock.o: libcperciva/util/monoclock.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-monoclock.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo -c -o libcperciva/util/lib_libtarsnap_a-monoclock.o `test -f 'libcperciva/util/monoclock.c' || echo '$(srcdir)/'`libcperciva/util/monoclock.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/monoclock.c' object='libcperciva/util/lib_libtarsnap_a-monoclock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-monoclock.o `test -f 'libcperciva/util/monoclock.c' || echo '$(srcdir)/'`libcperciva/util/monoclock.c
+
+libcperciva/util/lib_libtarsnap_a-monoclock.obj: libcperciva/util/monoclock.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-monoclock.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo -c -o libcperciva/util/lib_libtarsnap_a-monoclock.obj `if test -f 'libcperciva/util/monoclock.c'; then $(CYGPATH_W) 'libcperciva/util/monoclock.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/monoclock.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-monoclock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/monoclock.c' object='libcperciva/util/lib_libtarsnap_a-monoclock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-monoclock.obj `if test -f 'libcperciva/util/monoclock.c'; then $(CYGPATH_W) 'libcperciva/util/monoclock.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/monoclock.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-readpass.o: libcperciva/util/readpass.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-readpass.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo -c -o libcperciva/util/lib_libtarsnap_a-readpass.o `test -f 'libcperciva/util/readpass.c' || echo '$(srcdir)/'`libcperciva/util/readpass.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/readpass.c' object='libcperciva/util/lib_libtarsnap_a-readpass.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-readpass.o `test -f 'libcperciva/util/readpass.c' || echo '$(srcdir)/'`libcperciva/util/readpass.c
+
+libcperciva/util/lib_libtarsnap_a-readpass.obj: libcperciva/util/readpass.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-readpass.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo -c -o libcperciva/util/lib_libtarsnap_a-readpass.obj `if test -f 'libcperciva/util/readpass.c'; then $(CYGPATH_W) 'libcperciva/util/readpass.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/readpass.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-readpass.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/readpass.c' object='libcperciva/util/lib_libtarsnap_a-readpass.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-readpass.obj `if test -f 'libcperciva/util/readpass.c'; then $(CYGPATH_W) 'libcperciva/util/readpass.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/readpass.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-sock.o: libcperciva/util/sock.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-sock.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Tpo -c -o libcperciva/util/lib_libtarsnap_a-sock.o `test -f 'libcperciva/util/sock.c' || echo '$(srcdir)/'`libcperciva/util/sock.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/sock.c' object='libcperciva/util/lib_libtarsnap_a-sock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-sock.o `test -f 'libcperciva/util/sock.c' || echo '$(srcdir)/'`libcperciva/util/sock.c
+
+libcperciva/util/lib_libtarsnap_a-sock.obj: libcperciva/util/sock.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-sock.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Tpo -c -o libcperciva/util/lib_libtarsnap_a-sock.obj `if test -f 'libcperciva/util/sock.c'; then $(CYGPATH_W) 'libcperciva/util/sock.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/sock.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/sock.c' object='libcperciva/util/lib_libtarsnap_a-sock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-sock.obj `if test -f 'libcperciva/util/sock.c'; then $(CYGPATH_W) 'libcperciva/util/sock.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/sock.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-sock_util.o: libcperciva/util/sock_util.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-sock_util.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Tpo -c -o libcperciva/util/lib_libtarsnap_a-sock_util.o `test -f 'libcperciva/util/sock_util.c' || echo '$(srcdir)/'`libcperciva/util/sock_util.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/sock_util.c' object='libcperciva/util/lib_libtarsnap_a-sock_util.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-sock_util.o `test -f 'libcperciva/util/sock_util.c' || echo '$(srcdir)/'`libcperciva/util/sock_util.c
+
+libcperciva/util/lib_libtarsnap_a-sock_util.obj: libcperciva/util/sock_util.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-sock_util.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Tpo -c -o libcperciva/util/lib_libtarsnap_a-sock_util.obj `if test -f 'libcperciva/util/sock_util.c'; then $(CYGPATH_W) 'libcperciva/util/sock_util.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/sock_util.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-sock_util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/sock_util.c' object='libcperciva/util/lib_libtarsnap_a-sock_util.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-sock_util.obj `if test -f 'libcperciva/util/sock_util.c'; then $(CYGPATH_W) 'libcperciva/util/sock_util.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/sock_util.c'; fi`
+
+libcperciva/util/lib_libtarsnap_a-warnp.o: libcperciva/util/warnp.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-warnp.o -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo -c -o libcperciva/util/lib_libtarsnap_a-warnp.o `test -f 'libcperciva/util/warnp.c' || echo '$(srcdir)/'`libcperciva/util/warnp.c
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/warnp.c' object='libcperciva/util/lib_libtarsnap_a-warnp.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-warnp.o `test -f 'libcperciva/util/warnp.c' || echo '$(srcdir)/'`libcperciva/util/warnp.c
+
+libcperciva/util/lib_libtarsnap_a-warnp.obj: libcperciva/util/warnp.c
+@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -MT libcperciva/util/lib_libtarsnap_a-warnp.obj -MD -MP -MF libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo -c -o libcperciva/util/lib_libtarsnap_a-warnp.obj `if test -f 'libcperciva/util/warnp.c'; then $(CYGPATH_W) 'libcperciva/util/warnp.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/warnp.c'; fi`
+@am__fastdepCC_TRUE@	$(am__mv) libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Tpo libcperciva/util/$(DEPDIR)/lib_libtarsnap_a-warnp.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='libcperciva/util/warnp.c' object='libcperciva/util/lib_libtarsnap_a-warnp.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o lib/util/lib_libtarsnap_a-warnp.obj `if test -f 'lib/util/warnp.c'; then $(CYGPATH_W) 'lib/util/warnp.c'; else $(CYGPATH_W) '$(srcdir)/lib/util/warnp.c'; fi`
+@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_libtarsnap_a_CFLAGS) $(CFLAGS) -c -o libcperciva/util/lib_libtarsnap_a-warnp.obj `if test -f 'libcperciva/util/warnp.c'; then $(CYGPATH_W) 'libcperciva/util/warnp.c'; else $(CYGPATH_W) '$(srcdir)/libcperciva/util/warnp.c'; fi`
 
 libarchive/libarchive_libarchive_a-archive_check_magic.o: libarchive/archive_check_magic.c
 @am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libarchive_libarchive_a_CFLAGS) $(CFLAGS) -MT libarchive/libarchive_libarchive_a-archive_check_magic.o -MD -MP -MF libarchive/$(DEPDIR)/libarchive_libarchive_a-archive_check_magic.Tpo -c -o libarchive/libarchive_libarchive_a-archive_check_magic.o `test -f 'libarchive/archive_check_magic.c' || echo '$(srcdir)/'`libarchive/archive_check_magic.c
@@ -4196,9 +4582,9 @@
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
-	chmod -R a-w $(distdir); chmod u+w $(distdir)
-	mkdir $(distdir)/_build
-	mkdir $(distdir)/_inst
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
@@ -4318,6 +4704,18 @@
 	-rm -f lib/util/$(am__dirstamp)
 	-rm -f libarchive/$(DEPDIR)/$(am__dirstamp)
 	-rm -f libarchive/$(am__dirstamp)
+	-rm -f libcperciva/alg/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/alg/$(am__dirstamp)
+	-rm -f libcperciva/crypto/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/crypto/$(am__dirstamp)
+	-rm -f libcperciva/datastruct/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/datastruct/$(am__dirstamp)
+	-rm -f libcperciva/events/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/events/$(am__dirstamp)
+	-rm -f libcperciva/network/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/network/$(am__dirstamp)
+	-rm -f libcperciva/util/$(DEPDIR)/$(am__dirstamp)
+	-rm -f libcperciva/util/$(am__dirstamp)
 	-rm -f recrypt/$(DEPDIR)/$(am__dirstamp)
 	-rm -f recrypt/$(am__dirstamp)
 	-rm -f tar/$(DEPDIR)/$(am__dirstamp)
@@ -4343,7 +4741,7 @@
 
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf keygen/$(DEPDIR) keymgmt/$(DEPDIR) keyregen/$(DEPDIR) lib/crypto/$(DEPDIR) lib/datastruct/$(DEPDIR) lib/keyfile/$(DEPDIR) lib/netpacket/$(DEPDIR) lib/netproto/$(DEPDIR) lib/network/$(DEPDIR) lib/scryptenc/$(DEPDIR) lib/util/$(DEPDIR) libarchive/$(DEPDIR) recrypt/$(DEPDIR) tar/$(DEPDIR) tar/ccache/$(DEPDIR) tar/chunks/$(DEPDIR) tar/glue/$(DEPDIR) tar/multitape/$(DEPDIR) tar/storage/$(DEPDIR)
+	-rm -rf keygen/$(DEPDIR) keymgmt/$(DEPDIR) keyregen/$(DEPDIR) lib/crypto/$(DEPDIR) lib/datastruct/$(DEPDIR) lib/keyfile/$(DEPDIR) lib/netpacket/$(DEPDIR) lib/netproto/$(DEPDIR) lib/network/$(DEPDIR) lib/scryptenc/$(DEPDIR) lib/util/$(DEPDIR) libarchive/$(DEPDIR) libcperciva/alg/$(DEPDIR) libcperciva/crypto/$(DEPDIR) libcperciva/datastruct/$(DEPDIR) libcperciva/events/$(DEPDIR) libcperciva/network/$(DEPDIR) libcperciva/util/$(DEPDIR) recrypt/$(DEPDIR) tar/$(DEPDIR) tar/ccache/$(DEPDIR) tar/chunks/$(DEPDIR) tar/glue/$(DEPDIR) tar/multitape/$(DEPDIR) tar/storage/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
 	distclean-hdr distclean-tags
@@ -4391,7 +4789,7 @@
 maintainer-clean: maintainer-clean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -rf keygen/$(DEPDIR) keymgmt/$(DEPDIR) keyregen/$(DEPDIR) lib/crypto/$(DEPDIR) lib/datastruct/$(DEPDIR) lib/keyfile/$(DEPDIR) lib/netpacket/$(DEPDIR) lib/netproto/$(DEPDIR) lib/network/$(DEPDIR) lib/scryptenc/$(DEPDIR) lib/util/$(DEPDIR) libarchive/$(DEPDIR) recrypt/$(DEPDIR) tar/$(DEPDIR) tar/ccache/$(DEPDIR) tar/chunks/$(DEPDIR) tar/glue/$(DEPDIR) tar/multitape/$(DEPDIR) tar/storage/$(DEPDIR)
+	-rm -rf keygen/$(DEPDIR) keymgmt/$(DEPDIR) keyregen/$(DEPDIR) lib/crypto/$(DEPDIR) lib/datastruct/$(DEPDIR) lib/keyfile/$(DEPDIR) lib/netpacket/$(DEPDIR) lib/netproto/$(DEPDIR) lib/network/$(DEPDIR) lib/scryptenc/$(DEPDIR) lib/util/$(DEPDIR) libarchive/$(DEPDIR) libcperciva/alg/$(DEPDIR) libcperciva/crypto/$(DEPDIR) libcperciva/datastruct/$(DEPDIR) libcperciva/events/$(DEPDIR) libcperciva/network/$(DEPDIR) libcperciva/util/$(DEPDIR) recrypt/$(DEPDIR) tar/$(DEPDIR) tar/ccache/$(DEPDIR) tar/chunks/$(DEPDIR) tar/glue/$(DEPDIR) tar/multitape/$(DEPDIR) tar/storage/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
diff -ruN tarsnap-autoconf-1.0.33/config.aux/compile tarsnap-autoconf-1.0.34/config.aux/compile
--- tarsnap-autoconf-1.0.33/config.aux/compile	2012-08-10 00:05:26.000000000 -0700
+++ tarsnap-autoconf-1.0.34/config.aux/compile	2013-07-06 14:38:23.000000000 -0700
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-03-05.13; # UTC
+scriptversion=2012-10-14.11; # UTC
 
 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
@@ -112,6 +112,11 @@
       lib=$dir/$lib.lib
       break
     fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
   done
   IFS=$save_IFS
 
diff -ruN tarsnap-autoconf-1.0.33/config.aux/config.guess tarsnap-autoconf-1.0.34/config.aux/config.guess
--- tarsnap-autoconf-1.0.33/config.aux/config.guess	2012-08-10 00:05:26.000000000 -0700
+++ tarsnap-autoconf-1.0.34/config.aux/config.guess	2013-07-06 14:38:23.000000000 -0700
@@ -1,13 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2003-07-02'
+timestamp='2013-05-16'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -16,24 +15,22 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -53,8 +50,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +62,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -104,7 +100,7 @@
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -123,7 +119,7 @@
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -136,12 +132,33 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
+
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
 	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
 	# switched to ELF, *-*-netbsd* would select the old
 	# object file format.  This provides both forward
@@ -158,6 +175,7 @@
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
@@ -166,7 +184,7 @@
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -176,7 +194,7 @@
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -196,50 +214,36 @@
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 	# covers most systems running today.  This code pipes the CPU
@@ -277,42 +281,52 @@
 	    "EV7.9 (21364A)")
 		UNAME_MACHINE="alphaev79" ;;
 	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -320,32 +334,51 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -354,10 +387,10 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -369,10 +402,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -382,38 +415,41 @@
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -437,35 +473,36 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -478,29 +515,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -508,7 +545,7 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -523,15 +560,19 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
-    *:AIX:*:[45])
+	exit ;;
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -544,28 +585,28 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -574,52 +615,52 @@
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -627,9 +668,19 @@
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -637,11 +688,11 @@
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -669,321 +720,334 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
-	exit 0 ;;
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/FreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
 	echo i586-pc-interix
-	exit 0 ;;
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef mips
-	#undef mipsel
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
+	CPU=${UNAME_MACHINE}el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
+	CPU=${UNAME_MACHINE}
 	#else
 	CPU=
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
 	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
     x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#ifdef __INTEL_COMPILER
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
 	echo i386-sequent-sysv4
-	exit 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
 	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
+	exit ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -991,15 +1055,16 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1017,73 +1082,86 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
+	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
-	exit 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
+	exit ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1091,68 +1169,99 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit 0 ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	case `uname -p` in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
-	esac
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1160,22 +1269,28 @@
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1186,33 +1301,55 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
@@ -1230,16 +1367,16 @@
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1328,11 +1465,12 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1341,22 +1479,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1367,7 +1505,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
diff -ruN tarsnap-autoconf-1.0.33/config.aux/config.sub tarsnap-autoconf-1.0.34/config.aux/config.sub
--- tarsnap-autoconf-1.0.33/config.aux/config.sub	2012-08-10 00:05:26.000000000 -0700
+++ tarsnap-autoconf-1.0.34/config.aux/config.sub	2013-07-06 14:38:23.000000000 -0700
@@ -1,42 +1,40 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2003-07-04'
+timestamp='2013-04-24'
 
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -70,8 +68,7 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +80,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +96,7 @@
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,10 +115,18 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
   *)
     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
     if [ $basic_machine != $1 ]
@@ -144,10 +149,13 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray | -microblaze*)
 		os=
 		basic_machine=$1
 		;;
+	-bluegene*)
+		os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -162,13 +170,17 @@
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -185,6 +197,10 @@
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -202,6 +218,12 @@
 	-isc*)
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
 	-lynx*)
 		os=-lynxos
 		;;
@@ -226,55 +248,106 @@
 	# Some are omitted here because they have special meanings below.
 	1750a | 580 \
 	| a29k \
+	| aarch64 | aarch64_be \
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
+	| epiphany \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
-	| ip2k \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| open8 \
+	| or1k | or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
-	| z8k)
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -290,58 +363,82 @@
 	# Recognize the basic CPU types with company name.
 	580-* \
 	| a29k-* \
+	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* \
-	| m32r-* \
+	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
 	| tron-* \
-	| v850-* | v850e-* | vax-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -359,6 +456,9 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -373,9 +473,6 @@
 		basic_machine=a29k-none
 		os=-bsd
 		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -399,6 +496,10 @@
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -407,10 +508,35 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -435,12 +561,27 @@
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -463,6 +604,14 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -574,7 +723,6 @@
 	i370-ibm* | ibm*)
 		basic_machine=i370-ibm
 		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
 	i*86v32)
 		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
 		os=-sysv32
@@ -613,6 +761,14 @@
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -624,10 +780,21 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -641,10 +808,6 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -657,10 +820,21 @@
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -725,9 +899,11 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
 		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
@@ -736,9 +912,12 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
 		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
@@ -756,6 +935,14 @@
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -765,6 +952,12 @@
 	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
@@ -794,9 +987,10 @@
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -821,6 +1015,14 @@
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -847,6 +1049,10 @@
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
 	sei)
 		basic_machine=mips-sei
 		os=-seiux
@@ -858,6 +1064,9 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
 	sh64)
 		basic_machine=sh64-unknown
 		;;
@@ -879,6 +1088,9 @@
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -935,17 +1147,9 @@
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
 		;;
 	tx39)
 		basic_machine=mipstx39-unknown
@@ -960,6 +1164,10 @@
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -1003,9 +1211,16 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1014,6 +1229,10 @@
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1033,6 +1252,9 @@
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1049,13 +1271,10 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1099,9 +1318,12 @@
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
@@ -1122,25 +1344,31 @@
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1158,12 +1386,15 @@
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
 		os=`echo $os | sed -e 's|mac|macos|'`
 		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
 	-linux*)
 		os=`echo $os | sed -e 's|linux|linux-gnu|'`
 		;;
@@ -1176,6 +1407,9 @@
 	-opened*)
 		os=-openedition
 		;;
+	-os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1197,6 +1431,9 @@
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1219,6 +1456,9 @@
 	-sinix*)
 		os=-sysv4
 		;;
+	-tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1252,8 +1492,13 @@
 	-aros*)
 		os=-aros
 		;;
-	-kaos*)
-		os=-kaos
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
 		;;
 	-none)
 		;;
@@ -1277,6 +1522,12 @@
 # system, and we'll never get to this point.
 
 case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1286,9 +1537,21 @@
 	arm*-semi)
 		os=-aout
 		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1307,19 +1570,22 @@
 		;;
 	m68000-sun)
 		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
 		;;
 	m68*-cisco)
 		os=-aout
 		;;
+	mep-*)
+		os=-elf
+		;;
 	mips*-cisco)
 		os=-elf
 		;;
 	mips*-*)
 		os=-elf
 		;;
+	or1k-*)
+		os=-elf
+		;;
 	or32-*)
 		os=-coff
 		;;
@@ -1332,9 +1598,15 @@
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1437,7 +1709,7 @@
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)
@@ -1467,9 +1739,15 @@
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
@@ -1494,7 +1772,7 @@
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff -ruN tarsnap-autoconf-1.0.33/config.aux/depcomp tarsnap-autoconf-1.0.34/config.aux/depcomp
--- tarsnap-autoconf-1.0.33/config.aux/depcomp	2012-08-10 00:05:26.000000000 -0700
+++ tarsnap-autoconf-1.0.34/config.aux/depcomp	2013-07-06 14:38:23.000000000 -0700
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-03-27.16; # UTC
+scriptversion=2012-07-12.20; # UTC
 
 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
@@ -74,6 +74,9 @@
 
 rm -f "$tmpdepfile"
 
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
 # Some modes work just like other modes, but use different flags.  We
 # parameterize here, but still list the modes in the big case below,
 # to make depend.m4 easier to write.  Note that we *cannot* use a case
@@ -108,7 +111,7 @@
 fi
 
 if test "$depmode" = xlc; then
-   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
    gccflag=-qmakedep=gcc,-MF
    depmode=gcc
 fi
@@ -142,13 +145,17 @@
   ;;
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
 ## - Don't want to use -MD because we'd like the dependencies to end
 ##   up in a subdir.  Having to rename by hand is ugly.
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
   if test -z "$gccflag"; then
@@ -334,6 +341,79 @@
   rm -f "$tmpdepfile"
   ;;
 
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\' :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
+  tmpdepfile="$base.d"
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir="$base.d-lock"
+  trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0 ; do
+    # mkdir is a portable test-and-set.
+    if mkdir $lockdir 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rm -rf $lockdir
+      break
+    else
+      ## the lock is being held by a different process,
+      ## wait until the winning process is done or we timeout
+      while test -d $lockdir && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
 hp2)
   # The "hp" stanza above does not work with aCC (C++) and HP's ia64
   # compilers, which have integrated preprocessors.  The correct option
diff -ruN tarsnap-autoconf-1.0.33/config.h.in tarsnap-autoconf-1.0.34/config.h.in
--- tarsnap-autoconf-1.0.33/config.h.in	2012-08-10 00:05:25.000000000 -0700
+++ tarsnap-autoconf-1.0.34/config.h.in	2013-07-06 14:38:22.000000000 -0700
@@ -36,9 +36,6 @@
 /* True for systems with POSIX ACL support */
 #undef HAVE_ACL_USER
 
-/* Define to 1 if you have the `asprintf' function. */
-#undef HAVE_ASPRINTF
-
 /* Define to 1 if you have the <attr/xattr.h> header file. */
 #undef HAVE_ATTR_XATTR_H
 
@@ -60,10 +57,6 @@
 /* Define to 1 if you have the <ctype.h> header file. */
 #undef HAVE_CTYPE_H
 
-/* Define to 1 if you have the declaration of `be64enc', and to 0 if you
-   don't. */
-#undef HAVE_DECL_BE64ENC
-
 /* Define to 1 if you have the declaration of `INT64_MAX', and to 0 if you
    don't. */
 #undef HAVE_DECL_INT64_MAX
@@ -179,9 +172,6 @@
 /* Define to 1 if you have the `futimes' function. */
 #undef HAVE_FUTIMES
 
-/* Define to 1 if you have the `getaddrinfo' function. */
-#undef HAVE_GETADDRINFO
-
 /* Define to 1 if you have the `geteuid' function. */
 #undef HAVE_GETEUID
 
@@ -491,9 +481,6 @@
    */
 #undef HAVE_SYS_DIR_H
 
-/* Define to 1 if you have the <sys/endian.h> header file. */
-#undef HAVE_SYS_ENDIAN_H
-
 /* Define to 1 if you have the <sys/extattr.h> header file. */
 #undef HAVE_SYS_EXTATTR_H
 
diff -ruN tarsnap-autoconf-1.0.33/configure tarsnap-autoconf-1.0.34/configure
--- tarsnap-autoconf-1.0.33/configure	2012-08-10 00:05:27.000000000 -0700
+++ tarsnap-autoconf-1.0.34/configure	2013-07-06 14:38:24.000000000 -0700
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tarsnap 1.0.33.
+# Generated by GNU Autoconf 2.69 for tarsnap 1.0.34.
 #
 # Report bugs to <cperciva@tarsnap.com>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='tarsnap'
 PACKAGE_TARNAME='tarsnap'
-PACKAGE_VERSION='1.0.33'
-PACKAGE_STRING='tarsnap 1.0.33'
+PACKAGE_VERSION='1.0.34'
+PACKAGE_STRING='tarsnap 1.0.34'
 PACKAGE_BUGREPORT='cperciva@tarsnap.com'
 PACKAGE_URL=''
 
@@ -1298,7 +1298,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tarsnap 1.0.33 to adapt to many kinds of systems.
+\`configure' configures tarsnap 1.0.34 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1369,7 +1369,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tarsnap 1.0.33:";;
+     short | recursive ) echo "Configuration of tarsnap 1.0.34:";;
    esac
   cat <<\_ACEOF
 
@@ -1472,7 +1472,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tarsnap configure 1.0.33
+tarsnap configure 1.0.34
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1771,52 +1771,6 @@
 
 } # ac_fn_c_try_link
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_check_func LINENO FUNC VAR
 # ----------------------------------
 # Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2125,6 +2079,52 @@
 
 } # ac_fn_c_find_uintX_t
 
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -2311,7 +2311,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tarsnap $as_me 1.0.33, which was
+It was created by tarsnap $as_me 1.0.34, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3251,7 +3251,7 @@
 
 # Define the identity of the package.
  PACKAGE='tarsnap'
- VERSION='1.0.33'
+ VERSION='1.0.34'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3308,7 +3308,7 @@
 _ACEOF
 
 
-$as_echo "#define TARVERSION \"1.0.33\"" >>confdefs.h
+$as_echo "#define TARVERSION \"1.0.34\"" >>confdefs.h
 
 
 $as_echo "#define TSSERVER \"betatest\"" >>confdefs.h
@@ -4646,7 +4646,7 @@
 fi
 
 
-# We use asprintf, which is hidden behind _GNU_SOURCE on linux.
+# We use some _GNU_SOURCE bits
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -5565,33 +5565,6 @@
 done
 
 
-# Look for sys/endian.h and be64enc.  Old versions of NetBSD have
-# sys/endian.h but don't have the (le|be)(32|64)(enc|dec) functions in it.
-for ac_header in sys/endian.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_endian_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_ENDIAN_H 1
-_ACEOF
-
-fi
-
-done
-
-ac_fn_c_check_decl "$LINENO" "be64enc" "ac_cv_have_decl_be64enc" "#include <sys/endian.h>
-"
-if test "x$ac_cv_have_decl_be64enc" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_BE64ENC $ac_have_decl
-_ACEOF
-
-
 # Check for clock_gettime.  On some systems, this is provided via librt.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
 $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
@@ -7824,7 +7797,7 @@
 fi
 done
 
-for ac_func in asprintf getaddrinfo lockf posix_memalign qsort_r
+for ac_func in lockf posix_memalign qsort_r
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -8973,7 +8946,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tarsnap $as_me 1.0.33, which was
+This file was extended by tarsnap $as_me 1.0.34, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9039,7 +9012,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tarsnap config.status 1.0.33
+tarsnap config.status 1.0.34
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -ruN tarsnap-autoconf-1.0.33/keygen/keygen.c tarsnap-autoconf-1.0.34/keygen/keygen.c
--- tarsnap-autoconf-1.0.33/keygen/keygen.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/keygen/keygen.c	2013-07-06 14:38:21.000000000 -0700
@@ -13,11 +13,13 @@
 #include <unistd.h>
 
 #include "crypto.h"
+#include "crypto_dh.h"
+#include "crypto_verify_bytes.h"
 #include "humansize.h"
 #include "keyfile.h"
 #include "netpacket.h"
 #include "netproto.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "readpass.h"
 #include "sysendian.h"
 #include "tarsnap_opt.h"
@@ -73,9 +75,7 @@
 	uint64_t maxmem;
 	char * passphrase;
 
-#ifdef NEED_WARN_PROGNAME
-	warn_progname = "tarsnap-keygen";
-#endif
+	WARNP_INIT;
 
 	/* We have no username, machine name, or key filename yet. */
 	C.user = C.name = NULL;
@@ -152,8 +152,7 @@
 	}
 
 	/* Get a password. */
-	if (tarsnap_readpass(&C.passwd, "Enter tarsnap account password",
-	    NULL, 0)) {
+	if (readpass(&C.passwd, "Enter tarsnap account password", NULL, 0)) {
 		warnp("Error reading password");
 		exit(1);
 	}
@@ -168,12 +167,6 @@
 		exit(1);
 	}
 
-	/* Initialize entropy subsystem. */
-	if (crypto_entropy_init()) {
-		warnp("Entropy subsystem initialization failed");
-		goto err1;
-	}
-
 	/* Initialize key cache. */
 	if (crypto_keys_init()) {
 		warnp("Key cache initialization failed");
@@ -186,12 +179,6 @@
 		goto err1;
 	}
 
-	/* Initialize network layer. */
-	if (network_init()) {
-		warnp("Network layer initialization failed");
-		goto err1;
-	}
-
 	/*
 	 * We're not done, haven't answered a challenge, and don't have a
 	 * machine number.
@@ -261,7 +248,7 @@
 
 	/* If the user wants to passphrase the keyfile, get the passphrase. */
 	if (passphrased != 0) {
-		if (tarsnap_readpass(&passphrase,
+		if (readpass(&passphrase,
 		    "Please enter passphrase for keyfile encryption",
 		    "Please confirm passphrase for keyfile encryption", 1)) {
 			warnp("Error reading password");
diff -ruN tarsnap-autoconf-1.0.33/keymgmt/keymgmt.c tarsnap-autoconf-1.0.34/keymgmt/keymgmt.c
--- tarsnap-autoconf-1.0.33/keymgmt/keymgmt.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/keymgmt/keymgmt.c	2013-07-06 14:38:21.000000000 -0700
@@ -41,15 +41,7 @@
 	uint64_t maxmem = 0;
 	char * passphrase;
 
-#ifdef NEED_WARN_PROGNAME
-	warn_progname = "tarsnap-keymgmt";
-#endif
-
-	/* Initialize entropy subsystem. */
-	if (crypto_entropy_init()) {
-		warnp("Entropy subsystem initialization failed");
-		exit(1);
-	}
+	WARNP_INIT;
 
 	/* Initialize key cache. */
 	if (crypto_keys_init()) {
@@ -169,7 +161,7 @@
 
 	/* If the user wants to passphrase the keyfile, get the passphrase. */
 	if (passphrased != 0) {
-		if (tarsnap_readpass(&passphrase,
+		if (readpass(&passphrase,
 		    "Please enter passphrase for keyfile encryption",
 		    "Please confirm passphrase for keyfile encryption", 1)) {
 			warnp("Error reading password");
diff -ruN tarsnap-autoconf-1.0.33/keyregen/keyregen.c tarsnap-autoconf-1.0.34/keyregen/keyregen.c
--- tarsnap-autoconf-1.0.33/keyregen/keyregen.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/keyregen/keyregen.c	2013-07-06 14:38:21.000000000 -0700
@@ -13,11 +13,13 @@
 #include <unistd.h>
 
 #include "crypto.h"
+#include "crypto_dh.h"
+#include "crypto_verify_bytes.h"
 #include "humansize.h"
 #include "keyfile.h"
 #include "netpacket.h"
 #include "netproto.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "readpass.h"
 #include "sysendian.h"
 #include "tarsnap_opt.h"
@@ -75,9 +77,7 @@
 	char * passphrase;
 	uint64_t dummy;
 
-#ifdef NEED_WARN_PROGNAME
-	warn_progname = "tarsnap-rekeygen";
-#endif
+	WARNP_INIT;
 
 	/*
 	 * We have no username, machine name, key filename, or old key
@@ -167,8 +167,7 @@
 	}
 
 	/* Get a password. */
-	if (tarsnap_readpass(&C.passwd, "Enter tarsnap account password",
-	    NULL, 0)) {
+	if (readpass(&C.passwd, "Enter tarsnap account password", NULL, 0)) {
 		warnp("Error reading password");
 		exit(1);
 	}
@@ -183,12 +182,6 @@
 		exit(1);
 	}
 
-	/* Initialize entropy subsystem. */
-	if (crypto_entropy_init()) {
-		warnp("Entropy subsystem initialization failed");
-		goto err1;
-	}
-
 	/* Initialize key cache. */
 	if (crypto_keys_init()) {
 		warnp("Key cache initialization failed");
@@ -222,12 +215,6 @@
 		goto err1;
 	}
 
-	/* Initialize network layer. */
-	if (network_init()) {
-		warnp("Network layer initialization failed");
-		goto err1;
-	}
-
 	/*
 	 * We're not done, haven't answered a challenge, and don't have a
 	 * machine number.
@@ -297,7 +284,7 @@
 
 	/* If the user wants to passphrase the keyfile, get the passphrase. */
 	if (passphrased != 0) {
-		if (tarsnap_readpass(&passphrase,
+		if (readpass(&passphrase,
 		    "Please enter passphrase for keyfile encryption",
 		    "Please confirm passphrase for keyfile encryption", 1)) {
 			warnp("Error reading password");
diff -ruN tarsnap-autoconf-1.0.33/lib/Makefile tarsnap-autoconf-1.0.34/lib/Makefile
--- tarsnap-autoconf-1.0.33/lib/Makefile	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/Makefile	2013-07-06 14:38:21.000000000 -0700
@@ -6,10 +6,6 @@
 
 # Crypto code
 .PATH	:	crypto
-SRCS	+=	crypto_aesctr.c
-SRCS	+=	crypto_dh.c
-SRCS	+=	crypto_dh_group14.c
-SRCS	+=	crypto_entropy.c
 SRCS	+=	crypto_file.c
 SRCS	+=	crypto_hash.c
 SRCS	+=	crypto_keys.c
@@ -19,8 +15,6 @@
 SRCS	+=	crypto_rsa.c
 SRCS	+=	crypto_scrypt-nosse.c
 SRCS	+=	crypto_session.c
-SRCS	+=	crypto_verify_bytes.c
-SRCS	+=	sha256.c
 CFLAGS	+=	-I crypto
 
 # Data structures
@@ -56,11 +50,14 @@
 
 # Non-blocking network routines
 .PATH	:	network
-SRCS	+=	network_buf.c
-SRCS	+=	network_connect.c
-SRCS	+=	network_cork.c
-SRCS	+=	network_select.c
-SRCS	+=	network_writeq.c
+SRCS	+=	tsnetwork_buf.c
+SRCS	+=	tsnetwork_bwlimit.c
+SRCS	+=	tsnetwork_connect.c
+SRCS	+=	tsnetwork_cork.c
+SRCS	+=	tsnetwork_register.c
+SRCS	+=	tsnetwork_select.c
+SRCS	+=	tsnetwork_sleep.c
+SRCS	+=	tsnetwork_writeq.c
 CFLAGS	+=	-I network
 
 # scryptenc code
@@ -71,21 +68,65 @@
 
 # Utility code
 .PATH	:	util
+SRCS	+=	dirutil.c
+SRCS	+=	getfstype.c
+SRCS	+=	hexlink.c
+SRCS	+=	memlimit.c
+SRCS	+=	sigquit.c
+SRCS	+=	tvmath.c
+CFLAGS	+=	-I util
+
+### Bits from libcperciva
+# Fundamental algorithms
+.PATH	:	../libcperciva/alg
+SRCS	+=	sha256.c
+CFLAGS	+=	-I ../libcperciva/alg
+
+# Crypto code
+.PATH	:	../libcperciva/crypto
+SRCS	+=	crypto_aesctr.c
+SRCS	+=	crypto_dh.c
+SRCS	+=	crypto_dh_group14.c
+SRCS	+=	crypto_entropy.c
+SRCS	+=	crypto_verify_bytes.c
+CFLAGS	+=	-I ../libcperciva/crypto
+
+# Data structures
+.PATH	:	../libcperciva/datastruct
+SRCS	+=	elasticarray.c
+SRCS	+=	ptrheap.c
+SRCS	+=	timerqueue.c
+CFLAGS	+=	-I ../libcperciva/datastruct
+
+# Events code
+.PATH	:	../libcperciva/events
+SRCS	+=	events.c
+SRCS	+=	events_immediate.c
+SRCS	+=	events_network.c
+SRCS	+=	events_network_selectstats.c
+SRCS	+=	events_timer.c
+CFLAGS	+=	-I ../libcperciva/events
+
+# Network code
+.PATH	:	../libcperciva/network
+SRCS	+=	network_accept.c
+SRCS	+=	network_buf.c
+SRCS	+=	network_connect.c
+CFLAGS	+=	-I ../libcperciva/network
+
+# Utility code
+.PATH	:	../libcperciva/util
 SRCS	+=	asprintf.c
 SRCS	+=	b64encode.c
-SRCS	+=	dirutil.c
 SRCS	+=	entropy.c
-SRCS	+=	getfstype.c
 SRCS	+=	hexify.c
-SRCS	+=	hexlink.c
 SRCS	+=	humansize.c
-SRCS	+=	memlimit.c
 SRCS	+=	monoclock.c
 SRCS	+=	readpass.c
-SRCS	+=	sigquit.c
-SRCS	+=	tvmath.c
+SRCS	+=	sock.c
+SRCS	+=	sock_util.c
 SRCS	+=	warnp.c
-CFLAGS	+=	-I util
+CFLAGS	+=	-I ../libcperciva/util
 
 # Compiler flags for profiling
 .if defined(PROFILE)
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto.h tarsnap-autoconf-1.0.34/lib/crypto/crypto.h
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto.h	2013-07-06 14:38:21.000000000 -0700
@@ -76,7 +76,11 @@
 #define CRYPTO_FILE_HLEN	(256 + 8)
 #define CRYPTO_FILE_TLEN	32
 
-/* Sizes of Diffie-Hellman private, public, and exchanged keys. */
+/*
+ * Sizes of Diffie-Hellman private, public, and exchanged keys.  These are
+ * defined in libcperciva/crypto/crypto_dh.h, but are also included here as
+ * the sizes are used in places which don't actually do Diffie-Hellman.
+ */
 #define CRYPTO_DH_PRIVLEN	32
 #define CRYPTO_DH_PUBLEN	256
 #define CRYPTO_DH_KEYLEN	256
@@ -85,22 +89,8 @@
 typedef struct crypto_session_internal CRYPTO_SESSION;
 
 /**
- * crypto_entropy_init(void):
- * Initialize the PRNG.
- */
-int crypto_entropy_init(void);
-
-/**
- * crypto_entropy_read(buf, buflen):
- * Fill the buffer with unpredictable bits.  The value ${buflen} must be
- * less than 2^16.
- */
-int crypto_entropy_read(uint8_t *, size_t);
-
-/**
  * crypto_keys_init(void):
- * Initialize the key cache.  Note that crypto_entropy_init MUST be called
- * before this function.
+ * Initialize the key cache.
  */
 int crypto_keys_init(void);
 
@@ -211,31 +201,6 @@
 int crypto_file_dec(const uint8_t *, size_t, uint8_t *);
 
 /**
- * crypto_dh_generate(pub, priv):
- * Generate a 256-bit private key ${priv}, and compute ${pub} equal to
- * 2^(2^258 + ${priv}) mod p where p is the Diffie-Hellman group #14 modulus.
- * Both values are stored as big-endian integers.
- */
-int crypto_dh_generate(uint8_t[CRYPTO_DH_PUBLEN], uint8_t[CRYPTO_DH_PRIVLEN]);
-
-/**
- * crypto_dh_compute(pub, priv, key):
- * In the Diffie-Hellman group #14, compute ${pub}^(2^258 + ${priv}) and
- * write the result into ${key}.  All values are big-endian.  Note that the
- * value ${pub} is the public key produced the call to crypto_dh_generate
- * made by the *other* participant in the key exchange.
- */
-int crypto_dh_compute(const uint8_t[CRYPTO_DH_PUBLEN],
-    const uint8_t[CRYPTO_DH_PRIVLEN], uint8_t[CRYPTO_DH_KEYLEN]);
-
-/**
- * crypto_dh_sanitycheck(pub):
- * Sanity-check the Diffie-Hellman public value ${pub} by checking that it
- * is less than the group #14 modulus.  Return 0 if sane, -1 if insane.
- */
-int crypto_dh_sanitycheck(const uint8_t[CRYPTO_DH_PUBLEN]);
-
-/**
  * crypto_session_init(pub, priv, nonce, mkey, encr_write, auth_write,
  *     encr_read, auth_read):
  * Compute K = ${pub}^(2^258 + ${priv}), mkey = MGF1(nonce || K, 48), and
@@ -290,11 +255,4 @@
 int crypto_passwd_to_dh(const char *, const uint8_t[32],
     uint8_t[CRYPTO_DH_PUBLEN], uint8_t[CRYPTO_DH_PRIVLEN]);
 
-/**
- * crypto_verify_bytes(buf0, buf1, len):
- * Return zero if and only if buf0[0 .. len - 1] and buf1[0 .. len - 1] are
- * identical.  Do not leak any information via timing side channels.
- */
-uint8_t crypto_verify_bytes(const uint8_t *, const uint8_t *, size_t);
-
 #endif /* !_CRYPTO_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_aesctr.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_aesctr.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_aesctr.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_aesctr.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,121 +0,0 @@
-/*-
- * Copyright 2007-2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#include "bsdtar_platform.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <openssl/aes.h>
-
-#include "sysendian.h"
-
-#include "crypto_internal.h"
-
-struct crypto_aesctr {
-	AES_KEY * key;
-	uint64_t nonce;
-	uint64_t bytectr;
-	uint8_t buf[16];
-};
-
-/**
- * crypto_aesctr_init(key, nonce):
- * Prepare to encrypt/decrypt data with AES in CTR mode, using the provided
- * expanded key and nonce.  The key provided must remain valid for the
- * lifetime of the stream.
- */
-struct crypto_aesctr *
-crypto_aesctr_init(AES_KEY * key, uint64_t nonce)
-{
-	struct crypto_aesctr * stream;
-
-	/* Allocate memory. */
-	if ((stream = malloc(sizeof(struct crypto_aesctr))) == NULL)
-		goto err0;
-
-	/* Initialize values. */
-	stream->key = key;
-	stream->nonce = nonce;
-	stream->bytectr = 0;
-
-	/* Success! */
-	return (stream);
-
-err0:
-	/* Failure! */
-	return (NULL);
-}
-
-/**
- * crypto_aesctr_stream(stream, inbuf, outbuf, buflen):
- * Generate the next ${buflen} bytes of the AES-CTR stream and xor them with
- * bytes from ${inbuf}, writing the result into ${outbuf}.  If the buffers
- * ${inbuf} and ${outbuf} overlap, they must be identical.
- */
-void
-crypto_aesctr_stream(struct crypto_aesctr * stream, const uint8_t * inbuf,
-    uint8_t * outbuf, size_t buflen)
-{
-	uint8_t pblk[16];
-	size_t pos;
-	int bytemod;
-
-	for (pos = 0; pos < buflen; pos++) {
-		/* How far through the buffer are we? */
-		bytemod = stream->bytectr % 16;
-
-		/* Generate a block of cipherstream if needed. */
-		if (bytemod == 0) {
-			be64enc(pblk, stream->nonce);
-			be64enc(pblk + 8, stream->bytectr / 16);
-			AES_encrypt(pblk, stream->buf, stream->key);
-		}
-
-		/* Encrypt a byte. */
-		outbuf[pos] = inbuf[pos] ^ stream->buf[bytemod];
-
-		/* Move to the next byte of cipherstream. */
-		stream->bytectr += 1;
-	}
-}
-
-/**
- * crypto_aesctr_free(stream):
- * Free the provided stream object.
- */
-void
-crypto_aesctr_free(struct crypto_aesctr * stream)
-{
-	int i;
-
-	/* Zero potentially sensitive information. */
-	for (i = 0; i < 16; i++)
-		stream->buf[i] = 0;
-	stream->bytectr = stream->nonce = 0;
-
-	/* Free the stream. */
-	free(stream);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_dh.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_dh.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_dh.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_dh.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,292 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <string.h>
-
-#include <openssl/bn.h>
-#include <openssl/err.h>
-
-#include "crypto_internal.h"
-#include "warnp.h"
-
-#include "crypto.h"
-
-static int blinded_modexp(uint8_t r[CRYPTO_DH_PUBLEN], BIGNUM * a,
-    const uint8_t priv[CRYPTO_DH_PRIVLEN]);
-
-/* Big-endian representation of 2^256. */
-static uint8_t two_exp_256[] = {
-	0x01,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00,
-	0x00, 0x00, 0x00, 0x00
-};
-
-/**
- * blinded_modexp(r, a, priv):
- * Compute ${r} = ${a}^(2^258 + ${priv}), where ${r} and ${priv} are treated
- * as big-endian integers; and avoid leaking timing data in this process.
- */
-static int
-blinded_modexp(uint8_t r[CRYPTO_DH_PUBLEN], BIGNUM * a,
-    const uint8_t priv[CRYPTO_DH_PRIVLEN])
-{
-	BIGNUM * two_exp_256_bn;
-	BIGNUM * priv_bn;
-	uint8_t blinding[CRYPTO_DH_PRIVLEN];
-	BIGNUM * blinding_bn;
-	BIGNUM * priv_blinded;
-	BIGNUM * m_bn;
-	BN_CTX * ctx;
-	BIGNUM * r1;
-	BIGNUM * r2;
-	size_t rlen;
-
-	/* Construct 2^256 in BN representation. */
-	if ((two_exp_256_bn = BN_bin2bn(two_exp_256, 33, NULL)) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err0;
-	}
-
-	/* Construct 2^258 + ${priv} in BN representation. */
-	if ((priv_bn = BN_bin2bn(priv, CRYPTO_DH_PRIVLEN, NULL)) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err1;
-	}
-	if ((!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
-	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
-	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
-	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn))) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err2;
-	}
-
-	/* Generate blinding exponent. */
-	if (crypto_entropy_read(blinding, CRYPTO_DH_PRIVLEN))
-		goto err2;
-	if ((blinding_bn = BN_bin2bn(blinding,
-	    CRYPTO_DH_PRIVLEN, NULL)) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err2;
-	}
-	if (!BN_add(blinding_bn, blinding_bn, two_exp_256_bn)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err3;
-	}
-
-	/* Generate blinded exponent. */
-	if ((priv_blinded = BN_new()) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err3;
-	}
-	if (!BN_sub(priv_blinded, priv_bn, blinding_bn)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err4;
-	}
-
-	/* Construct group #14 modulus in BN representation. */
-	if ((m_bn = BN_bin2bn(crypto_dh_group14, 256, NULL)) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err4;
-	}
-
-	/* Allocate BN context. */
-	if ((ctx = BN_CTX_new()) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err5;
-	}
-
-	/* Allocate space for storing results of exponentiations. */
-	if ((r1 = BN_new()) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err6;
-	}
-	if ((r2 = BN_new()) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err7;
-	}
-
-	/* Perform modular exponentiations. */
-	if (!BN_mod_exp(r1, a, blinding_bn, m_bn, ctx)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err8;
-	}
-	if (!BN_mod_exp(r2, a, priv_blinded, m_bn, ctx)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err8;
-	}
-
-	/* Compute final result and export to big-endian integer format. */
-	if (!BN_mod_mul(r1, r1, r2, m_bn, ctx)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err8;
-	}
-	rlen = BN_num_bytes(r1);
-	if (rlen > CRYPTO_DH_PUBLEN) {
-		warn0("Exponent result too large!");
-		goto err8;
-	}
-	memset(r, 0, CRYPTO_DH_PUBLEN - rlen);
-	BN_bn2bin(r1, r + CRYPTO_DH_PUBLEN - rlen);
-
-	/* Free space allocated by BN_new. */
-	BN_free(r2);
-	BN_free(r1);
-
-	/* Free context allocated by BN_CTX_new. */
-	BN_CTX_free(ctx);
-
-	/* Free space allocated by BN_bin2bn. */
-	BN_free(m_bn);
-
-	/* Free space allocated by BN_new. */
-	BN_free(priv_blinded);
-
-	/* Free space allocated by BN_bin2bn. */
-	BN_free(blinding_bn);
-	BN_free(priv_bn);
-	BN_free(two_exp_256_bn);
-
-	/* Success! */
-	return (0);
-
-err8:
-	BN_free(r2);
-err7:
-	BN_free(r1);
-err6:
-	BN_CTX_free(ctx);
-err5:
-	BN_free(m_bn);
-err4:
-	BN_free(priv_blinded);
-err3:
-	BN_free(blinding_bn);
-err2:
-	BN_free(priv_bn);
-err1:
-	BN_free(two_exp_256_bn);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * crypto_dh_generate_pub(pub, priv):
- * Compute ${pub} equal to 2^(2^258 + ${priv}) in Diffie-Hellman group #14.
- */
-int
-crypto_dh_generate_pub(uint8_t pub[CRYPTO_DH_PUBLEN],
-    const uint8_t priv[CRYPTO_DH_PRIVLEN])
-{
-	BIGNUM * two;
-
-	/* Generate BN representation for 2. */
-	if ((two = BN_new()) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err0;
-	}
-	if (!BN_set_word(two, 2)) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err1;
-	}
-
-	/* Compute pub = two^(2^258 + priv). */
-	if (blinded_modexp(pub, two, priv))
-		goto err1;
-
-	/* Free storage allocated by BN_new. */
-	BN_free(two);
-
-	/* Success! */
-	return (0);
-
-err1:
-	BN_free(two);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * crypto_dh_generate(pub, priv):
- * Generate a 256-bit private key ${priv}, and compute ${pub} equal to
- * 2^(2^258 + ${priv}) mod p where p is the Diffie-Hellman group #14 modulus.
- * Both values are stored as big-endian integers.
- */
-int
-crypto_dh_generate(uint8_t pub[CRYPTO_DH_PUBLEN],
-    uint8_t priv[CRYPTO_DH_PRIVLEN])
-{
-
-	/* Generate a random private key. */
-	if (crypto_entropy_read(priv, CRYPTO_DH_PRIVLEN))
-		goto err0;
-
-	/* Compute the public key. */
-	if (crypto_dh_generate_pub(pub, priv))
-		goto err0;
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * crypto_dh_compute(pub, priv, key):
- * In the Diffie-Hellman group #14, compute ${pub}^(2^258 + ${priv}) and
- * write the result into ${key}.  All values are big-endian.  Note that the
- * value ${pub} is the public key produced the call to crypto_dh_generate
- * made by the *other* participant in the key exchange.
- */
-int
-crypto_dh_compute(const uint8_t pub[CRYPTO_DH_PUBLEN],
-    const uint8_t priv[CRYPTO_DH_PRIVLEN], uint8_t key[CRYPTO_DH_PUBLEN])
-{
-	BIGNUM * a;
-
-	/* Convert ${pub} into BN representation. */
-	if ((a = BN_bin2bn(pub, CRYPTO_DH_PUBLEN, NULL)) == NULL) {
-		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
-		goto err0;
-	}
-
-	/* Compute key = pub^(2^258 + priv). */
-	if (blinded_modexp(key, a, priv))
-		goto err1;
-
-	/* Free storage allocated by BN_bin2bn. */
-	BN_free(a);
-
-	/* Success! */
-	return (0);
-
-err1:
-	BN_free(a);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * crypto_dh_sanitycheck(pub):
- * Sanity-check the Diffie-Hellman public value ${pub} by checking that it
- * is less than the group #14 modulus.  Return 0 if sane, -1 if insane.
- */
-int
-crypto_dh_sanitycheck(const uint8_t pub[CRYPTO_DH_PUBLEN])
-{
-
-	if (memcmp(pub, crypto_dh_group14, 256) >= 0)
-		return (-1);
-
-	/* Value is sane. */
-	return (0);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_dh_group14.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_dh_group14.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_dh_group14.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_dh_group14.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,48 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stdint.h>
-
-#include "crypto_internal.h"
-
-/**
- * This is the big-endian representation of
- * p = 2^2048 - 2^1984 + 2^64 * floor(2^1918 pi + 124476) - 1
- * where the value 124476 is chosen to be the least positive integer such
- * that both p and (p - 1)/2 are prime.  Diffie-Hellman operations are done
- * in the group of quadratic residues modulo p, and the integer 2 is a
- * generator of this group.
- */
-uint8_t crypto_dh_group14[256] = {
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-	0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34,
-	0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1,
-	0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, 0xcc, 0x74,
-	0x02, 0x0b, 0xbe, 0xa6, 0x3b, 0x13, 0x9b, 0x22,
-	0x51, 0x4a, 0x08, 0x79, 0x8e, 0x34, 0x04, 0xdd,
-	0xef, 0x95, 0x19, 0xb3, 0xcd, 0x3a, 0x43, 0x1b,
-	0x30, 0x2b, 0x0a, 0x6d, 0xf2, 0x5f, 0x14, 0x37,
-	0x4f, 0xe1, 0x35, 0x6d, 0x6d, 0x51, 0xc2, 0x45,
-	0xe4, 0x85, 0xb5, 0x76, 0x62, 0x5e, 0x7e, 0xc6,
-	0xf4, 0x4c, 0x42, 0xe9, 0xa6, 0x37, 0xed, 0x6b,
-	0x0b, 0xff, 0x5c, 0xb6, 0xf4, 0x06, 0xb7, 0xed,
-	0xee, 0x38, 0x6b, 0xfb, 0x5a, 0x89, 0x9f, 0xa5,
-	0xae, 0x9f, 0x24, 0x11, 0x7c, 0x4b, 0x1f, 0xe6,
-	0x49, 0x28, 0x66, 0x51, 0xec, 0xe4, 0x5b, 0x3d,
-	0xc2, 0x00, 0x7c, 0xb8, 0xa1, 0x63, 0xbf, 0x05,
-	0x98, 0xda, 0x48, 0x36, 0x1c, 0x55, 0xd3, 0x9a,
-	0x69, 0x16, 0x3f, 0xa8, 0xfd, 0x24, 0xcf, 0x5f,
-	0x83, 0x65, 0x5d, 0x23, 0xdc, 0xa3, 0xad, 0x96,
-	0x1c, 0x62, 0xf3, 0x56, 0x20, 0x85, 0x52, 0xbb,
-	0x9e, 0xd5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6d,
-	0x67, 0x0c, 0x35, 0x4e, 0x4a, 0xbc, 0x98, 0x04,
-	0xf1, 0x74, 0x6c, 0x08, 0xca, 0x18, 0x21, 0x7c,
-	0x32, 0x90, 0x5e, 0x46, 0x2e, 0x36, 0xce, 0x3b,
-	0xe3, 0x9e, 0x77, 0x2c, 0x18, 0x0e, 0x86, 0x03,
-	0x9b, 0x27, 0x83, 0xa2, 0xec, 0x07, 0xa2, 0x8f,
-	0xb5, 0xc5, 0x5d, 0xf0, 0x6f, 0x4c, 0x52, 0xc9,
-	0xde, 0x2b, 0xcb, 0xf6, 0x95, 0x58, 0x17, 0x18,
-	0x39, 0x95, 0x49, 0x7c, 0xea, 0x95, 0x6a, 0xe5,
-	0x15, 0xd2, 0x26, 0x18, 0x98, 0xfa, 0x05, 0x10,
-	0x15, 0x72, 0x8e, 0x5a, 0x8a, 0xac, 0xaa, 0x68,
-	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
-};
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_entropy.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_entropy.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_entropy.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_entropy.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,201 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stdint.h>
-#include <string.h>
-
-#include "crypto.h"
-#include "entropy.h"
-
-/**
- * This system implements the HMAC_DRBG pseudo-random number generator as
- * specified in section 10.1.2 of the NIST SP 800-90 standard.  In this
- * implementation, the optional personalization_string and additional_input
- * specified in the standard are not implemented.
- */
-
-/* Internal HMAC_DRBG state. */
-static struct {
-	uint8_t Key[32];
-	uint8_t V[32];
-	uint32_t reseed_counter;
-} drbg;
-
-/* Could be as high as 2^48 if we wanted... */
-#define RESEED_INTERVAL	256
-
-/* Limited to 2^16 by specification. */
-#define GENERATE_MAXLEN	65536
-
-static int instantiate(void);
-static void update(uint8_t *, size_t);
-static int reseed(void);
-static void generate(uint8_t * buf, size_t buflen);
-
-/**
- * instantiate(void):
- * Initialize the DRBG state.  (Section 10.1.2.3)
- */
-static int
-instantiate(void)
-{
-	uint8_t seed_material[48];
-
-	/* Obtain random seed_material = (entropy_input || nonce). */
-	if (entropy_read(seed_material, 48))
-		return (-1);
-
-	/* Initialize Key, V, and reseed_counter. */
-	memset(drbg.Key, 0x00, 32);
-	memset(drbg.V, 0x01, 32);
-	drbg.reseed_counter = 1;
-
-	/* Mix the random seed into the state. */
-	update(seed_material, 48);
-
-	/* Clean the stack. */
-	memset(seed_material, 0, 48);
-
-	/* Success! */
-	return (0);
-}
-
-/**
- * update(data, datalen):
- * Update the DRBG state using the provided data.  (Section 10.1.2.2)
- */
-static void
-update(uint8_t * data, size_t datalen)
-{
-	uint8_t K[32];
-	uint8_t Vx[33];
-
-	/* Load (Key, V) into (K, Vx). */
-	memcpy(K, drbg.Key, 32);
-	memcpy(Vx, drbg.V, 32);
-
-	/* K <- HMAC(K, V || 0x00 || data). */
-	Vx[32] = 0x00;
-	crypto_hash_data_key_2(K, 32, Vx, 33, data, datalen, K);
-
-	/* V <- HMAC(K, V). */
-	crypto_hash_data_key(K, 32, Vx, 32, Vx);
-
-	/* If the provided data is non-Null, perform another mixing stage. */
-	if (datalen != 0) {
-		/* K <- HMAC(K, V || 0x01 || data). */
-		Vx[32] = 0x01;
-		crypto_hash_data_key_2(K, 32, Vx, 33, data, datalen, K);
-
-		/* V <- HMAC(K, V). */
-		crypto_hash_data_key(K, 32, Vx, 32, Vx);
-	}
-
-	/* Copy (K, Vx) back to (Key, V). */
-	memcpy(drbg.Key, K, 32);
-	memcpy(drbg.V, Vx, 32);
-
-	/* Clean the stack. */
-	memset(K, 0, 32);
-	memset(Vx, 0, 33);
-}
-
-/**
- * reseed(void):
- * Reseed the DRBG state (mix in new entropy).  (Section 10.1.2.4)
- */
-static int
-reseed(void)
-{
-	uint8_t seed_material[32];
-
-	/* Obtain random seed_material = entropy_input. */
-	if (entropy_read(seed_material, 32))
-		return (-1);
-
-	/* Mix the random seed into the state. */
-	update(seed_material, 32);
-
-	/* Reset the reseed_counter. */
-	drbg.reseed_counter = 1;
-
-	/* Clean the stack. */
-	memset(seed_material, 0, 32);
-
-	/* Success! */
-	return (0);
-}
-
-/**
- * generate(buf, buflen):
- * Fill the provided buffer with random bits, assuming that reseed_counter
- * is less than RESEED_INTERVAL (the caller is responsible for calling
- * reseed() as needed) and ${buflen} is less than 2^16 (the caller is
- * responsible for splitting up larger requests).  (Section 10.1.2.5)
- */
-static void
-generate(uint8_t * buf, size_t buflen)
-{
-	size_t bufpos;
-
-	/* Iterate until we've filled the buffer. */
-	for (bufpos = 0; bufpos < buflen; bufpos += 32) {
-		crypto_hash_data_key(drbg.Key, 32, drbg.V, 32, drbg.V);
-		if (buflen - bufpos >= 32)
-			memcpy(&buf[bufpos], drbg.V, 32);
-		else
-			memcpy(&buf[bufpos], drbg.V, buflen - bufpos);
-	}
-
-	/* Mix up state. */
-	update(NULL, 0);
-
-	/* We're one data-generation step closer to needing a reseed. */
-	drbg.reseed_counter += 1;
-}
-
-/**
- * crypto_entropy_init(void):
- * Initialize the PRNG.
- */
-int
-crypto_entropy_init(void)
-{
-
-	/* Initialize the DRBG. */
-	return (instantiate());
-}
-
-/**
- * crypto_entropy_read(buf, buflen):
- * Fill the buffer with unpredictable bits.
- */
-int
-crypto_entropy_read(uint8_t * buf, size_t buflen)
-{
-	size_t bytes_to_provide;
-
-	/* Loop until we've filled the buffer. */
-	while (buflen > 0) {
-		/* Do we need to reseed? */
-		if (drbg.reseed_counter > RESEED_INTERVAL) {
-			if (reseed())
-				return (-1);
-		}
-
-		/* How much data are we generating in this step? */
-		if (buflen > GENERATE_MAXLEN)
-			bytes_to_provide = GENERATE_MAXLEN;
-		else
-			bytes_to_provide = buflen;
-
-		/* Generate bytes. */
-		generate(buf, bytes_to_provide);
-
-		/* We've done part of the buffer. */
-		buf += bytes_to_provide;
-		buflen -= bytes_to_provide;
-	}
-
-	/* Success! */
-	return (0);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_file.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_file.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_file.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_file.c	2013-07-06 14:38:21.000000000 -0700
@@ -1,14 +1,19 @@
 #include "bsdtar_platform.h"
 
+#include <stdlib.h>
 #include <string.h>
 
 #include <openssl/aes.h>
 
-#include "crypto_internal.h"
-#include "rwhashtab.h"
+#include "crypto_aesctr.h"
+#include "crypto_entropy.h"
+#include "crypto_verify_bytes.h"
 #include "sysendian.h"
 #include "warnp.h"
 
+#include "crypto_internal.h"
+#include "rwhashtab.h"
+
 #include "crypto.h"
 
 struct crypto_aes_key {
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_internal.h tarsnap-autoconf-1.0.34/lib/crypto/crypto_internal.h
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_internal.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -11,9 +11,6 @@
 	uint8_t * key;
 };
 
-/* Diffie-Hellman group #14, from RFC 3526. */
-extern uint8_t crypto_dh_group14[];
-
 /**
  * crypto_keys_lookup_RSA(key):
  * Return the requested RSA key.
@@ -97,34 +94,4 @@
  */
 void crypto_MGF1(uint8_t *, size_t, uint8_t *, size_t);
 
-/**
- * crypto_dh_generate_pub(pub, priv):
- * Compute ${pub} equal to 2^(2^258 + ${priv}) in Diffie-Hellman group #14.
- */
-int crypto_dh_generate_pub(uint8_t[ /* CRYPTO_DH_PUBLEN */ ],
-    const uint8_t[ /* CRYPTO_DH_PRIVLEN */ ]);
-
-/**
- * crypto_aesctr_init(key, nonce):
- * Prepare to encrypt/decrypt data with AES in CTR mode, using the provided
- * expanded key and nonce.  The key provided must remain valid for the
- * lifetime of the stream.
- */
-struct crypto_aesctr * crypto_aesctr_init(AES_KEY *, uint64_t);
-
-/**
- * crypto_aesctr_stream(stream, inbuf, outbuf, buflen):
- * Generate the next ${buflen} bytes of the AES-CTR stream and xor them with
- * bytes from ${inbuf}, writing the result into ${outbuf}.  If the buffers
- * ${inbuf} and ${outbuf} overlap, they must be identical.
- */
-void crypto_aesctr_stream(struct crypto_aesctr *, const uint8_t *,
-    uint8_t *, size_t);
-
-/**
- * crypto_aesctr_free(stream):
- * Free the provided stream object.
- */
-void crypto_aesctr_free(struct crypto_aesctr *);
-
 #endif /* !_CRYPTO_INTERNAL_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_keys.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_keys.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_keys.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_keys.c	2013-07-06 14:38:21.000000000 -0700
@@ -8,6 +8,7 @@
 #include <openssl/err.h>
 #include <openssl/rand.h>
 
+#include "crypto_entropy.h"
 #include "sysendian.h"
 #include "warnp.h"
 
@@ -30,12 +31,15 @@
 	struct crypto_hmac_key * auth_delete;
 } keycache;
 
-/* External key data format. */
-struct keyheader {
-	uint8_t len[4];	/* Length of key data, little-endian. */
-	uint8_t type;	/* Key type. */
-	/* Key data, in key-specific format. */
-};
+/*
+ * External key data format:
+ * 4 byte little-endian integer = length of key data
+ * 1 byte = key type
+ * N bytes = key data, in key-specific format
+ */
+#define KEYHEADER_OFFSET_LEN	0
+#define KEYHEADER_OFFSET_TYPE	4
+#define KEYHEADER_LEN	5
 
 /* Amount of entropy to use for seeding OpenSSL. */
 #define RANDBUFLEN	2048
@@ -157,31 +161,33 @@
 int
 crypto_keys_import(const uint8_t * buf, size_t buflen, int keys)
 {
-	const struct keyheader * kh;
+	const uint8_t * kh;
 	uint32_t len;
+	uint8_t type;
 
 	/* Loop until we've processed all the provided data. */
 	while (buflen) {
-		/* We must have at least a struct keyheader. */
-		if (buflen < sizeof(struct keyheader)) {
+		/* We must have at least a key header. */
+		if (buflen < KEYHEADER_LEN) {
 			warn0("Unexpected EOF of key data");
 			goto err0;
 		}
 
 		/* Parse header. */
-		kh = (const struct keyheader *)buf;
-		buf += sizeof(struct keyheader);
-		buflen -= sizeof(struct keyheader);
+		kh = buf;
+		buf += KEYHEADER_LEN;
+		buflen -= KEYHEADER_LEN;
 
 		/* Sanity check length. */
-		len = le32dec(kh->len);
+		len = le32dec(&kh[KEYHEADER_OFFSET_LEN]);
 		if (len > buflen) {
 			warn0("Unexpected EOF of key data");
 			goto err0;
 		}
 
 		/* Parse the key. */
-		switch (kh->type) {
+		type = kh[KEYHEADER_OFFSET_TYPE];
+		switch (type) {
 		case CRYPTO_KEY_SIGN_PRIV:
 			if ((keys & CRYPTO_KEYMASK_SIGN_PRIV) &&
 			    crypto_keys_subr_import_RSA_priv(
@@ -259,7 +265,7 @@
 				goto err0;
 			break;
 		default:
-			warn0("Unrecognized key type: %d", kh->type);
+			warn0("Unrecognized key type: %d", type);
 			goto err0;
 		}
 
@@ -360,7 +366,7 @@
 int
 crypto_keys_export(int keys, uint8_t ** buf, size_t * buflen)
 {
-	struct keyheader * kh;
+	uint8_t * kh;
 	size_t bufpos;
 	uint32_t len;
 	int key;
@@ -380,11 +386,11 @@
 			goto err0;
 		}
 		*buflen += len;
-		if (*buflen > *buflen + sizeof(struct keyheader)) {
+		if (*buflen > *buflen + KEYHEADER_LEN) {
 			errno = ENOMEM;
 			goto err0;
 		}
-		*buflen += sizeof(struct keyheader);
+		*buflen += KEYHEADER_LEN;
 	}
 
 	/* Allocate memory. */
@@ -396,25 +402,25 @@
 	for (key = 0; key < (int)(sizeof(int) * 8); key++)
 	    if ((keys >> key) & 1) {
 		/* Sanity check remaining buffer length. */
-		if (*buflen - bufpos < sizeof(struct keyheader)) {
+		if (*buflen - bufpos < KEYHEADER_LEN) {
 			warn0("Programmer error");
 			goto err1;
 		}
 
 		/* Export key. */
 		len = export_key(key,
-		    *buf + (bufpos + sizeof(struct keyheader)),
-		    *buflen - (bufpos + sizeof(struct keyheader)));
+		    *buf + (bufpos + KEYHEADER_LEN),
+		    *buflen - (bufpos + KEYHEADER_LEN));
 		if (len == (uint32_t)(-1))
 			goto err1;
 
 		/* Write key header. */
-		kh = (struct keyheader *)(*buf + bufpos);
-		kh->type = key;
-		le32enc(kh->len, len);
+		kh = *buf + bufpos;
+		le32enc(&kh[KEYHEADER_OFFSET_LEN], len);
+		kh[KEYHEADER_OFFSET_TYPE] = key;
 
 		/* Advance buffer position. */
-		bufpos += sizeof(struct keyheader) + len;
+		bufpos += KEYHEADER_LEN + len;
 	}
 
 	/* Sanity-check -- we should have filled the buffer. */
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_keys_subr.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_keys_subr.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_keys_subr.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_keys_subr.c	2013-07-06 14:38:21.000000000 -0700
@@ -10,7 +10,7 @@
 #include <openssl/rand.h>
 #include <openssl/rsa.h>
 
-#include "crypto.h"
+#include "crypto_entropy.h"
 #include "sysendian.h"
 #include "warnp.h"
 
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_passwd_to_dh.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_passwd_to_dh.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_passwd_to_dh.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_passwd_to_dh.c	2013-07-06 14:38:21.000000000 -0700
@@ -2,7 +2,7 @@
 
 #include <string.h>
 
-#include "crypto_internal.h"
+#include "crypto_dh.h"
 #include "ctassert.h"
 
 #include "crypto.h"
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_rsa.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_rsa.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_rsa.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_rsa.c	2013-07-06 14:38:21.000000000 -0700
@@ -7,10 +7,13 @@
 #include <openssl/err.h>
 #include <openssl/rsa.h>
 
-#include "crypto_internal.h"
+#include "crypto_entropy.h"
+#include "crypto_verify_bytes.h"
 #include "sysendian.h"
 #include "warnp.h"
 
+#include "crypto_internal.h"
+
 #include "crypto.h"
 
 /**
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_scrypt-nosse.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_scrypt-nosse.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_scrypt-nosse.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_scrypt-nosse.c	2013-07-06 14:38:21.000000000 -0700
@@ -41,18 +41,18 @@
 
 #include "crypto_scrypt.h"
 
-static void blkcpy(void *, void *, size_t);
-static void blkxor(void *, void *, size_t);
+static void blkcpy(void *, const void *, size_t);
+static void blkxor(void *, const void *, size_t);
 static void salsa20_8(uint32_t[16]);
-static void blockmix_salsa8(uint32_t *, uint32_t *, uint32_t *, size_t);
-static uint64_t integerify(void *, size_t);
+static void blockmix_salsa8(const uint32_t *, uint32_t *, uint32_t *, size_t);
+static uint64_t integerify(const void *, size_t);
 static void smix(uint8_t *, size_t, uint64_t, uint32_t *, uint32_t *);
 
 static void
-blkcpy(void * dest, void * src, size_t len)
+blkcpy(void * dest, const void * src, size_t len)
 {
 	size_t * D = dest;
-	size_t * S = src;
+	const size_t * S = src;
 	size_t L = len / sizeof(size_t);
 	size_t i;
 
@@ -61,10 +61,10 @@
 }
 
 static void
-blkxor(void * dest, void * src, size_t len)
+blkxor(void * dest, const void * src, size_t len)
 {
 	size_t * D = dest;
-	size_t * S = src;
+	const size_t * S = src;
 	size_t L = len / sizeof(size_t);
 	size_t i;
 
@@ -123,7 +123,7 @@
  * temporary space X must be 64 bytes.
  */
 static void
-blockmix_salsa8(uint32_t * Bin, uint32_t * Bout, uint32_t * X, size_t r)
+blockmix_salsa8(const uint32_t * Bin, uint32_t * Bout, uint32_t * X, size_t r)
 {
 	size_t i;
 
@@ -155,9 +155,9 @@
  * Return the result of parsing B_{2r-1} as a little-endian integer.
  */
 static uint64_t
-integerify(void * B, size_t r)
+integerify(const void * B, size_t r)
 {
-	uint32_t * X = (void *)((uintptr_t)(B) + (2 * r - 1) * 64);
+	const uint32_t * X = (const void *)((uintptr_t)(B) + (2 * r - 1) * 64);
 
 	return (((uint64_t)(X[1]) << 32) + X[0]);
 }
@@ -232,13 +232,14 @@
  */
 int
 crypto_scrypt(const uint8_t * passwd, size_t passwdlen,
-    const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p,
+    const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t _r, uint32_t _p,
     uint8_t * buf, size_t buflen)
 {
 	void * B0, * V0, * XY0;
 	uint8_t * B;
 	uint32_t * V;
 	uint32_t * XY;
+	size_t r = _r, p = _p;
 	uint32_t i;
 
 	/* Sanity-check parameters. */
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_scrypt-sse.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_scrypt-sse.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_scrypt-sse.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_scrypt-sse.c	2013-07-06 14:38:21.000000000 -0700
@@ -42,18 +42,18 @@
 
 #include "crypto_scrypt.h"
 
-static void blkcpy(void *, void *, size_t);
-static void blkxor(void *, void *, size_t);
+static void blkcpy(void *, const void *, size_t);
+static void blkxor(void *, const void *, size_t);
 static void salsa20_8(__m128i *);
-static void blockmix_salsa8(__m128i *, __m128i *, __m128i *, size_t);
-static uint64_t integerify(void *, size_t);
+static void blockmix_salsa8(const __m128i *, __m128i *, __m128i *, size_t);
+static uint64_t integerify(const void *, size_t);
 static void smix(uint8_t *, size_t, uint64_t, void *, void *);
 
 static void
-blkcpy(void * dest, void * src, size_t len)
+blkcpy(void * dest, const void * src, size_t len)
 {
 	__m128i * D = dest;
-	__m128i * S = src;
+	const __m128i * S = src;
 	size_t L = len / 16;
 	size_t i;
 
@@ -62,10 +62,10 @@
 }
 
 static void
-blkxor(void * dest, void * src, size_t len)
+blkxor(void * dest, const void * src, size_t len)
 {
 	__m128i * D = dest;
-	__m128i * S = src;
+	const __m128i * S = src;
 	size_t L = len / 16;
 	size_t i;
 
@@ -142,7 +142,7 @@
  * temporary space X must be 64 bytes.
  */
 static void
-blockmix_salsa8(__m128i * Bin, __m128i * Bout, __m128i * X, size_t r)
+blockmix_salsa8(const __m128i * Bin, __m128i * Bout, __m128i * X, size_t r)
 {
 	size_t i;
 
@@ -174,9 +174,9 @@
  * Return the result of parsing B_{2r-1} as a little-endian integer.
  */
 static uint64_t
-integerify(void * B, size_t r)
+integerify(const void * B, size_t r)
 {
-	uint32_t * X = (void *)((uintptr_t)(B) + (2 * r - 1) * 64);
+	const uint32_t * X = (const void *)((uintptr_t)(B) + (2 * r - 1) * 64);
 
 	return (((uint64_t)(X[13]) << 32) + X[0]);
 }
@@ -260,13 +260,14 @@
  */
 int
 crypto_scrypt(const uint8_t * passwd, size_t passwdlen,
-    const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p,
+    const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t _r, uint32_t _p,
     uint8_t * buf, size_t buflen)
 {
 	void * B0, * V0, * XY0;
 	uint8_t * B;
 	uint32_t * V;
 	uint32_t * XY;
+	size_t r = _r, p = _p;
 	uint32_t i;
 
 	/* Sanity-check parameters. */
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_session.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_session.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_session.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_session.c	2013-07-06 14:38:21.000000000 -0700
@@ -6,10 +6,14 @@
 
 #include <openssl/aes.h>
 
-#include "crypto_internal.h"
+#include "crypto_aesctr.h"
+#include "crypto_dh.h"
+#include "crypto_verify_bytes.h"
 #include "sysendian.h"
 #include "warnp.h"
 
+#include "crypto_internal.h"
+
 #include "crypto.h"
 
 struct crypto_session_internal {
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/crypto_verify_bytes.c tarsnap-autoconf-1.0.34/lib/crypto/crypto_verify_bytes.c
--- tarsnap-autoconf-1.0.33/lib/crypto/crypto_verify_bytes.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/crypto_verify_bytes.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,22 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stdint.h>
-
-#include "crypto.h"
-
-/**
- * crypto_verify_bytes(buf0, buf1, len):
- * Return zero if and only if buf0[0 .. len - 1] and buf1[0 .. len - 1] are
- * identical.  Do not leak any information via timing side channels.
- */
-uint8_t
-crypto_verify_bytes(const uint8_t * buf0, const uint8_t * buf1, size_t len)
-{
-	uint8_t rc = 0;
-	size_t i;
-
-	for (i = 0; i < len; i++)
-		rc = rc | (buf0[i] ^ buf1[i]);
-
-	return (rc);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/sha256.c tarsnap-autoconf-1.0.34/lib/crypto/sha256.c
--- tarsnap-autoconf-1.0.33/lib/crypto/sha256.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/sha256.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,416 +0,0 @@
-/*-
- * Copyright 2005,2007,2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#include "bsdtar_platform.h"
-
-#include <sys/types.h>
-
-#include <stdint.h>
-#include <string.h>
-
-#include "sysendian.h"
-
-#include "sha256.h"
-
-/*
- * Encode a length len/4 vector of (uint32_t) into a length len vector of
- * (unsigned char) in big-endian form.  Assumes len is a multiple of 4.
- */
-static void
-be32enc_vect(unsigned char *dst, const uint32_t *src, size_t len)
-{
-	size_t i;
-
-	for (i = 0; i < len / 4; i++)
-		be32enc(dst + i * 4, src[i]);
-}
-
-/*
- * Decode a big-endian length len vector of (unsigned char) into a length
- * len/4 vector of (uint32_t).  Assumes len is a multiple of 4.
- */
-static void
-be32dec_vect(uint32_t *dst, const unsigned char *src, size_t len)
-{
-	size_t i;
-
-	for (i = 0; i < len / 4; i++)
-		dst[i] = be32dec(src + i * 4);
-}
-
-/* Elementary functions used by SHA256 */
-#define Ch(x, y, z)	((x & (y ^ z)) ^ z)
-#define Maj(x, y, z)	((x & (y | z)) | (y & z))
-#define SHR(x, n)	(x >> n)
-#define ROTR(x, n)	((x >> n) | (x << (32 - n)))
-#define S0(x)		(ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
-#define S1(x)		(ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
-#define s0(x)		(ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))
-#define s1(x)		(ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))
-
-/* SHA256 round function */
-#define RND(a, b, c, d, e, f, g, h, k)			\
-	t0 = h + S1(e) + Ch(e, f, g) + k;		\
-	t1 = S0(a) + Maj(a, b, c);			\
-	d += t0;					\
-	h  = t0 + t1;
-
-/* Adjusted round function for rotating state */
-#define RNDr(S, W, i, k)			\
-	RND(S[(64 - i) % 8], S[(65 - i) % 8],	\
-	    S[(66 - i) % 8], S[(67 - i) % 8],	\
-	    S[(68 - i) % 8], S[(69 - i) % 8],	\
-	    S[(70 - i) % 8], S[(71 - i) % 8],	\
-	    W[i] + k)
-
-/*
- * SHA256 block compression function.  The 256-bit state is transformed via
- * the 512-bit input block to produce a new state.
- */
-static void
-SHA256_Transform(uint32_t * state, const unsigned char block[64])
-{
-	uint32_t W[64];
-	uint32_t S[8];
-	uint32_t t0, t1;
-	int i;
-
-	/* 1. Prepare message schedule W. */
-	be32dec_vect(W, block, 64);
-	for (i = 16; i < 64; i++)
-		W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16];
-
-	/* 2. Initialize working variables. */
-	memcpy(S, state, 32);
-
-	/* 3. Mix. */
-	RNDr(S, W, 0, 0x428a2f98);
-	RNDr(S, W, 1, 0x71374491);
-	RNDr(S, W, 2, 0xb5c0fbcf);
-	RNDr(S, W, 3, 0xe9b5dba5);
-	RNDr(S, W, 4, 0x3956c25b);
-	RNDr(S, W, 5, 0x59f111f1);
-	RNDr(S, W, 6, 0x923f82a4);
-	RNDr(S, W, 7, 0xab1c5ed5);
-	RNDr(S, W, 8, 0xd807aa98);
-	RNDr(S, W, 9, 0x12835b01);
-	RNDr(S, W, 10, 0x243185be);
-	RNDr(S, W, 11, 0x550c7dc3);
-	RNDr(S, W, 12, 0x72be5d74);
-	RNDr(S, W, 13, 0x80deb1fe);
-	RNDr(S, W, 14, 0x9bdc06a7);
-	RNDr(S, W, 15, 0xc19bf174);
-	RNDr(S, W, 16, 0xe49b69c1);
-	RNDr(S, W, 17, 0xefbe4786);
-	RNDr(S, W, 18, 0x0fc19dc6);
-	RNDr(S, W, 19, 0x240ca1cc);
-	RNDr(S, W, 20, 0x2de92c6f);
-	RNDr(S, W, 21, 0x4a7484aa);
-	RNDr(S, W, 22, 0x5cb0a9dc);
-	RNDr(S, W, 23, 0x76f988da);
-	RNDr(S, W, 24, 0x983e5152);
-	RNDr(S, W, 25, 0xa831c66d);
-	RNDr(S, W, 26, 0xb00327c8);
-	RNDr(S, W, 27, 0xbf597fc7);
-	RNDr(S, W, 28, 0xc6e00bf3);
-	RNDr(S, W, 29, 0xd5a79147);
-	RNDr(S, W, 30, 0x06ca6351);
-	RNDr(S, W, 31, 0x14292967);
-	RNDr(S, W, 32, 0x27b70a85);
-	RNDr(S, W, 33, 0x2e1b2138);
-	RNDr(S, W, 34, 0x4d2c6dfc);
-	RNDr(S, W, 35, 0x53380d13);
-	RNDr(S, W, 36, 0x650a7354);
-	RNDr(S, W, 37, 0x766a0abb);
-	RNDr(S, W, 38, 0x81c2c92e);
-	RNDr(S, W, 39, 0x92722c85);
-	RNDr(S, W, 40, 0xa2bfe8a1);
-	RNDr(S, W, 41, 0xa81a664b);
-	RNDr(S, W, 42, 0xc24b8b70);
-	RNDr(S, W, 43, 0xc76c51a3);
-	RNDr(S, W, 44, 0xd192e819);
-	RNDr(S, W, 45, 0xd6990624);
-	RNDr(S, W, 46, 0xf40e3585);
-	RNDr(S, W, 47, 0x106aa070);
-	RNDr(S, W, 48, 0x19a4c116);
-	RNDr(S, W, 49, 0x1e376c08);
-	RNDr(S, W, 50, 0x2748774c);
-	RNDr(S, W, 51, 0x34b0bcb5);
-	RNDr(S, W, 52, 0x391c0cb3);
-	RNDr(S, W, 53, 0x4ed8aa4a);
-	RNDr(S, W, 54, 0x5b9cca4f);
-	RNDr(S, W, 55, 0x682e6ff3);
-	RNDr(S, W, 56, 0x748f82ee);
-	RNDr(S, W, 57, 0x78a5636f);
-	RNDr(S, W, 58, 0x84c87814);
-	RNDr(S, W, 59, 0x8cc70208);
-	RNDr(S, W, 60, 0x90befffa);
-	RNDr(S, W, 61, 0xa4506ceb);
-	RNDr(S, W, 62, 0xbef9a3f7);
-	RNDr(S, W, 63, 0xc67178f2);
-
-	/* 4. Mix local working variables into global state. */
-	for (i = 0; i < 8; i++)
-		state[i] += S[i];
-
-	/* Clean the stack. */
-	memset(W, 0, 256);
-	memset(S, 0, 32);
-	t0 = t1 = 0;
-}
-
-static unsigned char PAD[64] = {
-	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-/* Add padding and terminating bit-count. */
-static void
-SHA256_Pad(SHA256_CTX * ctx)
-{
-	unsigned char len[8];
-	uint32_t r, plen;
-
-	/*
-	 * Convert length to a vector of bytes -- we do this now rather
-	 * than later because the length will change after we pad.
-	 */
-	be32enc_vect(len, ctx->count, 8);
-
-	/* Add 1--64 bytes so that the resulting length is 56 mod 64. */
-	r = (ctx->count[1] >> 3) & 0x3f;
-	plen = (r < 56) ? (56 - r) : (120 - r);
-	SHA256_Update(ctx, PAD, (size_t)plen);
-
-	/* Add the terminating bit-count. */
-	SHA256_Update(ctx, len, 8);
-}
-
-/* SHA-256 initialization.  Begins a SHA-256 operation. */
-void
-SHA256_Init(SHA256_CTX * ctx)
-{
-
-	/* Zero bits processed so far. */
-	ctx->count[0] = ctx->count[1] = 0;
-
-	/* Magic initialization constants. */
-	ctx->state[0] = 0x6A09E667;
-	ctx->state[1] = 0xBB67AE85;
-	ctx->state[2] = 0x3C6EF372;
-	ctx->state[3] = 0xA54FF53A;
-	ctx->state[4] = 0x510E527F;
-	ctx->state[5] = 0x9B05688C;
-	ctx->state[6] = 0x1F83D9AB;
-	ctx->state[7] = 0x5BE0CD19;
-}
-
-/* Add bytes into the hash. */
-void
-SHA256_Update(SHA256_CTX * ctx, const void *in, size_t len)
-{
-	uint32_t bitlen[2];
-	uint32_t r;
-	const unsigned char *src = in;
-
-	/* Return immediately if we have nothing to do. */
-	if (len == 0)
-		return;
-
-	/* Number of bytes left in the buffer from previous updates. */
-	r = (ctx->count[1] >> 3) & 0x3f;
-
-	/* Convert the length into a number of bits. */
-	bitlen[1] = ((uint32_t)len) << 3;
-	bitlen[0] = (uint32_t)(len >> 29);
-
-	/* Update number of bits. */
-	if ((ctx->count[1] += bitlen[1]) < bitlen[1])
-		ctx->count[0]++;
-	ctx->count[0] += bitlen[0];
-
-	/* Handle the case where we don't need to perform any transforms. */
-	if (len < 64 - r) {
-		memcpy(&ctx->buf[r], src, len);
-		return;
-	}
-
-	/* Finish the current block. */
-	memcpy(&ctx->buf[r], src, 64 - r);
-	SHA256_Transform(ctx->state, ctx->buf);
-	src += 64 - r;
-	len -= 64 - r;
-
-	/* Perform complete blocks. */
-	while (len >= 64) {
-		SHA256_Transform(ctx->state, src);
-		src += 64;
-		len -= 64;
-	}
-
-	/* Copy left over data into buffer. */
-	memcpy(ctx->buf, src, len);
-}
-
-/*
- * SHA-256 finalization.  Pads the input data, exports the hash value,
- * and clears the context state.
- */
-void
-SHA256_Final(unsigned char digest[32], SHA256_CTX * ctx)
-{
-
-	/* Add padding. */
-	SHA256_Pad(ctx);
-
-	/* Write the hash. */
-	be32enc_vect(digest, ctx->state, 32);
-
-	/* Clear the context state. */
-	memset((void *)ctx, 0, sizeof(*ctx));
-}
-
-/* Initialize an HMAC-SHA256 operation with the given key. */
-void
-HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
-{
-	unsigned char pad[64];
-	unsigned char khash[32];
-	const unsigned char * K = _K;
-	size_t i;
-
-	/* If Klen > 64, the key is really SHA256(K). */
-	if (Klen > 64) {
-		SHA256_Init(&ctx->ictx);
-		SHA256_Update(&ctx->ictx, K, Klen);
-		SHA256_Final(khash, &ctx->ictx);
-		K = khash;
-		Klen = 32;
-	}
-
-	/* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */
-	SHA256_Init(&ctx->ictx);
-	memset(pad, 0x36, 64);
-	for (i = 0; i < Klen; i++)
-		pad[i] ^= K[i];
-	SHA256_Update(&ctx->ictx, pad, 64);
-
-	/* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */
-	SHA256_Init(&ctx->octx);
-	memset(pad, 0x5c, 64);
-	for (i = 0; i < Klen; i++)
-		pad[i] ^= K[i];
-	SHA256_Update(&ctx->octx, pad, 64);
-
-	/* Clean the stack. */
-	memset(khash, 0, 32);
-}
-
-/* Add bytes to the HMAC-SHA256 operation. */
-void
-HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len)
-{
-
-	/* Feed data to the inner SHA256 operation. */
-	SHA256_Update(&ctx->ictx, in, len);
-}
-
-/* Finish an HMAC-SHA256 operation. */
-void
-HMAC_SHA256_Final(unsigned char digest[32], HMAC_SHA256_CTX * ctx)
-{
-	unsigned char ihash[32];
-
-	/* Finish the inner SHA256 operation. */
-	SHA256_Final(ihash, &ctx->ictx);
-
-	/* Feed the inner hash to the outer SHA256 operation. */
-	SHA256_Update(&ctx->octx, ihash, 32);
-
-	/* Finish the outer SHA256 operation. */
-	SHA256_Final(digest, &ctx->octx);
-
-	/* Clean the stack. */
-	memset(ihash, 0, 32);
-}
-
-/**
- * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
- * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
- * write the output to buf.  The value dkLen must be at most 32 * (2^32 - 1).
- */
-void
-PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
-    size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen)
-{
-	HMAC_SHA256_CTX PShctx, hctx;
-	size_t i;
-	uint8_t ivec[4];
-	uint8_t U[32];
-	uint8_t T[32];
-	uint64_t j;
-	int k;
-	size_t clen;
-
-	/* Compute HMAC state after processing P and S. */
-	HMAC_SHA256_Init(&PShctx, passwd, passwdlen);
-	HMAC_SHA256_Update(&PShctx, salt, saltlen);
-
-	/* Iterate through the blocks. */
-	for (i = 0; i * 32 < dkLen; i++) {
-		/* Generate INT(i + 1). */
-		be32enc(ivec, (uint32_t)(i + 1));
-
-		/* Compute U_1 = PRF(P, S || INT(i)). */
-		memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX));
-		HMAC_SHA256_Update(&hctx, ivec, 4);
-		HMAC_SHA256_Final(U, &hctx);
-
-		/* T_i = U_1 ... */
-		memcpy(T, U, 32);
-
-		for (j = 2; j <= c; j++) {
-			/* Compute U_j. */
-			HMAC_SHA256_Init(&hctx, passwd, passwdlen);
-			HMAC_SHA256_Update(&hctx, U, 32);
-			HMAC_SHA256_Final(U, &hctx);
-
-			/* ... xor U_j ... */
-			for (k = 0; k < 32; k++)
-				T[k] ^= U[k];
-		}
-
-		/* Copy as many bytes as necessary into buf. */
-		clen = dkLen - i * 32;
-		if (clen > 32)
-			clen = 32;
-		memcpy(&buf[i * 32], T, clen);
-	}
-
-	/* Clean PShctx, since we never called _Final on it. */
-	memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX));
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/crypto/sha256.h tarsnap-autoconf-1.0.34/lib/crypto/sha256.h
--- tarsnap-autoconf-1.0.33/lib/crypto/sha256.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/crypto/sha256.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,73 +0,0 @@
-/*-
- * Copyright 2005,2007,2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD: src/lib/libmd/sha256.h,v 1.2 2006/01/17 15:35:56 phk Exp $
- */
-
-#ifndef _SHA256_H_
-#define _SHA256_H_
-
-#include <sys/types.h>
-
-#include <stdint.h>
-
-/*
- * Use #defines in order to avoid namespace collisions with anyone else's
- * SHA256 code (e.g., the code in OpenSSL).
- */
-#define SHA256_Init tarsnap_SHA256_Init
-#define SHA256_Update tarsnap_SHA256_Update
-#define SHA256_Final tarsnap_SHA256_Final
-#define HMAC_SHA256_Init tarsnap_HMAC_SHA256_Init
-#define HMAC_SHA256_Update tarsnap_HMAC_SHA256_Update
-#define HMAC_SHA256_Final tarsnap_HMAC_SHA256_Final
-
-typedef struct SHA256Context {
-	uint32_t state[8];
-	uint32_t count[2];
-	unsigned char buf[64];
-} SHA256_CTX;
-
-typedef struct HMAC_SHA256Context {
-	SHA256_CTX ictx;
-	SHA256_CTX octx;
-} HMAC_SHA256_CTX;
-
-void	SHA256_Init(SHA256_CTX *);
-void	SHA256_Update(SHA256_CTX *, const void *, size_t);
-void	SHA256_Final(unsigned char [32], SHA256_CTX *);
-void	HMAC_SHA256_Init(HMAC_SHA256_CTX *, const void *, size_t);
-void	HMAC_SHA256_Update(HMAC_SHA256_CTX *, const void *, size_t);
-void	HMAC_SHA256_Final(unsigned char [32], HMAC_SHA256_CTX *);
-
-/**
- * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
- * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
- * write the output to buf.  The value dkLen must be at most 32 * (2^32 - 1).
- */
-void	PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t,
-    uint64_t, uint8_t *, size_t);
-
-#endif /* !_SHA256_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/datastruct/patricia.c tarsnap-autoconf-1.0.34/lib/datastruct/patricia.c
--- tarsnap-autoconf-1.0.33/lib/datastruct/patricia.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/datastruct/patricia.c	2013-07-06 14:38:21.000000000 -0700
@@ -68,8 +68,8 @@
 };
 
 static struct pnode * node_alloc(uint8_t, const uint8_t *);
-static struct pnode * node_dup(struct pnode *, uint8_t, const uint8_t *);
-static int compare(struct pnode *, const uint8_t *, size_t, uint8_t *,
+static struct pnode * node_dup(const struct pnode *, uint8_t, const uint8_t *);
+static int compare(const struct pnode *, const uint8_t *, size_t, uint8_t *,
     uint8_t *);
 static int foreach_internal(struct pnode *,
     int(void *, uint8_t *, size_t, void *), void *, uint8_t *, size_t);
@@ -104,7 +104,7 @@
  * Create a duplicate of a node but with different slen and s[].
  */
 static struct pnode *
-node_dup(struct pnode * n0, uint8_t slen, const uint8_t * s)
+node_dup(const struct pnode * n0, uint8_t slen, const uint8_t * s)
 {
 	struct pnode *	n;
 
@@ -134,7 +134,7 @@
  * node).
  */
 static int
-compare(struct pnode * n, const uint8_t * key, size_t keylen,
+compare(const struct pnode * n, const uint8_t * key, size_t keylen,
     uint8_t * mlen, uint8_t * mask)
 {
 	size_t	i;
diff -ruN tarsnap-autoconf-1.0.33/lib/datastruct/rwhashtab.c tarsnap-autoconf-1.0.34/lib/datastruct/rwhashtab.c
--- tarsnap-autoconf-1.0.33/lib/datastruct/rwhashtab.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/datastruct/rwhashtab.c	2013-07-06 14:38:21.000000000 -0700
@@ -6,11 +6,13 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "crypto.h"
+#include "crypto_entropy.h"
 #include "ctassert.h"
 #include "sysendian.h"
 #include "warnp.h"
 
+#include "crypto.h"
+
 #include "rwhashtab.h"
 
 /*
diff -ruN tarsnap-autoconf-1.0.33/lib/keyfile/keyfile.c tarsnap-autoconf-1.0.34/lib/keyfile/keyfile.c
--- tarsnap-autoconf-1.0.33/lib/keyfile/keyfile.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/keyfile/keyfile.c	2013-07-06 14:38:21.000000000 -0700
@@ -132,7 +132,7 @@
 	if (asprintf(&pwprompt, "Please enter passphrase for keyfile %s",
 	    filename) == -1)
 		goto err0;
-	if (tarsnap_readpass(&passwd, pwprompt, NULL, 1)) {
+	if (readpass(&passwd, pwprompt, NULL, 1)) {
 		warnp("Error reading passphrase");
 		goto err1;
 	}
diff -ruN tarsnap-autoconf-1.0.33/lib/netpacket/netpacket_hmac.c tarsnap-autoconf-1.0.34/lib/netpacket/netpacket_hmac.c
--- tarsnap-autoconf-1.0.33/lib/netpacket/netpacket_hmac.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netpacket/netpacket_hmac.c	2013-07-06 14:38:21.000000000 -0700
@@ -2,6 +2,8 @@
 
 #include <string.h>
 
+#include "crypto_verify_bytes.h"
+
 #include "crypto.h"
 
 #include "netpacket.h"
diff -ruN tarsnap-autoconf-1.0.33/lib/netpacket/netpacket_op.c tarsnap-autoconf-1.0.34/lib/netpacket/netpacket_op.c
--- tarsnap-autoconf-1.0.33/lib/netpacket/netpacket_op.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netpacket/netpacket_op.c	2013-07-06 14:38:21.000000000 -0700
@@ -25,7 +25,7 @@
 #define MAXRECONNECTS	10
 
 /* As above, except the server doesn't seem to be around at all. */
-#define MAXRECONNECTS_AWOL	1
+#define MAXRECONNECTS_AWOL	3
 
 /* Time to wait between each attempt. */
 static int reconnect_wait[MAXRECONNECTS + 1] = {
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto.c tarsnap-autoconf-1.0.34/lib/netproto/netproto.c
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto.c	2013-07-06 14:38:21.000000000 -0700
@@ -3,7 +3,7 @@
 #include <errno.h>
 #include <stdlib.h>
 
-#include "network.h"
+#include "tsnetwork.h"
 #include "warnp.h"
 
 #include "netproto.h"
@@ -51,13 +51,13 @@
 }
 
 /**
- * netproto_open(fd):
- * Create and return a network protocol connection cookie for use on the
- * connected socket ${fd}.  Note that netproto_keyexchange() must be called
- * before _writepacket or _readpacket are called on the cookie.
+ * netproto_alloc(callback, cookie):
+ * Allocate a network protocol connection cookie.  If the connection is closed
+ * before netproto_setfd is called, netproto_close will call callback(cookie)
+ * in lieu of performing callback cancels on a socket.
  */
-NETPROTO_CONNECTION *
-netproto_open(int fd)
+struct netproto_connection_internal *
+netproto_alloc(int (* callback)(void *), void * cookie)
 {
 	struct netproto_connection_internal * C;
 
@@ -65,31 +65,53 @@
 	if ((C = malloc(sizeof(struct netproto_connection_internal))) == NULL)
 		goto err0;
 
-	/* We have a file descriptor, but we don't have keys yet. */
-	C->fd = fd;
-	C->keys = NULL;
+	/* Record connect-cancel callback and cookie. */
+	C->cancel = callback;
+	C->cookie = cookie;
 
-	/* We're not sleeping. */
+	/* We have no state yet. */
+	C->fd = -1;
+	C->keys = NULL;
 	C->sleepcookie.handle = -1;
-
-	/* No traffic yet. */
 	C->bytesin = C->bytesout = C->bytesqueued = 0;
-
-	/* The connection isn't broken. */
 	C->broken = 0;
+	C->Q = NULL;
+
+	/* Success! */
+	return (C);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * netproto_setfd(C, fd):
+ * Set the network protocol connection cookie ${C} to use connected socket
+ * ${fd}.  This function must be called exactly once after netproto_alloc
+ * before calling any other functions aside from netproto_free.
+ */
+int
+netproto_setfd(struct netproto_connection_internal * C, int fd)
+{
+
+	/* The connect is no longer pending. */
+	C->cancel = NULL;
+	C->cookie = NULL;
+
+	/* We have a file descriptor. */
+	C->fd = fd;
 
 	/* Create a network layer write queue. */
 	if ((C->Q = network_writeq_init(fd)) == NULL)
-		goto err1;
+		goto err0;
 
 	/* Success! */
-	return (C);
+	return (0);
 
-err1:
-	free(C);
 err0:
 	/* Failure! */
-	return (NULL);
+	return (-1);
 }
 
 /**
@@ -174,7 +196,10 @@
 	int rc, rc2;
 
 	/* Cancel pending writes. */
-	rc = network_writeq_cancel(C->Q);
+	if (C->Q != NULL)
+		rc = network_writeq_cancel(C->Q);
+	else
+		rc = 0;
 
 	/*
 	 * Mark this connection as being broken.  The upstream caller should
@@ -184,9 +209,11 @@
 	C->broken = 1;
 
 	/* Cancel any in-progress read. */
-	rc2 = network_deregister(C->fd, NETWORK_OP_READ);
-	if (rc == 0)
-		rc = rc2;
+	if (C->fd != -1) {
+		rc2 = network_deregister(C->fd, NETWORK_OP_READ);
+		if (rc == 0)
+			rc = rc2;
+	}
 
 	/* Return success or the first nonzero callback value. */
 	return (rc);
@@ -201,25 +228,33 @@
 {
 	int rc, rc2;
 
-	/* Cancel any in-progress sleep. */
-	if (C->sleepcookie.handle != -1)
-		network_desleep(C->sleepcookie.handle);
+	/* If we were connecting, cancel that. */
+	if (C->cancel != NULL)
+		rc = (C->cancel)(C->cookie);
+	else
+		rc = 0;
 
 	/* Cancel pending writes. */
-	rc = network_writeq_cancel(C->Q);
+	if (C->Q != NULL) {
+		rc2 = network_writeq_cancel(C->Q);
+		rc = rc ? rc : rc2;
+	}
 
 	/* Free the write queue. */
-	network_writeq_free(C->Q);
+	if (C->Q != NULL)
+		network_writeq_free(C->Q);
 
 	/* Cancel any in-progress read. */
-	rc2 = network_deregister(C->fd, NETWORK_OP_READ);
-	rc = rc ? rc : rc2;
+	if (C->fd != -1) {
+		rc2 = network_deregister(C->fd, NETWORK_OP_READ);
+		rc = rc ? rc : rc2;
+	}
 
 	/* Free cryptographic keys, if any exist. */
 	crypto_session_free(C->keys);
 
 	/* Close the socket. */
-	while (close(C->fd)) {
+	while (C->fd != -1 && close(C->fd)) {
 		if (errno == ECONNRESET) {
 			/*
 			 * You can't dump me!  I'm dumping you!  We don't
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto.h tarsnap-autoconf-1.0.34/lib/netproto/netproto.h
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto.h	2013-07-06 14:38:21.000000000 -0700
@@ -3,7 +3,7 @@
 
 #include <stdint.h>
 
-#include "network.h"
+#include "tsnetwork.h"
 
 typedef struct netproto_connection_internal NETPROTO_CONNECTION;
 
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto_connect.c tarsnap-autoconf-1.0.34/lib/netproto/netproto_connect.c
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto_connect.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto_connect.c	2013-07-06 14:38:21.000000000 -0700
@@ -3,59 +3,76 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include <arpa/inet.h>
-#include <netinet/in.h>
-
-#include <netdb.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
 
 #include "netproto_internal.h"
+#include "sock.h"
+#include "sock_util.h"
 #include "network.h"
 #include "warnp.h"
 
 #include "netproto.h"
 
 struct netproto_connect_cookie {
+	struct sock_addr ** sas;
 	char * useragent;
 	network_callback * callback;
 	void * cookie;
+	void * connect_cookie;
 	NETPROTO_CONNECTION * NC;
 };
 
-static network_callback callback_connect;
-static int dnslookup(const char *, struct sockaddr **, socklen_t *);
-
 static int
-callback_connect(void * cookie, int status)
+callback_connect(void * cookie, int s)
 {
 	struct netproto_connect_cookie * C = cookie;
 	int rc;
 
+	/* The connect is no longer pending. */
+	C->connect_cookie = NULL;
+
 	/* Did the connection attempt fail? */
-	if (status != NETWORK_STATUS_OK)
-		goto failed;
+	if (s == -1) {
+		/*
+		 * Call the upstream callback.  Upon being informed that the
+		 * connect has failed, the upstream code is responsible for
+		 * calling netproto_close, which (since we haven't called
+		 * netproto_setfd yet) will call into callback_cancel and let
+		 * us clean up.
+		 */
+		return ((C->callback)(C->cookie, NETWORK_STATUS_CONNERR));
+	}
+
+	/* Inform the netproto code that we have a socket. */
+	if (netproto_setfd(C->NC, s))
+		goto err2;
 
 	/* Perform key exchange. */
-	if (netproto_keyexchange(C->NC, C->useragent,
-	    C->callback, C->cookie)) {
-		status = NETWORK_STATUS_ERR;
-		goto failed;
-	}
+	if (netproto_keyexchange(C->NC, C->useragent, C->callback, C->cookie))
+		goto err1;
 
 	/* Free the cookie. */
+	sock_addr_freelist(C->sas);
 	free(C->useragent);
 	free(C);
 
 	/* Success! */
 	return (0);
 
-failed:
+err2:
+	/* Drop the socket since we can't use it properly. */
+	close(s);
+err1:
 	/* Call the upstream callback. */
-	rc = (C->callback)(C->cookie, status);
+	rc = (C->callback)(C->cookie, NETWORK_STATUS_ERR);
 
-	/* Free the cookie. */
+	/*
+	 * We've called netproto_setfd, so callback_cancel won't happen; we
+	 * are responsible for cleaning up after ourselves.
+	 */
+	sock_addr_freelist(C->sas);
 	free(C->useragent);
 	free(C);
 
@@ -63,99 +80,34 @@
 	return (rc);
 }
 
-#ifdef HAVE_GETADDRINFO
 static int
-dnslookup(const char * sname, struct sockaddr ** addr, socklen_t * addrlen)
+callback_cancel(void * cookie)
 {
-	struct addrinfo hints;
-	struct addrinfo * res;
-	int error;
-
-	/* Do the DNS lookup. */
-	memset(&hints, 0, sizeof(hints));
-	hints.ai_family = AF_INET;
-	hints.ai_socktype = SOCK_STREAM;
-	hints.ai_protocol = IPPROTO_TCP;
-#ifdef AI_NUMERICSERV
-	/**
-	 * XXX Portability
-	 * XXX POSIX states that AI_NUMERICSERV should be defined in netdb.h,
-	 * XXX but some operating systems don't provide it.  The flag isn't
-	 * XXX really necessary anyway, since getaddrinfo should interpret
-	 * XXX "9279" as 'a string specifying a decimal port number'; but
-	 * XXX passing the flag (on operating systems which provide it) might
-	 * XXX avoid waiting for a name resolution service (e.g., NIS+) to
-	 * XXX be invoked.
-	 */
-	hints.ai_flags = AI_NUMERICSERV;
-#endif
-	if ((error = getaddrinfo(sname, "9279",
-	    &hints, &res)) != 0) {
-		warn0("Error looking up %s: %s", sname, gai_strerror(error));
-		goto err0;
-	}
-	if (res == NULL) {
-		warn0("Cannot look up %s", sname);
-		goto err0;
-	}
-
-	/* Create a copy of the structure. */
-	if ((*addr = malloc(res->ai_addrlen)) == NULL)
-		goto err0;
-	memcpy(*addr, res->ai_addr, res->ai_addrlen);
-	*addrlen = res->ai_addrlen;
-
-	/* Free the returned list of addresses. */
-	freeaddrinfo(res);
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-#else
-static int
-dnslookup(const char * sname, struct sockaddr ** addr, socklen_t * addrlen)
-{
-	struct hostent * hp;
-	struct sockaddr_in sin;
-
-	if ((hp = gethostbyname(sname)) == NULL) {
-		warn0("Error looking up %s", sname);
-		goto err0;
-	}
+	struct netproto_connect_cookie * C = cookie;
+	int rc;
 
-	/* Construct a struct sockaddr_in. */
-	bzero(&sin, sizeof(struct sockaddr_in));
-	sin.sin_family = AF_INET;
-	sin.sin_port = htons(9279);
-	memcpy(&sin.sin_addr, hp->h_addr, hp->h_length);
+	/* Cancel the connection attempt if still pending. */
+	if (C->connect_cookie != NULL)
+		network_connect_cancel(C->connect_cookie);
 
-	/* Make a copy of this to return. */
-	if ((*addr = malloc(sizeof(struct sockaddr_in))) == NULL)
-		goto err0;
-	memcpy(*addr, &sin, sizeof(struct sockaddr_in));
-	*addrlen = sizeof(struct sockaddr_in);
+	/* We were cancelled. */
+	rc = (C->callback)(C->cookie, NETWORK_STATUS_CANCEL);
 
-	/* Success! */
-	return (0);
+	/* Free our cookie. */
+	sock_addr_freelist(C->sas);
+	free(C->useragent);
+	free(C);
 
-err0:
-	/* Failure! */
-	return (-1);
+	/* Return value from user callback. */
+	return (rc);
 }
-#endif
 
-static void
-getserveraddr(struct sockaddr ** addr, socklen_t * addrlen)
+static struct sock_addr **
+getserveraddr(void)
 {
-	static struct sockaddr * srv_addr = NULL;
-	static socklen_t srv_addrlen = 0;
+	static struct sock_addr ** srv_addr = NULL;
 	static time_t srv_time = (time_t)(-1);
-	struct sockaddr * tmp_addr;
-	socklen_t tmp_addrlen;
+	struct sock_addr ** tmp_addr;
 	time_t tmp_time;
 
 	/*
@@ -164,13 +116,12 @@
 	 */
 	tmp_time = time(NULL);
 	if ((srv_time == (time_t)(-1)) || (tmp_time > srv_time + 60)) {
-		if (dnslookup(TSSERVER "-server.tarsnap.com",
-		    &tmp_addr, &tmp_addrlen)) {
+		tmp_addr = sock_resolve(TSSERVER "-server.tarsnap.com:9279");
+		if (tmp_addr == NULL) {
 			if (srv_addr != NULL)
 				warn0("Using cached DNS lookup");
 			else
 				warn0("Cannot obtain server address");
-			tmp_addr = NULL;
 		}
 	} else {
 		tmp_addr = NULL;
@@ -178,15 +129,13 @@
 
 	/* If we have a new lookup, update the cache. */
 	if (tmp_addr != NULL) {
-		free(srv_addr);
+		sock_addr_freelist(srv_addr);
 		srv_addr = tmp_addr;
-		srv_addrlen = tmp_addrlen;
 		srv_time = tmp_time;
 	}
 
-	/* Return the cached value. */
-	*addr = srv_addr;
-	*addrlen = srv_addrlen;
+	/* Return a duplicate of the cached value. */
+	return (sock_addr_duplist(srv_addr));
 }
 
 /**
@@ -200,56 +149,44 @@
     network_callback * callback, void * cookie)
 {
 	struct netproto_connect_cookie * C;
-	int s;
-	NETPROTO_CONNECTION * NC;
-	struct sockaddr * addr;
-	socklen_t addrlen;
 	struct timeval timeo;
 
-	/* Create a network socket. */
-	if ((s = socket(PF_INET, SOCK_STREAM, 0)) == -1) {
-		warnp("socket()");
-		goto err0;
-	}
-
-	/* Wrap the socket into a protocol-layer cookie. */
-	if ((NC = netproto_open(s)) == NULL) {
-		close(s);
-		goto err0;
-	}
-
 	/* Create a cookie to be passed to callback_connect. */
 	if ((C = malloc(sizeof(struct netproto_connect_cookie))) == NULL)
-		goto err1;
+		goto err0;
 	if ((C->useragent = strdup(useragent)) == NULL)
-		goto err2;
+		goto err1;
 	C->callback = callback;
 	C->cookie = cookie;
-	C->NC = NC;
 
 	/* Look up the server's IP address. */
-	getserveraddr(&addr, &addrlen);
-	if (addr == NULL)
-		goto err3;
+	if ((C->sas = getserveraddr())== NULL)
+		goto err2;
 
-	/* Try to connect to server within 5 seconds. */
+	/* Try to connect to server, waiting up to 5 seconds per address. */
 	timeo.tv_sec = 5;
 	timeo.tv_usec = 0;
-	if (network_connect(s, addr, addrlen,
-	    &timeo, callback_connect, C)) {
+	if ((C->connect_cookie = network_connect_timeo(C->sas, &timeo,
+	    callback_connect, C)) == NULL) {
 		netproto_printerr(NETWORK_STATUS_CONNERR);
 		goto err3;
 	}
 
+	/* Create a network protocol connection cookie. */
+	if ((C->NC = netproto_alloc(callback_cancel, C)) == NULL)
+		goto err4;
+
 	/* Success! */
-	return (NC);
+	return (C->NC);
 
+err4:
+	network_connect_cancel(C->connect_cookie);
 err3:
-	free(C->useragent);
+	sock_addr_freelist(C->sas);
 err2:
-	free(C);
+	free(C->useragent);
 err1:
-	netproto_close(NC);
+	free(C);
 err0:
 	/* Failure! */
 	return (NULL);
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto_internal.h tarsnap-autoconf-1.0.34/lib/netproto/netproto_internal.h
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto_internal.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -4,9 +4,11 @@
 #include <stdint.h>
 
 #include "crypto.h"
-#include "network.h"
+#include "tsnetwork.h"
 
 struct netproto_connection_internal {
+	int (*cancel)(void *);
+	void * cookie;
 	int fd;
 	NETWORK_WRITEQ * Q;
 	CRYPTO_SESSION * keys;
@@ -22,6 +24,22 @@
 };
 
 /**
+ * netproto_alloc(callback, cookie):
+ * Allocate a network protocol connection cookie.  If the connection is closed
+ * before netproto_setfd is called, netproto_close will call callback(cookie)
+ * in lieu of performing callback cancels on a socket.
+ */
+struct netproto_connection_internal * netproto_alloc(int (*)(void *), void *);
+
+/**
+ * netproto_setfd(C, fd):
+ * Set the network protocol connection cookie ${C} to use connected socket
+ * ${fd}.  This function must be called exactly once after netproto_alloc
+ * before calling any other functions aside from netproto_free.
+ */
+int netproto_setfd(struct netproto_connection_internal *, int);
+
+/**
  * netproto_open(fd):
  * Create and return a network protocol connection cookie for use on the
  * connected socket ${fd}.  Note that netproto_keyexchange() must be called
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto_keyexchange.c tarsnap-autoconf-1.0.34/lib/netproto/netproto_keyexchange.c
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto_keyexchange.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto_keyexchange.c	2013-07-06 14:38:21.000000000 -0700
@@ -4,12 +4,14 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "crypto.h"
+#include "crypto_dh.h"
 #include "ctassert.h"
-#include "netproto_internal.h"
-#include "network.h"
 #include "warnp.h"
 
+#include "crypto.h"
+#include "netproto_internal.h"
+#include "tsnetwork.h"
+
 #include "netproto.h"
 
 struct keyexchange_internal {
@@ -152,7 +154,7 @@
 	KC->C->bytesout += 1;
 
 	/* Data was sent.  Read the server protocol version. */
-	if (network_read(KC->C->fd, &KC->serverproto, 1, &KC->timeout,
+	if (tsnetwork_read(KC->C->fd, &KC->serverproto, 1, &KC->timeout,
 	    &KC->timeout, proto_received, KC))
 		goto err2;
 
@@ -260,7 +262,7 @@
 	KC->C->bytesout += KC->useragentlen;
 
 	/* Data was sent.  Read the server crypto parameters. */
-	if (network_read(KC->C->fd, KC->serverparams,
+	if (tsnetwork_read(KC->C->fd, KC->serverparams,
 	    CRYPTO_DH_PUBLEN + 256 + 32, &KC->timeout, &KC->timeout,
 	    dh_received, KC))
 		goto err2;
@@ -417,7 +419,7 @@
 	KC->C->bytesout += 32;
 
 	/* Client proof was sent.  Read the server proof. */
-	if (network_read(KC->C->fd, KC->serverproof, 32, &KC->timeout,
+	if (tsnetwork_read(KC->C->fd, KC->serverproof, 32, &KC->timeout,
 	    &KC->timeout, proof_received, KC))
 		goto err2;
 
diff -ruN tarsnap-autoconf-1.0.33/lib/netproto/netproto_packet.c tarsnap-autoconf-1.0.34/lib/netproto/netproto_packet.c
--- tarsnap-autoconf-1.0.33/lib/netproto/netproto_packet.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/netproto/netproto_packet.c	2013-07-06 14:38:21.000000000 -0700
@@ -7,12 +7,14 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "crypto.h"
-#include "netproto_internal.h"
-#include "network.h"
+#include "crypto_verify_bytes.h"
 #include "sysendian.h"
 #include "warnp.h"
 
+#include "crypto.h"
+#include "netproto_internal.h"
+#include "tsnetwork.h"
+
 #include "netproto.h"
 
 /**
@@ -132,7 +134,7 @@
 	to0.tv_sec = 60;
 	to1.tv_sec = 300;
 	to0.tv_usec = to1.tv_usec = 0;
-	if (network_read(RC->C->fd, RC->buf, RC->len, &to0, &to1,
+	if (tsnetwork_read(RC->C->fd, RC->buf, RC->len, &to0, &to1,
 	    data_received, RC))
 		goto err2;
 
@@ -323,7 +325,7 @@
 	to0.tv_sec = 60;
 	to1.tv_sec = 120;
 	to0.tv_usec = to1.tv_usec = 0;
-	if (network_read(C->fd, RC->header, 69, &to0, &to1,
+	if (tsnetwork_read(C->fd, RC->header, 69, &to0, &to1,
 	    header_received, RC))
 		goto err1;
 
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network.h tarsnap-autoconf-1.0.34/lib/network/network.h
--- tarsnap-autoconf-1.0.33/lib/network/network.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,174 +0,0 @@
-#ifndef _NETWORK_H_
-#define _NETWORK_H_
-
-#include <sys/types.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-
-#include <stdint.h>
-
-typedef struct network_writeq_internal NETWORK_WRITEQ;
-typedef int network_callback(void *, int);
-
-/* "op" parameters to network_register. */
-#define	NETWORK_OP_READ		0
-#define	NETWORK_OP_WRITE	1
-
-/* callback status values. */
-#define NETWORK_STATUS_CONNERR	(-2)	/* Error connecting to server. */
-#define NETWORK_STATUS_ERR	(-1)	/* Error from recv/send. */
-#define NETWORK_STATUS_OK	0	/* Success. */
-#define NETWORK_STATUS_TIMEOUT	1	/* Timeout. */
-#define NETWORK_STATUS_NODATA	2	/* Timeout with empty buffer. */
-#define NETWORK_STATUS_CTIMEOUT	3	/* Timeout connecting to server. */
-#define NETWORK_STATUS_CLOSED	4	/* Connection was closed. */
-#define NETWORK_STATUS_CANCEL	5	/* Operation cancelled. */
-#define NETWORK_STATUS_ZEROBYTE	6	/* Zero-byte write via writeq. */
-#define NETWORK_STATUS_MAX	6
-
-/**
- * network_init(void):
- * Initialize the network subsystem.
- */
-int network_init(void);
-
-/**
- * network_bwlimit(down, up):
- * Set the bandwidth rate limit to ${down} bytes per second of read bandwidth
- * and ${up} bytes per second of write bandwidth.  The values ${down} and
- * ${up} must be between 8000 and 10^9.
- */
-void network_bwlimit(double, double);
-
-/**
- * network_register(fd, op, timeo, callback, cookie):
- * Register a callback to be performed by network_select when file descriptor
- * ${fd} is ready for operation ${op}, or once the timeout has expired.
- */
-int network_register(int, int, struct timeval *, network_callback *, void *);
-
-/**
- * network_deregister(fd, op):
- * Deregister the callback, if any, for operation ${op} on descriptor ${fd}.
- * The callback will be called with a status of NETWORK_STATUS_CANCEL.
- */
-int network_deregister(int, int);
-
-/**
- * network_sleep(timeo, callback, cookie):
- * Register a callback to be performed by network_select once the specified
- * timeout has expired.  Return a handle which can be passed to
- * network_desleep().
- */
-int network_sleep(struct timeval *, network_callback *, void *);
-
-/**
- * network_desleep(handle):
- * Deregister the callback associated with the provided handle.  The
- * callback will be called with a status of NETWORK_STATUS_CANCEL.
- */
-int network_desleep(int);
-
-/**
- * network_select(blocking):
- * Call select(2) on file descriptors provided via network_register and make
- * callbacks as appropriate (including timeouts).  Callbacks are deregistered
- * before being performed.  If ${blocking} is non-zero, allow select(2) to
- * block waiting for descriptors and timeouts.  Stop performing callbacks and
- * return the first non-zero value returned by a callback if one occurs.
- */
-int network_select(int);
-
-/**
- * network_spin(done):
- * Repeatedly call network_select until either an error occurs or the value
- * pointed to by ${done} is non-zero.
- */
-int network_spin(int *);
-
-/**
- * network_connect(s, addr, addrlen, timeout, callback, cookie):
- * Connect the specified socket to the specified address, and call the
- * specified callback when connected or the connection attempt has failed.
- */
-int network_connect(int, const struct sockaddr *, socklen_t,
-    struct timeval *, network_callback *, void *);
-
-/**
- * network_read(fd, buf, buflen, to0, to1, callback, cookie):
- * Asynchronously fill the provided buffer with data from ${fd}, and call
- * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
- * out if no data can be read for a period of time to0, or if the complete
- * buffer has not been read after time to1.  Note that ${buflen} must be
- * non-zero, since otherwise deadlock would result.
- */
-int network_read(int, uint8_t *, size_t, struct timeval *, struct timeval *,
-    network_callback *, void *);
-
-/**
- * network_read(fd, buf, buflen, to0, to1, callback, cookie):
- * Asynchronously write data from the provided buffer to ${fd}, and call
- * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
- * out if no data can be written for a period of time to0, or if the complete
- * buffer has not been written after time to1.  If ${buflen} is zero, the
- * callback will be invoked with a status of NETWORK_STATUS_CLOSED, even if
- * the connection is still open.
- */
-int network_write(int, const uint8_t *, size_t, struct timeval *,
-    struct timeval *, network_callback *, void *);
-
-/**
- * network_writeq_init(fd):
- * Construct a queue to be used for writing data to ${fd}.
- */
-NETWORK_WRITEQ * network_writeq_init(int);
-
-/**
- * _network_writeq_add(Q, buf, buflen, timeo, callback, cookie, abstimeo):
- * Add a buffer write to the specified write queue.  The callback function
- * will be called when the write is finished, fails, or is cancelled.
- * If ${abstimeo} is zero, the timeout is relative to when the buffer in
- * question starts to be written (i.e., when the previous buffered write
- * finishes); otherwise, the timeout is relative to the present time.  If
- * ${buflen} is zero, the callback will be performed, at the appropriate
- * point, with a status of NETWORK_STATUS_ZEROBYTE.
- */
-int _network_writeq_add(NETWORK_WRITEQ *, const uint8_t *, size_t,
-    struct timeval *, network_callback *, void *, int);
-#define network_writeq_add(Q, buf, buflen, timeo, callback, cookie)	\
-	_network_writeq_add(Q, buf, buflen, timeo, callback, cookie, 0)
-#define network_writeq_add_abs(Q, buf, buflen, timeo, callback, cookie)	\
-	_network_writeq_add(Q, buf, buflen, timeo, callback, cookie, 1)
-
-/**
- * network_writeq_cancel(Q):
- * Cancel all queued writes, including any partially completed writes.  Note
- * that since this leaves the connection in an indeterminate state (there is
- * no way to know how much data from the currently in-progress write was
- * written) this should probably only be used prior to closing a connection.
- * The callbacks for each pending write will be called with a status of
- * NETWORK_STATUS_DEQUEUE, and network_writeq_cancel will return the first
- * non-zero value returned by a callback.
- */
-int network_writeq_cancel(NETWORK_WRITEQ *);
-
-/**
- * network_writeq_free(Q):
- * Free the specified write queue.  If there might be any pending writes,
- * network_writeq_cancel should be called first.
- */
-void network_writeq_free(NETWORK_WRITEQ *);
-
-/**
- * network_getselectstats(N, mu, va, max):
- * Return statistics on the time between select(2) calls.
- */
-void network_getselectstats(double *, double *, double *, double *);
-
-/**
- * network_fini(void):
- * Free resources associated with the network subsystem.
- */
-void network_fini(void);
-
-#endif /* !_NETWORK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_buf.c tarsnap-autoconf-1.0.34/lib/network/network_buf.c
--- tarsnap-autoconf-1.0.33/lib/network/network_buf.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_buf.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,281 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <sys/socket.h>
-#include <sys/time.h>
-
-#include <signal.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "network_internal.h"
-#include "tarsnap_opt.h"
-#include "tvmath.h"
-#include "warnp.h"
-
-#include "network.h"
-
-/*
- * If MSG_NOSIGNAL isn't defined, define it to zero; and then fiddle with
- * the socket options when needed.
- */
-#ifdef MSG_NOSIGNAL
-#define HAVE_MSG_NOSIGNAL
-#endif
-#ifndef HAVE_MSG_NOSIGNAL
-#define MSG_NOSIGNAL 0
-#endif
-
-struct network_buf_cookie {
-	network_callback * callback;
-	void * cookie;
-	int fd;
-	uint8_t * buf;
-	size_t buflen;
-	size_t bufpos;
-	size_t * bwlimit;
-	struct timeval timeout;
-	struct timeval timeout_max;
-	ssize_t (* sendrecv)(int, void *, size_t, int);
-	int netop;
-	int flags;
-};
-
-static int callback_buf(void * cookie, int timedout);
-static int network_buf(int fd, uint8_t * buf, size_t buflen,
-    struct timeval * to0, struct timeval * to1,
-    network_callback * callback, void * cookie,
-    ssize_t (* sendrecv)(int, void *, size_t, int), int netop,
-    int flags, size_t * bwlimit);
-
-/**
- * callback_buf(cookie, status):
- * Callback helper for network_read and network_write.
- */
-static int
-callback_buf(void * cookie, int status)
-{
-	struct network_buf_cookie * C = cookie;
-	struct timeval timeo;
-	size_t oplen;
-	ssize_t len;
-	int rc = -1;	/* If not callback or reset, we have an error. */
-#ifndef HAVE_MSG_NOSIGNAL
-#ifdef SO_NOSIGPIPE
-	int val;
-#else
-	void (*oldsig)(int);
-#endif
-#endif
-
-	if (status != NETWORK_STATUS_OK) {
-		/* If we have no data, mark a timeout as "no data" instead. */
-		if ((C->bufpos != 0) && (status == NETWORK_STATUS_TIMEOUT))
-			status = NETWORK_STATUS_NODATA;
-		goto docallback;
-	}
-
-	/* Try to read/write data to/from the buffer. */
-#ifndef HAVE_MSG_NOSIGNAL
-#ifdef SO_NOSIGPIPE
-	val = 1;
-
-	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
-		status = NETWORK_STATUS_ERR;
-		goto docallback;
-	}
-#else
-	if ((oldsig = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) {
-		warnp("signal(SIGPIPE)");
-		goto docallback;
-	}
-#endif
-#endif
-	oplen = C->buflen - C->bufpos;
-	if (oplen > *(C->bwlimit))
-		oplen = *(C->bwlimit);
-	len = (C->sendrecv)(C->fd, C->buf + C->bufpos, oplen, C->flags);
-#ifndef HAVE_MSG_NOSIGNAL
-#ifdef SO_NOSIGPIPE
-	val = 0;
-
-	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
-		status = NETWORK_STATUS_ERR;
-		goto docallback;
-	}
-#else
-	if (signal(SIGPIPE, oldsig) == SIG_ERR) {
-		warnp("signal(SIGPIPE)");
-		goto docallback;
-	}
-#endif
-#endif
-
-	/* Failure, closed, or success? */
-	if (len == -1) {
-		/* If no data is available, reset the callback. */
-		if ((errno == EAGAIN) ||
-		    (errno == EWOULDBLOCK) ||
-		    (errno == EINTR))
-			goto tryagain;
-
-		/* An error occurred.  Let the callback handle it. */
-		status = NETWORK_STATUS_ERR;
-		goto docallback;
-	} else if (len == 0) {
-		/* Socket has been shut down by remote host. */
-		/* This should occur only when receiving, not when sending. */
-		status = NETWORK_STATUS_CLOSED;
-		goto docallback;
-	} else {
-		/* Adjust bandwidth limit. */
-		*(C->bwlimit) -= len;
-
-		/* Data has been read/written into/from buffer. */
-		C->bufpos += len;
-		if (C->bufpos == C->buflen) {
-			status = NETWORK_STATUS_OK;
-			goto docallback;
-		}
-
-		/* Fall through to resetting the callback. */
-	}
-
-tryagain:
-	/* We need more data.  Reset the callback. */
-	memcpy(&timeo, &C->timeout, sizeof(struct timeval));
-	if (tvmath_subctime(&timeo)) {
-		status = NETWORK_STATUS_ERR;
-		goto docallback;
-	}
-	if (tv_lt(&C->timeout_max, &timeo))
-		memcpy(&timeo, &C->timeout_max, sizeof(struct timeval));
-	if (network_register(C->fd, C->netop, &timeo, callback_buf, C)) {
-		status = NETWORK_STATUS_ERR;
-		goto docallback;
-	}
-
-	/* Callback has been reset. */
-	return (0);
-
-docallback:
-	/*
-	 * If there was a network error and we're being verbose, print the
-	 * error now in case errno gets mangled later.
-	 */
-	if ((tarsnap_opt_noisy_warnings) && (status == NETWORK_STATUS_ERR))
-		warnp("Network error");
-
-	/* Call the user callback. */
-	rc = (C->callback)(C->cookie, status);
-
-	/* Free the cookie. */
-	free(C);
-
-	/* Return error or value from user callback. */
-	return (rc);
-}
-
-/**
- * network_buf(fd, buf, buflen, to0, to1, callback, cookie, sendrecv, netop,
- *     flags, bwlimit):
- * Asynchronously read/write the provided buffer from/to ${fd}, and call
- * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
- * out if no data can be read/writ for a period of time to0, or if the
- * complete buffer has not been read/writ after time to1.  Never read/write
- * more bytes than the current value of *bwlimit; and decrease said value
- * whenever data is read/writ.
- */
-static int
-network_buf(int fd, uint8_t * buf, size_t buflen,
-    struct timeval * to0, struct timeval * to1,
-    network_callback * callback, void * cookie,
-    ssize_t (* sendrecv)(int, void *, size_t, int), int netop,
-    int flags, size_t * bwlimit)
-{
-	struct network_buf_cookie * C;
-	struct timeval timeo;
-
-	/* Create a cookie to be passed to callback_buf. */
-	if ((C = malloc(sizeof(struct network_buf_cookie))) == NULL)
-		goto err0;
-	C->callback = callback;
-	C->cookie = cookie;
-	C->fd = fd;
-	C->buf = buf;
-	C->buflen = buflen;
-	C->bufpos = 0;
-	C->sendrecv = sendrecv;
-	C->netop = netop;
-	C->flags = flags;
-	C->bwlimit = bwlimit;
-
-	/* Figure out when we should give up waiting. */
-	memcpy(&C->timeout, to1, sizeof(struct timeval));
-	if (tvmath_addctime(&C->timeout))
-		goto err1;
-
-	/* Record the maximum time that any single send/recv will wait. */
-	memcpy(&C->timeout_max, to0, sizeof(struct timeval));
-
-	/* Set up the callback. */
-	memcpy(&timeo, to1, sizeof(struct timeval));
-	if (tv_lt(to0, &timeo))
-		memcpy(&timeo, to0, sizeof(struct timeval));
-	if (network_register(fd, netop, &timeo, callback_buf, C))
-		goto err1;
-
-	/* Success! */
-	return (0);
-
-err1:
-	free(C);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_read(fd, buf, buflen, to0, to1, callback, cookie):
- * Asynchronously fill the provided buffer with data from ${fd}, and call
- * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
- * out if no data can be read for a period of time to0, or if the complete
- * buffer has not been read after time to1.  Note that ${buflen} must be
- * non-zero, since otherwise deadlock would result.
- */
-int
-network_read(int fd, uint8_t * buf, size_t buflen,
-    struct timeval * to0, struct timeval * to1,
-    network_callback * callback, void * cookie)
-{
-
-	/* Make sure buflen is non-zero. */
-	if (buflen == 0) {
-		warn0("Cannot read zero-byte buffer");
-		return (-1);
-	}
-
-	return (network_buf(fd, buf, buflen, to0, to1, callback, cookie,
-	    recv, NETWORK_OP_READ, 0, &network_bwlimit_read));
-}
-
-/**
- * network_read(fd, buf, buflen, to0, to1, callback, cookie):
- * Asynchronously write data from the provided buffer to ${fd}, and call
- * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
- * out if no data can be written for a period of time to0, or if the complete
- * buffer has not been written after time to1.  If ${buflen} is zero, the
- * callback will be invoked with a status of NETWORK_STATUS_CLOSED, even if
- * the connection is still open.
- */
-int
-network_write(int fd, const uint8_t * buf, size_t buflen,
-    struct timeval * to0, struct timeval * to1,
-    network_callback * callback, void * cookie)
-{
-
-	return (network_buf(fd, (uint8_t *)(uintptr_t)buf, buflen,
-	    to0, to1, callback, cookie,
-	    (ssize_t (*)(int, void *, size_t, int))send, NETWORK_OP_WRITE,
-	    MSG_NOSIGNAL, &network_bwlimit_write));
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_connect.c tarsnap-autoconf-1.0.34/lib/network/network_connect.c
--- tarsnap-autoconf-1.0.33/lib/network/network_connect.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_connect.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,169 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-
-#include "warnp.h"
-
-#include "network.h"
-
-struct network_connect_cookie {
-	int s;
-	int failed;
-	int errnum;
-	network_callback * callback;
-	void * cookie;
-};
-
-static network_callback callback_connect;
-
-/**
- * callback_connect(cookie, status):
- * Callback helper for network_connect.
- */
-static int
-callback_connect(void * cookie, int status)
-{
-	struct network_connect_cookie * C = cookie;
-	int sockerr;
-	socklen_t sockerrlen = sizeof(int);
-	int rc;
-
-	/*
-	 * A timeout here is either a connection timeout or a connection
-	 * error, depending upon whether we got here as a result of a zero
-	 * second timeout used to postpone handling of a connect() failure.
-	 */
-	if (status == NETWORK_STATUS_TIMEOUT) {
-		if (C->failed) {
-			/*
-			 * The connect() call returned an error; restore the
-			 * errno value from that point so that when we invoke
-			 * our callback we have the right value there.
-			 */
-			status = NETWORK_STATUS_CONNERR;
-			errno = C->errnum;
-		} else {
-			/*
-			 * There was a connection timeout; set errno to zero
-			 * here since any value in errno at this point is
-			 * just left over from a previous failed syscall.
-			 */
-			status = NETWORK_STATUS_CTIMEOUT;
-			errno = 0;
-		}
-	}
-
-	if (status != NETWORK_STATUS_OK)
-		goto docallback;
-
-	/* Even if the status is ok, we need to check for pending error. */
-	if (getsockopt(C->s, SOL_SOCKET, SO_ERROR, &sockerr, &sockerrlen)) {
-		status = NETWORK_STATUS_CONNERR;
-		goto docallback;
-	}
-	if (sockerr != 0) {
-		errno = sockerr;
-		status = NETWORK_STATUS_CONNERR;
-	}
-
-docallback:
-	/* Call the upstream callback. */
-	rc = (C->callback)(C->cookie, status);
-
-	/* Free the cookie. */
-	free(C);
-
-	/* Return value from user callback. */
-	return (rc);
-}
-
-/**
- * network_connect(s, addr, addrlen, timeout, callback, cookie):
- * Connect the specified socket to the specified address, and call the
- * specified callback when connected or the connection attempt has failed.
- */
-int
-network_connect(int s, const struct sockaddr * addr, socklen_t addrlen,
-    struct timeval * timeout, network_callback * callback, void * cookie)
-{
-	struct network_connect_cookie * C;
-	struct timeval timeo;
-	int rc = 0;	/* Success unless specified otherwise. */
-
-	/* Create a cookie to be passed to callback_connect. */
-	if ((C = malloc(sizeof(struct network_connect_cookie))) == NULL)
-		goto err0;
-	C->s = s;
-	C->failed = 0;
-	C->callback = callback;
-	C->cookie = cookie;
-
-	/* Mark socket as non-blocking. */
-	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
-		warnp("fcntl(O_NONBLOCK)");
-		goto err1;
-	}
-
-	/* Try to connect to the server. */
-	if ((connect(s, addr, addrlen) == 0) ||
-	    (errno == EINPROGRESS) ||
-	    (errno == EINTR)) {
-		/* Connection is being established. */
-		if (network_register(s, NETWORK_OP_WRITE, timeout,
-		    callback_connect, C))
-			goto err1;
-	} else if ((errno == ECONNREFUSED) ||
-	    (errno == ECONNRESET) ||
-	    (errno == ENETDOWN) ||
-	    (errno == ENETUNREACH) ||
-#ifdef FREEBSD_PORTRANGE_BUG
-	/**
-	 * If FreeBSD's net.inet.ip.portrange.randomized sysctl is set to 1
-	 * (the default value) FreeBSD sometimes reuses a source port faster
-	 * than might naively be expected.  This doesn't cause any problems
-	 * except if the pf firewall is running on the source system; said
-	 * firewall detects the packet as belonging to an expired connection
-	 * and drops it.  This would be fine, except that the FreeBSD kernel
-	 * doesn't merely drop the packet when a firewall blocks an outgoing
-	 * packet; instead, it reports EPERM back to the userland process
-	 * which was responsible for the packet being sent.
-	 * In short, things interact in wacky ways which make it possible to
-	 * get EPERM back in response to a connect(2) syscall.  Work around
-	 * this by handling EPERM the same way as transient network glitches;
-	 * the upstream code will handle this appropriately by retrying the
-	 * connection, at which point a new source port number will be chosen
-	 * and everything will (probably) work fine.
-	 */
-	    (errno == EPERM) ||
-#endif
-	    (errno == EHOSTUNREACH)) {
-		/*
-		 * The connection attempt has failed.  Schedule a callback
-		 * to be performed after we return, since we're not allowed
-		 * to perform the callback right now.
-		 */
-		C->failed = 1;
-		C->errnum = errno;
-		timeo.tv_sec = timeo.tv_usec = 0;
-		if (network_sleep(&timeo, callback_connect, C))
-			goto err1;
-	} else {
-		/* Something went seriously wrong. */
-		warnp("Network connection failure");
-		goto err1;
-	}
-
-	/* Return success or the status from the callback. */
-	return (rc);
-
-err1:
-	free(C);
-err0:
-	/* Failure! */
-	return (-1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_cork.c tarsnap-autoconf-1.0.34/lib/network/network_cork.c
--- tarsnap-autoconf-1.0.33/lib/network/network_cork.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_cork.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,112 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-
-#include "warnp.h"
-
-#include "network_internal.h"
-
-/**
- * XXX Portability
- * XXX These functions serve two purposes:
- * XXX 1. To avoid wasting bandwidth, by ensuring that multiple small writes
- * XXX over a socket are aggregated into a single TCP/IP packet.
- * XXX 2. To avoid severe performance issues which would otherwise result
- * XXX from nagling, by allowing data to be "pushed" out once there are no
- * XXX more writes queued.
- * XXX
- * XXX POSIX defines TCP_NODELAY for purpose #2, although it does not require
- * XXX that implementations obey it; BSD and Linux respectively define
- * XXX TCP_NOPUSH and TCP_CORK for purpose #1.  On OS X, TCP_NOPUSH is
- * XXX defined, but seems to be broken; we use autoconf to detect OS X and
- * XXX define BROKEN_TCP_NOPUSH.  On Cygwin, TCP_NOPUSH is defined, but
- * XXX using it produces a ENOPROTOOPT error; we define BROKEN_TCP_NOPUSH
- * XXX in this case, too.  On Minix, TCP_NODELAY fails with ENOSYS; since
- * XXX corking occurs for performance reasons only, we ignore this errno.
- */
-
-/* Macro to simplify setting options. */
-#define setopt(fd, opt, value, err0) do {				\
-	int val;							\
-									\
-	val = value;							\
-	if (setsockopt(fd, IPPROTO_TCP, opt, &val, sizeof(int))) {	\
-		if ((errno != ETIMEDOUT) &&				\
-		    (errno != ECONNRESET) &&				\
-		    (errno != ENOSYS)) {				\
-			warnp("setsockopt(%s, %d)", #opt, val);		\
-			goto err0;					\
-		}							\
-	}								\
-} while (0);
-
-/**
- * network_cork(fd):
- * Clear the TCP_NODELAY socket option, and set TCP_CORK or TCP_NOPUSH if
- * either is defined.
- */
-int
-network_cork(int fd)
-{
-
-	/* Clear TCP_NODELAY. */
-	setopt(fd, TCP_NODELAY, 0, err0);
-
-	/* Set TCP_CORK or TCP_NOPUSH as appropriate. */
-#ifdef TCP_CORK
-	setopt(fd, TCP_CORK, 1, err0);
-#else
-#ifdef TCP_NOPUSH
-#ifndef BROKEN_TCP_NOPUSH
-	setopt(fd, TCP_NOPUSH, 1, err0);
-#endif
-#endif
-#endif
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_uncork(fd):
- * Set the TCP_NODELAY socket option, and clear TCP_CORK or TCP_NOPUSH if
- * either is defined.
- */
-int
-network_uncork(int fd)
-{
-
-	/* Clear TCP_CORK or TCP_NOPUSH as appropriate. */
-#ifdef TCP_CORK
-	setopt(fd, TCP_CORK, 0, err0);
-#else
-#ifdef TCP_NOPUSH
-#ifndef BROKEN_TCP_NOPUSH
-	setopt(fd, TCP_NOPUSH, 0, err0);
-#endif
-#endif
-#endif
-
-	/* Set TCP_NODELAY. */
-	/*
-	 * For compatibility with Linux 2.4, this must be done after we
-	 * clear TCP_CORK; otherwise it will throw an EINVAL back at us.
-	 */
-	setopt(fd, TCP_NODELAY, 1, err0);
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_internal.h tarsnap-autoconf-1.0.34/lib/network/network_internal.h
--- tarsnap-autoconf-1.0.33/lib/network/network_internal.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_internal.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,44 +0,0 @@
-#ifndef _NETWORK_INTERNAL_H_
-#define _NETWORK_INTERNAL_H_
-
-/* Maximum number of bytes which can be read/writ right now. */
-extern size_t network_bwlimit_read;
-extern size_t network_bwlimit_write;
-
-/* Macros for handling struct timeval values. */
-#define tv_lt(a, b)				\
-	(((a)->tv_sec < (b)->tv_sec) ||		\
-	    (((a)->tv_sec == (b)->tv_sec) &&	\
-		((a)->tv_usec < (b)->tv_usec)))
-#define tv_add(a, b)	do {			\
-	(a)->tv_sec += (b)->tv_sec;		\
-	(a)->tv_usec += (b)->tv_usec;		\
-	if ((a)->tv_usec >= 1000000) {		\
-		(a)->tv_usec -= 1000000;	\
-		(a)->tv_sec += 1;		\
-	}					\
-} while (0)
-#define tv_sub(a, b)	do {			\
-	(a)->tv_sec -= (b)->tv_sec;		\
-	(a)->tv_usec -= (b)->tv_usec;		\
-	if ((a)->tv_usec < 0) {			\
-		(a)->tv_usec += 1000000;	\
-		(a)->tv_sec -= 1;		\
-	}					\
-} while (0)
-
-/**
- * network_cork(fd):
- * Clear the TCP_NODELAY socket option, and set TCP_CORK or TCP_NOPUSH if
- * either is defined.
- */
-int network_cork(int);
-
-/**
- * network_uncork(fd):
- * Set the TCP_NODELAY socket option, and clear TCP_CORK or TCP_NOPUSH if
- * either is defined.
- */
-int network_uncork(int);
-
-#endif /* !_NETWORK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_select.c tarsnap-autoconf-1.0.34/lib/network/network_select.c
--- tarsnap-autoconf-1.0.33/lib/network/network_select.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_select.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,750 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <sys/select.h>
-#include <sys/time.h>
-
-#include <errno.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "monoclock.h"
-#include "network_internal.h"
-#include "tvmath.h"
-#include "warnp.h"
-
-#include "network.h"
-
-/*
- * Fake operation type to allow unconditional sleeping to reuse code from
- * the waiting-on-a-socket routines.  Note that while N.writers[k] and
- * N.readers[k] both refer to the socket with file descriptor k, N.waiters[k]
- * is completely unrelated (and has entries allocated sequentially as
- * calls to network_sleep are made).
- */
-#define NETWORK_OP_WAIT	2
-
-struct network_callback_internal {
-	network_callback * callback;
-	void * cookie;
-	struct timeval timeout;
-};
-
-struct network_internal {
-	struct network_callback_internal * writers;
-	struct network_callback_internal * readers;
-	struct network_callback_internal * waiters;
-	size_t alloclen;
-	int maxfd;
-} N;
-
-/* Bandwidth limits, in bytes per second. */
-static double bwlimit_Bps_read;
-static double bwlimit_Bps_write;
-
-/* Current number of tokens in read/write bandwidth limit buckets. */
-size_t network_bwlimit_read;
-size_t network_bwlimit_write;
-
-/* Last time tokens were added to read/write buckets. */
-static struct timeval bwlimit_lastadd;
-
-/* Time when last select call returned. */
-static struct timeval select_rettime;
-
-/* Statistics on the time between select calls. */
-static double select_period_N;
-static double select_period_mu;
-static double select_period_M2;
-static double select_period_max;
-
-static int recalloc(void ** ptr, size_t clen, size_t nlen, size_t size);
-static int docallback(struct network_callback_internal * C, int timedout);
-static void selectstats_select(void);
-static void selectstats_startclock(void);
-static void selectstats_stopclock(void);
-
-/**
- * recalloc(ptr, clen, nlen, size):
- * Reallocate the pointer to which ${ptr} points so that it points to
- * enough space for ${nlen} objects of size ${size}.  Copy the first
- * min(${clen}, ${nlen}) such objects into the new buffer, and zero the
- * rest of the newly allocated buffer.
- */
-static int
-recalloc(void ** ptr, size_t clen, size_t nlen, size_t size)
-{
-	void * nbuf;
-	size_t cplen;
-
-	/* Make sure nlen * size won't overflow. */
-	if (nlen > SIZE_MAX / size) {
-		errno = ENOMEM;
-		goto err0;
-	}
-
-	/* Perform new allocation. */
-	if ((nbuf = malloc(nlen * size)) == NULL)
-		goto err0;
-
-	/* Copy data across. */
-	if (clen > nlen)
-		cplen = nlen;
-	else
-		cplen = clen;
-	if (cplen > 0)
-		memcpy(nbuf, *ptr, cplen * size);
-
-	/* Zero any uninitialized buffer contents. */
-	memset((void *)((char *)nbuf + cplen * size), 0,
-	    (nlen - cplen) * size);
-
-	/* Free old buffer. */
-	free(*ptr);
-
-	/* Keep the pointer to the new buffer. */
-	*ptr = nbuf;
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * docallback(C, timedout):
- * Call (C->callback)(C->cookie, NETWORK_STATUS_OK), ..._TIMEOUT, or
- * ..._CANCEL depending on whether timedout is 0, 1, or -1 respectively; but
- * set C->callback to NULL first.
- */
-static int
-docallback(struct network_callback_internal * C, int timedout)
-{
-	network_callback * cb;
-	int status;
-
-	cb = C->callback;
-	C->callback = NULL;
-	switch (timedout) {
-	case -1:
-		status = NETWORK_STATUS_CANCEL;
-		break;
-	case 0:
-		status = NETWORK_STATUS_OK;
-		break;
-	case 1:
-		status = NETWORK_STATUS_TIMEOUT;
-		break;
-	default:
-		warn0("Programmer error: Invalid status to docallback");
-		return (-1);
-	}
-
-	return ((cb)(C->cookie, status));
-}
-
-/**
- * selectstats_select(void):
- * Update select_period_* statistics in relation to an upcoming select call.
- */
-static void
-selectstats_select(void)
-{
-	struct timeval tnow;
-	double t;
-	double d;
-
-	/* If the clock isn't running, do nothing. */
-	if ((select_rettime.tv_sec == 0) && (select_rettime.tv_usec == 0))
-		return;
-
-	/* If we can't get the current time, do nothing. */
-	if (monoclock_get(&tnow))
-		return;
-
-	/* Figure out how long it has been since the clock started. */
-	t = (tnow.tv_sec - select_rettime.tv_sec) +
-	    (tnow.tv_usec - select_rettime.tv_usec) * 0.000001;
-
-	/* Adjust statistics. */
-	select_period_N += 1.0;
-	d = t - select_period_mu;
-	select_period_mu += d / select_period_N;
-	select_period_M2 += d * (t - select_period_mu);
-	if (t > select_period_max)
-		select_period_max = t;
-
-	/* Stop the clock. */
-	selectstats_stopclock();
-}
-
-/**
- * selectstats_startclock(void):
- * Start the time-between-selects clock.
- */
-static void
-selectstats_startclock(void)
-{
-
-	/* Is the clock already running? */
-	if ((select_rettime.tv_sec == 0) &&
-	    (select_rettime.tv_usec == 0)) {
-		monoclock_get(&select_rettime);
-	}
-}
-
-/**
- * selectstats_stopclock(void):
- * Stop the time-between-selects clock.
- */
-static void
-selectstats_stopclock(void)
-{
-
-	select_rettime.tv_sec = 0;
-	select_rettime.tv_usec = 0;
-}
-
-/**
- * network_init(void):
- * Initialize the network subsystem and return a cookie.
- */
-int
-network_init(void)
-{
-
-	/* No memory allocated yet. */
-	N.writers = N.readers = N.waiters = NULL;
-	N.alloclen = 0;
-
-	/* No file descriptors yet, either. */
-	N.maxfd = -1;
-
-	/*
-	 * Set a default bandwidth limit of 1 GBps until network_bwlimit is
-	 * called to set a lower limit.  The value 1 GBps is chosen so that
-	 * 2 seconds of bandwidth (see network_select) won't overflow size_t
-	 * on a 32-bit system.
-	 */
-	bwlimit_Bps_read = bwlimit_Bps_write = 1000000000.;
-
-	/* We have no tokens in our bandwidth quota buckets yet. */
-	network_bwlimit_read = network_bwlimit_write = 0;
-
-	/* The buckets were empty at the start of the epoch. */
-	bwlimit_lastadd.tv_sec = 0;
-	bwlimit_lastadd.tv_usec = 0;
-
-	/* We've never called select. */
-	select_rettime.tv_sec = 0;
-	select_rettime.tv_usec = 0;
-	select_period_N = 0.0;
-	select_period_mu = 0.0;
-	select_period_M2 = 0.0;
-	select_period_max = 0.0;
-
-	/* Success! */
-	return (0);
-}
-
-/**
- * network_bwlimit(down, up):
- * Set the bandwidth rate limit to ${down} bytes per second of read bandwidth
- * and ${up} bytes per second of write bandwidth.  The values ${down} and
- * ${up} must be between 8000 and 10^9.
- */
-void
-network_bwlimit(double down, double up)
-{
-
-	bwlimit_Bps_read = down;
-	bwlimit_Bps_write = up;
-}
-
-/**
- * network_register(fd, op, timeo, callback, cookie):
- * Register a callback to be performed by network_select when file descriptor
- * ${fd} is ready for operation ${op}, or once the timeout has expired.
- */
-int
-network_register(int fd, int op, struct timeval * timeo,
-    network_callback * callback, void * cookie)
-{
-	struct network_callback_internal * nci;
-	size_t newalloclen;
-
-	/* Sanity-check the file descriptor. */
-	if ((fd < 0) || (fd >= (int)FD_SETSIZE)) {
-		warn0("Invalid file descriptor: %d", fd);
-		goto err0;
-	}
-
-	/* Enlarge buffers if necessary. */
-	if ((size_t)(fd) >= N.alloclen) {
-		/*
-		 * Guaranteed to enlarge the buffers enough AND to at least
-		 * double the buffer size (thus preventing O(n^2) total
-		 * reallocation costs).
-		 */
-		newalloclen = N.alloclen + fd + 1;
-		if (newalloclen < N.alloclen) {
-			/* Integer overflows are bad. */
-			errno = ENOMEM;
-			goto err0;
-		}
-
-		/*
-		 * Enlarge the buffers and zero the new memory.  If one of
-		 * the reallocations fails, we may end up with some buffers
-		 * being allocated extra space; but this is harmless.
-		 */
-		if (recalloc((void *)&N.writers, N.alloclen, newalloclen,
-		    sizeof(struct network_callback_internal)))
-			goto err0;
-		if (recalloc((void *)&N.readers, N.alloclen, newalloclen,
-		    sizeof(struct network_callback_internal)))
-			goto err0;
-		if (recalloc((void *)&N.waiters, N.alloclen, newalloclen,
-		    sizeof(struct network_callback_internal)))
-			goto err0;
-
-		/* The buffers have been enlarged. */
-		N.alloclen = newalloclen;
-	}
-
-	/* Figure out which network_callback_internal we're touching. */
-	switch (op) {
-	case NETWORK_OP_READ:
-		nci = &N.readers[fd];
-		break;
-	case NETWORK_OP_WRITE:
-		nci = &N.writers[fd];
-		break;
-	case NETWORK_OP_WAIT:
-		nci = &N.waiters[fd];
-		break;
-	default:
-		warn0("Programmer error: "
-		    "Invalid operation type in network_register");
-		goto err0;
-	}
-
-	/* Make sure that we're not replacing an existing callback. */
-	if (nci->callback != NULL) {
-		warn0("Replacing callback: op = %d, fd = %d", op, fd);
-		goto err0;
-	}
-
-	/* Set the callback and cookie. */
-	nci->callback = callback;
-	nci->cookie = cookie;
-
-	/* Convert the timeout into an absolute time. */
-	if (timeo == NULL)
-		memset(&nci->timeout, 0, sizeof(struct timeval));
-	else
-		memcpy(&nci->timeout, timeo, sizeof(struct timeval));
-	if (tvmath_addctime(&nci->timeout)) {
-		nci->callback = NULL;
-		goto err0;
-	}
-
-	/* Update the number of the highest used fd if necessary. */
-	if (N.maxfd < fd)
-		N.maxfd = fd;
-
-	/*
-	 * If we're not already timing a window-between-selects, start the
-	 * timer now.
-	 */
-	selectstats_startclock();
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_deregister(fd, op):
- * Deregister the callback, if any, for operation ${op} on descriptor ${fd}.
- * The callback will be called with a status of NETWORK_STATUS_CANCEL.
- */
-int
-network_deregister(int fd, int op)
-{
-	struct network_callback_internal * nci;
-	int rc = 0;
-
-	/*
-	 * Do nothing if fd is larger than the allocated array length.  This
-	 * can occur if a socket is opened and closed without ever having a
-	 * callback registered, e.g., if connect() fails without blocking.
-	 */
-	if ((size_t)(fd) >= N.alloclen)
-		goto done;
-
-	/* Figure out which network_callback_internal we're touching. */
-	switch (op) {
-	case NETWORK_OP_READ:
-		nci = &N.readers[fd];
-		break;
-	case NETWORK_OP_WRITE:
-		nci = &N.writers[fd];
-		break;
-	case NETWORK_OP_WAIT:
-		nci = &N.waiters[fd];
-		break;
-	default:
-		warn0("Programmer error: "
-		    "Invalid operation type in network_register");
-		goto err0;
-	}
-
-	/* Do the callback, if one exists. */
-	if (nci->callback != NULL)
-		rc = docallback(nci, -1);
-	else
-		rc = 0;
-
-done:
-	/* Return value from callback. */
-	return (rc);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_sleep(timeo, callback, cookie):
- * Register a callback to be performed by network_select once the specified
- * timeout has expired.  Return a handle which can be passed to
- * network_desleep().
- */
-int
-network_sleep(struct timeval * timeo,
-    network_callback * callback, void * cookie)
-{
-	int fd;
-
-	/* Pick a "file descriptor" for which there is no waiter yet. */
-	for (fd = 0; (size_t)(fd) < N.alloclen; fd++) {
-		if (N.waiters[fd].callback == NULL)
-			break;
-	}
-
-	/* Register the callback. */
-	if (network_register(fd, NETWORK_OP_WAIT, timeo, callback, cookie))
-		goto err0;
-
-	/* Return the "file descriptor" as handle. */
-	return (fd);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_desleep(handle):
- * Deregister the callback associated with the provided handle.  The
- * callback will be called with a status of NETWORK_STATUS_CANCEL.
- */
-int
-network_desleep(int handle)
-{
-
-	/* Let network_deregister do the work. */
-	return (network_deregister(handle, NETWORK_OP_WAIT));
-}
-
-/**
- * network_select(blocking):
- * Call select(2) on file descriptors provided via network_register and make
- * callbacks as appropriate (including timeouts).  Callbacks are deregistered
- * before being performed.  If ${blocking} is non-zero, allow select(2) to
- * block waiting for descriptors and timeouts.  Stop performing callbacks and
- * return the first non-zero value returned by a callback if one occurs.
- */
-int
-network_select(int blocking)
-{
-	fd_set readfds;
-	fd_set writefds;
-	struct timeval timeout;
-	struct timeval curtime;
-	int nready;
-	int fd;
-	int rc;
-	int ntimeouts = 0;
-	double tokensecs;
-
-restart:
-	/* Get current time. */
-	if (monoclock_get(&curtime))
-		goto err0;
-
-	/*
-	 * Figure out how long it has been since we last added tokens to the
-	 * bandwidth limit buckets.  If less than 10 ms, pretend that it is
-	 * zero; this keeps rounding errors to a minimum.
-	 */
-	tokensecs = (curtime.tv_sec - bwlimit_lastadd.tv_sec) +
-	    (curtime.tv_usec - bwlimit_lastadd.tv_usec) * 0.000001;
-	if (tokensecs < 0.01) {
-		tokensecs = 0;
-	} else {
-		memcpy(&bwlimit_lastadd, &curtime, sizeof(struct timeval));
-	}
-
-	/*
-	 * Add tokens to the read bandwidth token bucket, overflowing if we
-	 * hit 2 seconds of bandwidth.  (Why 2 seconds?  Because it's more
-	 * than a network RTT, so as long as we're called at least once every
-	 * 2 seconds, we won't starve the TCP stack; and because it's small
-	 * enough that we won't end up with incredibly bursty network traffic.
-	 */
-	if (network_bwlimit_read / bwlimit_Bps_read + tokensecs > 2)
-		network_bwlimit_read = bwlimit_Bps_read * 2;
-	else
-		network_bwlimit_read += bwlimit_Bps_read * tokensecs;
-
-	/* Do likewise for write bandwidth. */
-	if (network_bwlimit_write / bwlimit_Bps_write + tokensecs > 2)
-		network_bwlimit_write = bwlimit_Bps_write * 2;
-	else
-		network_bwlimit_write += bwlimit_Bps_write * tokensecs;
-
-	/* If we're allowed to block, figure out how long to block for. */
-	if (blocking) {
-		/* Find the earliest timeout time, if prior to now + 1d. */
-		memcpy(&timeout, &curtime, sizeof(struct timeval));
-		timeout.tv_sec += 86400;
-		for (fd = 0; fd <= N.maxfd; fd++) {
-			if (N.readers[fd].callback != NULL) {
-				ntimeouts++;
-				if (tv_lt(&N.readers[fd].timeout, &timeout))
-					memcpy(&timeout,
-					    &N.readers[fd].timeout,
-					    sizeof(struct timeval));
-			}
-			if (N.writers[fd].callback != NULL) {
-				ntimeouts++;
-				if (tv_lt(&N.writers[fd].timeout, &timeout))
-					memcpy(&timeout,
-					    &N.writers[fd].timeout,
-					    sizeof(struct timeval));
-			}
-			if (N.waiters[fd].callback != NULL) {
-				ntimeouts++;
-				if (tv_lt(&N.waiters[fd].timeout, &timeout))
-					memcpy(&timeout,
-					    &N.waiters[fd].timeout,
-					    sizeof(struct timeval));
-			}
-		}
-
-		/* Subtract the current time, clamping at zero. */
-		if (tv_lt(&timeout, &curtime))
-			memset(&timeout, 0, sizeof(struct timeval));
-		else
-			tv_sub(&timeout, &curtime);
-
-		/* Make sure that we have something to wait for. */
-		if (ntimeouts == 0) {
-			warn0("Blocking network_select with no callbacks!");
-			goto err0;
-		}
-	} else {
-		memset(&timeout, 0, sizeof(struct timeval));
-	}
-
-selectagain:
-	/* Construct fd sets. */
-	FD_ZERO(&readfds);
-	FD_ZERO(&writefds);
-	for (fd = 0; fd <= N.maxfd; fd++) {
-		if (N.readers[fd].callback != NULL)
-			FD_SET(fd, &readfds);
-		if (N.writers[fd].callback != NULL)
-			FD_SET(fd, &writefds);
-	}
-
-	/*
-	 * If the read bandwidth quota is less than one normal-sized TCP
-	 * packet, zero the read set and set the blocking duration to a
-	 * maximum of 10 ms.
-	 */
-	if (network_bwlimit_read < 1460) {
-		FD_ZERO(&readfds);
-		if ((timeout.tv_sec > 0) || (timeout.tv_usec > 10000)) {
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 10000;
-		}
-	}
-
-	/* Do likewise for writes. */
-	if (network_bwlimit_write < 1460) {
-		FD_ZERO(&writefds);
-		if ((timeout.tv_sec > 0) || (timeout.tv_usec > 10000)) {
-			timeout.tv_sec = 0;
-			timeout.tv_usec = 10000;
-		}
-	}
-
-	/* Call select(2). */
-	selectstats_select();
-	while ((nready = select(N.maxfd + 1, &readfds, &writefds,
-	    NULL, &timeout)) == -1) {
-		/*
-		 * EINTR is harmless, but on linux (contrary to POSIX!) it is
-		 * documented as rendering the fd sets and timeout undefined.
-		 * Go back to the start of the function and regenerate all of
-		 * those (we can't just save and restore them in case some
-		 * time passed before the signal arrived and the select call
-		 * was interrupted).
-		 */
-		if (errno == EINTR)
-			goto restart;
-
-		/* Anything else is an error. */
-		warnp("select()");
-		goto err0;
-	}
-	selectstats_startclock();
-
-	/* Get current time so that we can detect timeouts. */
-	if (monoclock_get(&curtime))
-		goto err0;
-
-	/*
-	 * Scan the descriptors in decreasing order, just in case maxfd is
-	 * changed as a result of a callback.
-	 */
-	for (fd = N.maxfd; fd >= 0; fd--) {
-		/* Is the descriptor ready for reading? */
-		if ((N.readers[fd].callback != NULL) &&
-		    FD_ISSET(fd, &readfds))
-			if ((rc = docallback(&N.readers[fd], 0)) != 0)
-				goto cberr;
-		/* Did the read callback timeout? */
-		if ((N.readers[fd].callback != NULL) &&
-		    tv_lt(&N.readers[fd].timeout, &curtime))
-			if ((rc = docallback(&N.readers[fd], 1)) != 0)
-				goto cberr;
-
-		/* Is the descriptor ready for writing? */
-		if ((N.writers[fd].callback != NULL) &&
-		    FD_ISSET(fd, &writefds))
-			if ((rc = docallback(&N.writers[fd], 0)) != 0)
-				goto cberr;
-		/* Did the write callback timeout? */
-		if ((N.writers[fd].callback != NULL) &&
-		    tv_lt(&N.writers[fd].timeout, &curtime))
-			if ((rc = docallback(&N.writers[fd], 1)) != 0)
-				goto cberr;
-
-		/* Did the wait callback timeout? */
-		if ((N.waiters[fd].callback != NULL) &&
-		    tv_lt(&N.waiters[fd].timeout, &curtime))
-			if ((rc = docallback(&N.waiters[fd], 1)) != 0)
-				goto cberr;
-
-		/* Can we reduce maxfd? */
-		if ((fd == N.maxfd) &&
-		    (N.readers[fd].callback == NULL) &&
-		    (N.writers[fd].callback == NULL) &&
-		    (N.waiters[fd].callback == NULL))
-			N.maxfd--;
-	}
-
-	/*
-	 * If we did at least one callback and we're not blocking, go back
-	 * and see if we can do any more callbacks.
-	 */
-	if ((nready > 0) && (blocking == 0))
-		goto selectagain;
-
-	/*
-	 * If we don't have any registered callback any more, stop the
-	 * time-between-select-calls clock.
-	 */
-	if (N.maxfd == -1)
-		selectstats_stopclock();
-
-	/* Success! */
-	return (0);
-
-cberr:
-	/* A callback returned a non-zero value. */
-	return (rc);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_spin(done):
- * Repeatedly call network_select until either an error occurs or the value
- * pointed to by ${done} is non-zero.
- */
-int
-network_spin(int * done)
-{
-
-	while (*done == 0) {
-		if (network_select(1))
-			goto err0;
-	}
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_getselectstats(N, mu, va, max):
- * Return and zero statistics on the time between select(2) calls.
- */
-void
-network_getselectstats(double * NN, double * mu, double * va, double * max)
-{
-
-	/* Copy statistics out. */
-	*NN = select_period_N;
-	*mu = select_period_mu;
-	if (select_period_N > 1.0)
-		*va = select_period_M2 / (select_period_N - 1);
-	else
-		*va = 0.0;
-	*max = select_period_max;
-
-	/* Zero statistics. */
-	select_period_N = 0.0;
-	select_period_mu = 0.0;
-	select_period_M2 = 0.0;
-	select_period_max = 0.0;
-}
-
-/**
- * network_fini(void):
- * Free resources associated with the network subsystem.
- */
-void
-network_fini(void)
-{
-
-	/* Free callbacks, cookies, and timeouts. */
-	free(N.readers);
-	free(N.writers);
-	free(N.waiters);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/network_writeq.c tarsnap-autoconf-1.0.34/lib/network/network_writeq.c
--- tarsnap-autoconf-1.0.33/lib/network/network_writeq.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/network/network_writeq.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,249 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <sys/time.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "network_internal.h"
-#include "tvmath.h"
-#include "warnp.h"
-
-#include "network.h"
-
-struct network_writeq_buf {
-	const uint8_t * buf;
-	size_t buflen;
-	struct timeval timeo;
-	int abstimeo;
-	network_callback * callback;
-	void * cookie;
-	struct network_writeq_buf * next;
-};
-struct network_writeq_internal {
-	int fd;
-	struct network_writeq_buf * head;
-	struct network_writeq_buf ** tailptr;
-};
-
-static int dowrite(struct network_writeq_internal *);
-static network_callback callback_bufdone;
-
-static int
-dowrite(struct network_writeq_internal * Q)
-{
-	struct network_writeq_buf * QB = Q->head;
-	struct timeval timeo;
-
-	/* Figure out how long to allow for this buffer write. */
-	memcpy(&timeo, &QB->timeo, sizeof(struct timeval));
-	if (QB->abstimeo && tvmath_subctime(&timeo))
-		goto err0;
-
-	/* Write the buffer. */
-	if (network_write(Q->fd, QB->buf, QB->buflen, &timeo, &timeo,
-	    callback_bufdone, Q))
-		goto err0;
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * callback_bufdone(cookie, status):
- * Call the upstream callback for the buffer at the head of the write queue
- * ${cookie}, remove it from the queue, and write the next buffer.
- */
-static int
-callback_bufdone(void * cookie, int status)
-{
-	struct network_writeq_internal * Q = cookie;
-	struct network_writeq_buf * head_old;
-	int rc;
-
-	/* Unlink the current buffer from the queue. */
-	head_old = Q->head;
-	Q->head = head_old->next;
-
-	/* Update tail pointer if necessary. */
-	if (Q->tailptr == &head_old->next)
-		Q->tailptr = &Q->head;
-
-	/*
-	 * A callback of NETWORK_STATUS_CLOSED in response to an attempt to
-	 * write zero bytes is really a NETWORK_STATUS_ZEROBYTE.
-	 */
-	if ((status == NETWORK_STATUS_CLOSED) && (head_old->buflen == 0))
-		status = NETWORK_STATUS_ZEROBYTE;
-
-	/*
-	 * If there's another buffer waiting to be written, register it to
-	 * be sent.  If not and we're not handling an error, uncork the
-	 * socket.
-	 */
-	if (Q->head != NULL) {
-		if (dowrite(Q))
-			goto err1;
-	} else {
-		if ((status == NETWORK_STATUS_OK) && network_uncork(Q->fd))
-			status = NETWORK_STATUS_ERR;
-	}
-
-	/* Call the upstream callback. */
-	rc = (head_old->callback)(head_old->cookie, status);
-
-	/* Free the write parameters structure. */
-	free(head_old);
-
-	/* Return value from callback. */
-	return (rc);
-
-err1:
-	(head_old->callback)(head_old->cookie, status);
-	free(head_old);
-
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_writeq_init(fd):
- * Construct a queue to be used for writing data to ${fd}.
- */
-NETWORK_WRITEQ *
-network_writeq_init(int fd)
-{
-	struct network_writeq_internal * Q;
-
-	/* Allocate memory. */
-	if ((Q = malloc(sizeof(struct network_writeq_internal))) == NULL)
-		goto err0;
-
-	/* Initialize structure. */
-	Q->fd = fd;
-	Q->head = NULL;
-	Q->tailptr = &Q->head;
-
-	/* Success! */
-	return (Q);
-
-err0:
-	/* Failure! */
-	return (NULL);
-}
-
-/**
- * _network_writeq_add(Q, buf, buflen, timeo, callback, cookie, abstimeo):
- * Add a buffer write to the specified write queue.  The callback function
- * will be called when the write is finished, fails, or is cancelled.
- * If ${abstimeo} is zero, the timeout is relative to when the buffer in
- * question starts to be written (i.e., when the previous buffered write
- * finishes); otherwise, the timeout is relative to the present time.  If
- * ${buflen} is zero, the callback will be performed, at the appropriate
- * point, with a status of NETWORK_STATUS_ZEROBYTE.
- */
-int
-_network_writeq_add(NETWORK_WRITEQ * Q, const uint8_t * buf, size_t buflen,
-    struct timeval * timeo, network_callback * callback, void * cookie,
-    int abstimeo)
-{
-	struct network_writeq_buf * QB;
-	struct network_writeq_buf ** tailptr_old;
-	struct network_writeq_buf * head_old;
-
-	/* Wrap parameters into a structure. */
-	if ((QB = malloc(sizeof(struct network_writeq_buf))) == NULL)
-		goto err0;
-	QB->buf = buf;
-	QB->buflen = buflen;
-	memcpy(&QB->timeo, timeo, sizeof(struct timeval));
-	QB->abstimeo = abstimeo;
-	QB->callback = callback;
-	QB->cookie = cookie;
-	QB->next = NULL;
-
-	/* Compute absolute time if appropriate. */
-	if (abstimeo && tvmath_addctime(&QB->timeo))
-		goto err1;
-
-	/* Add this to the write queue. */
-	head_old = Q->head;
-	tailptr_old = Q->tailptr;
-	*Q->tailptr = QB;
-	Q->tailptr = &QB->next;
-
-	/* If the queue head was NULL, we need to kick off the writing. */
-	if (head_old == NULL) {
-		/* Cork the socket so that we don't send small packets. */
-		if (network_cork(Q->fd))
-			goto err2;
-
-		if (dowrite(Q))
-			goto err2;
-	}
-
-	/* Success! */
-	return (0);
-
-err2:
-	Q->tailptr = tailptr_old;
-	*Q->tailptr = NULL;
-err1:
-	free(QB);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-/**
- * network_writeq_cancel(Q):
- * Cancel all queued writes, including any partially completed writes.  Note
- * that since this leaves the connection in an indeterminate state (there is
- * no way to know how much data from the currently in-progress write was
- * written) this should probably only be used prior to closing a connection.
- * The callbacks for each pending write will be called with a status of
- * NETWORK_STATUS_DEQUEUE, and network_writeq_cancel will return the first
- * non-zero value returned by a callback.
- */
-int
-network_writeq_cancel(NETWORK_WRITEQ * Q)
-{
-	int rc = 0, rc2;
-
-	/* Keep on deregistering callbacks until the queue is empty. */
-	while (Q->head != NULL) {
-		rc2 = network_deregister(Q->fd, NETWORK_OP_WRITE);
-		rc = rc ? rc : rc2;
-	}
-
-	/* Return first non-zero result from deregistration. */
-	return (rc);
-}
-
-/**
- * network_writeq_free(Q):
- * Free the specified write queue.  If there might be any pending writes,
- * network_writeq_cancel should be called first.
- */
-void
-network_writeq_free(NETWORK_WRITEQ * Q)
-{
-	struct network_writeq_buf * head_old;
-
-	/* Repeat until the queue is empty. */
-	while (Q->head != NULL) {
-		/* Unlink the current buffer from the queue. */
-		head_old = Q->head;
-		Q->head = Q->head->next;
-
-		/* Free the write parameters structure. */
-		free(head_old);
-	}
-
-	/* Free the queue structure itself. */
-	free(Q);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork.h tarsnap-autoconf-1.0.34/lib/network/tsnetwork.h
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,168 @@
+#ifndef _TSNETWORK_H_
+#define _TSNETWORK_H_
+
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+
+#include <stdint.h>
+
+typedef struct network_writeq_internal NETWORK_WRITEQ;
+typedef int network_callback(void *, int);
+
+/* "op" parameters to network_register. */
+#define	NETWORK_OP_READ		0
+#define	NETWORK_OP_WRITE	1
+
+/* callback status values. */
+#define NETWORK_STATUS_CONNERR	(-2)	/* Error connecting to server. */
+#define NETWORK_STATUS_ERR	(-1)	/* Error from recv/send. */
+#define NETWORK_STATUS_OK	0	/* Success. */
+#define NETWORK_STATUS_TIMEOUT	1	/* Timeout. */
+#define NETWORK_STATUS_NODATA	2	/* Timeout with empty buffer. */
+#define NETWORK_STATUS_CTIMEOUT	3	/* Timeout connecting to server. */
+#define NETWORK_STATUS_CLOSED	4	/* Connection was closed. */
+#define NETWORK_STATUS_CANCEL	5	/* Operation cancelled. */
+#define NETWORK_STATUS_ZEROBYTE	6	/* Zero-byte write via writeq. */
+#define NETWORK_STATUS_MAX	6
+
+/**
+ * network_bwlimit(down, up):
+ * Set the bandwidth rate limit to ${down} bytes per second of read bandwidth
+ * and ${up} bytes per second of write bandwidth.  The values ${down} and
+ * ${up} must be between 8000 and 10^9.
+ */
+void network_bwlimit(double, double);
+
+/**
+ * network_register(fd, op, timeo, callback, cookie):
+ * Register a callback to be performed by network_select when file descriptor
+ * ${fd} is ready for operation ${op}, or once the timeout has expired.
+ */
+int network_register(int, int, struct timeval *, network_callback *, void *);
+
+/**
+ * network_deregister(fd, op):
+ * Deregister the callback, if any, for operation ${op} on descriptor ${fd}.
+ * The callback will be called with a status of NETWORK_STATUS_CANCEL.
+ */
+int network_deregister(int, int);
+
+/**
+ * network_sleep(timeo, callback, cookie):
+ * Register a callback to be performed by network_select once the specified
+ * timeout has expired.  Return a handle which can be passed to
+ * network_desleep().
+ */
+int network_sleep(struct timeval *, network_callback *, void *);
+
+/**
+ * network_desleep(handle):
+ * Deregister the callback associated with the provided handle.  The
+ * callback will be called with a status of NETWORK_STATUS_CANCEL.
+ */
+int network_desleep(int);
+
+/**
+ * network_select(blocking):
+ * Call select(2) on file descriptors provided via network_register and make
+ * callbacks as appropriate (including timeouts).  Callbacks are deregistered
+ * before being performed.  If ${blocking} is non-zero, allow select(2) to
+ * block waiting for descriptors and timeouts.  Stop performing callbacks and
+ * return the first non-zero value returned by a callback if one occurs.
+ */
+int network_select(int);
+
+/**
+ * network_spin(done):
+ * Repeatedly call network_select until either an error occurs or the value
+ * pointed to by ${done} is non-zero.
+ */
+int network_spin(int *);
+
+/**
+ * tsnetwork_connect(s, addr, addrlen, timeout, callback, cookie):
+ * Connect the specified socket to the specified address, and call the
+ * specified callback when connected or the connection attempt has failed.
+ */
+int tsnetwork_connect(int, const struct sockaddr *, socklen_t,
+    struct timeval *, network_callback *, void *);
+
+/**
+ * tsnetwork_read(fd, buf, buflen, to0, to1, callback, cookie):
+ * Asynchronously fill the provided buffer with data from ${fd}, and call
+ * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
+ * out if no data can be read for a period of time to0, or if the complete
+ * buffer has not been read after time to1.  Note that ${buflen} must be
+ * non-zero, since otherwise deadlock would result.
+ */
+int tsnetwork_read(int, uint8_t *, size_t, struct timeval *, struct timeval *,
+    network_callback *, void *);
+
+/**
+ * tsnetwork_write(fd, buf, buflen, to0, to1, callback, cookie):
+ * Asynchronously write data from the provided buffer to ${fd}, and call
+ * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
+ * out if no data can be written for a period of time to0, or if the complete
+ * buffer has not been written after time to1.  If ${buflen} is zero, the
+ * callback will be invoked with a status of NETWORK_STATUS_CLOSED, even if
+ * the connection is still open.
+ */
+int tsnetwork_write(int, const uint8_t *, size_t, struct timeval *,
+    struct timeval *, network_callback *, void *);
+
+/**
+ * network_writeq_init(fd):
+ * Construct a queue to be used for writing data to ${fd}.
+ */
+NETWORK_WRITEQ * network_writeq_init(int);
+
+/**
+ * _network_writeq_add(Q, buf, buflen, timeo, callback, cookie, abstimeo):
+ * Add a buffer write to the specified write queue.  The callback function
+ * will be called when the write is finished, fails, or is cancelled.
+ * If ${abstimeo} is zero, the timeout is relative to when the buffer in
+ * question starts to be written (i.e., when the previous buffered write
+ * finishes); otherwise, the timeout is relative to the present time.  If
+ * ${buflen} is zero, the callback will be performed, at the appropriate
+ * point, with a status of NETWORK_STATUS_ZEROBYTE.
+ */
+int _network_writeq_add(NETWORK_WRITEQ *, const uint8_t *, size_t,
+    struct timeval *, network_callback *, void *, int);
+#define network_writeq_add(Q, buf, buflen, timeo, callback, cookie)	\
+	_network_writeq_add(Q, buf, buflen, timeo, callback, cookie, 0)
+#define network_writeq_add_abs(Q, buf, buflen, timeo, callback, cookie)	\
+	_network_writeq_add(Q, buf, buflen, timeo, callback, cookie, 1)
+
+/**
+ * network_writeq_cancel(Q):
+ * Cancel all queued writes, including any partially completed writes.  Note
+ * that since this leaves the connection in an indeterminate state (there is
+ * no way to know how much data from the currently in-progress write was
+ * written) this should probably only be used prior to closing a connection.
+ * The callbacks for each pending write will be called with a status of
+ * NETWORK_STATUS_DEQUEUE, and network_writeq_cancel will return the first
+ * non-zero value returned by a callback.
+ */
+int network_writeq_cancel(NETWORK_WRITEQ *);
+
+/**
+ * network_writeq_free(Q):
+ * Free the specified write queue.  If there might be any pending writes,
+ * network_writeq_cancel should be called first.
+ */
+void network_writeq_free(NETWORK_WRITEQ *);
+
+/**
+ * network_getselectstats(N, mu, va, max):
+ * Return statistics on the time between select(2) calls.
+ */
+void network_getselectstats(double *, double *, double *, double *);
+
+/**
+ * network_fini(void):
+ * Free resources associated with the network subsystem.
+ */
+void network_fini(void);
+
+#endif /* !_TSNETWORK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_buf.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_buf.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_buf.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_buf.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,293 @@
+#include "bsdtar_platform.h"
+
+#include <sys/socket.h>
+#include <sys/time.h>
+
+#include <signal.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "tsnetwork_internal.h"
+#include "tarsnap_opt.h"
+#include "tvmath.h"
+#include "warnp.h"
+
+#include "tsnetwork.h"
+
+/*
+ * If MSG_NOSIGNAL isn't defined, define it to zero; and then fiddle with
+ * the socket options when needed.
+ */
+#ifdef MSG_NOSIGNAL
+#define HAVE_MSG_NOSIGNAL
+#endif
+#ifndef HAVE_MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
+struct network_buf_cookie {
+	network_callback * callback;
+	void * cookie;
+	int fd;
+	uint8_t * buf;
+	size_t buflen;
+	size_t bufpos;
+	struct timeval timeout;
+	struct timeval timeout_max;
+	ssize_t (* sendrecv)(int, void *, size_t, int);
+	int netop;
+	int flags;
+};
+
+static int callback_buf(void * cookie, int timedout);
+static int network_buf(int fd, uint8_t * buf, size_t buflen,
+    struct timeval * to0, struct timeval * to1,
+    network_callback * callback, void * cookie,
+    ssize_t (* sendrecv)(int, void *, size_t, int), int netop, int flags);
+
+/**
+ * callback_buf(cookie, status):
+ * Callback helper for tsnetwork_read and network_write.
+ */
+static int
+callback_buf(void * cookie, int status)
+{
+	struct network_buf_cookie * C = cookie;
+	struct timeval timeo;
+	size_t bwlimit;
+	size_t oplen;
+	ssize_t len;
+	int rc = -1;	/* If not callback or reset, we have an error. */
+#ifndef HAVE_MSG_NOSIGNAL
+#ifdef SO_NOSIGPIPE
+	int val;
+#else
+	void (*oldsig)(int);
+#endif
+#endif
+
+	if (status != NETWORK_STATUS_OK) {
+		/* If we have no data, mark a timeout as "no data" instead. */
+		if ((C->bufpos != 0) && (status == NETWORK_STATUS_TIMEOUT))
+			status = NETWORK_STATUS_NODATA;
+		goto docallback;
+	}
+
+	/* Figure out how far we have bandwidth quota for. */
+	if (network_bwlimit_get(C->netop, &bwlimit)) {
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+
+	/* If we have no bandwidth, schedule another callback. */
+	if (bwlimit == 0)
+		goto tryagain;
+
+	/* Try to read/write data to/from the buffer. */
+#ifndef HAVE_MSG_NOSIGNAL
+#ifdef SO_NOSIGPIPE
+	val = 1;
+
+	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+#else
+	if ((oldsig = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) {
+		warnp("signal(SIGPIPE)");
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+#endif
+#endif
+
+	oplen = C->buflen - C->bufpos;
+	if (oplen > bwlimit)
+		oplen = bwlimit;
+	len = (C->sendrecv)(C->fd, C->buf + C->bufpos, oplen, C->flags);
+#ifndef HAVE_MSG_NOSIGNAL
+#ifdef SO_NOSIGPIPE
+	val = 0;
+
+	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+#else
+	if (signal(SIGPIPE, oldsig) == SIG_ERR) {
+		warnp("signal(SIGPIPE)");
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+#endif
+#endif
+
+	/* Failure, closed, or success? */
+	if (len == -1) {
+		/* If no data is available, reset the callback. */
+		if ((errno == EAGAIN) ||
+		    (errno == EWOULDBLOCK) ||
+		    (errno == EINTR))
+			goto tryagain;
+
+		/* An error occurred.  Let the callback handle it. */
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	} else if (len == 0) {
+		/* Socket has been shut down by remote host. */
+		/* This should occur only when receiving, not when sending. */
+		status = NETWORK_STATUS_CLOSED;
+		goto docallback;
+	} else {
+		/* Adjust bandwidth limit. */
+		if (network_bwlimit_eat(C->netop, len)) {
+			status = NETWORK_STATUS_ERR;
+			goto docallback;
+		}
+
+		/* Data has been read/written into/from buffer. */
+		C->bufpos += len;
+		if (C->bufpos == C->buflen) {
+			status = NETWORK_STATUS_OK;
+			goto docallback;
+		}
+
+		/* Fall through to resetting the callback. */
+	}
+
+tryagain:
+	/* We need more data.  Reset the callback. */
+	memcpy(&timeo, &C->timeout, sizeof(struct timeval));
+	if (tvmath_subctime(&timeo)) {
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+	if (tv_lt(&C->timeout_max, &timeo))
+		memcpy(&timeo, &C->timeout_max, sizeof(struct timeval));
+	if (network_register(C->fd, C->netop, &timeo, callback_buf, C)) {
+		status = NETWORK_STATUS_ERR;
+		goto docallback;
+	}
+
+	/* Callback has been reset. */
+	return (0);
+
+docallback:
+	/*
+	 * If there was a network error and we're being verbose, print the
+	 * error now in case errno gets mangled later.
+	 */
+	if ((tarsnap_opt_noisy_warnings) && (status == NETWORK_STATUS_ERR))
+		warnp("Network error");
+
+	/* Call the user callback. */
+	rc = (C->callback)(C->cookie, status);
+
+	/* Free the cookie. */
+	free(C);
+
+	/* Return error or value from user callback. */
+	return (rc);
+}
+
+/**
+ * network_buf(fd, buf, buflen, to0, to1, callback, cookie, sendrecv, netop,
+ *     flags):
+ * Asynchronously read/write the provided buffer from/to ${fd}, and call
+ * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
+ * out if no data can be read/writ for a period of time to0, or if the
+ * complete buffer has not been read/writ after time to1.
+ */
+static int
+network_buf(int fd, uint8_t * buf, size_t buflen,
+    struct timeval * to0, struct timeval * to1,
+    network_callback * callback, void * cookie,
+    ssize_t (* sendrecv)(int, void *, size_t, int), int netop,
+    int flags)
+{
+	struct network_buf_cookie * C;
+	struct timeval timeo;
+
+	/* Create a cookie to be passed to callback_buf. */
+	if ((C = malloc(sizeof(struct network_buf_cookie))) == NULL)
+		goto err0;
+	C->callback = callback;
+	C->cookie = cookie;
+	C->fd = fd;
+	C->buf = buf;
+	C->buflen = buflen;
+	C->bufpos = 0;
+	C->sendrecv = sendrecv;
+	C->netop = netop;
+	C->flags = flags;
+
+	/* Figure out when we should give up waiting. */
+	memcpy(&C->timeout, to1, sizeof(struct timeval));
+	if (tvmath_addctime(&C->timeout))
+		goto err1;
+
+	/* Record the maximum time that any single send/recv will wait. */
+	memcpy(&C->timeout_max, to0, sizeof(struct timeval));
+
+	/* Set up the callback. */
+	memcpy(&timeo, to1, sizeof(struct timeval));
+	if (tv_lt(to0, &timeo))
+		memcpy(&timeo, to0, sizeof(struct timeval));
+	if (network_register(fd, netop, &timeo, callback_buf, C))
+		goto err1;
+
+	/* Success! */
+	return (0);
+
+err1:
+	free(C);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * tsnetwork_read(fd, buf, buflen, to0, to1, callback, cookie):
+ * Asynchronously fill the provided buffer with data from ${fd}, and call
+ * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
+ * out if no data can be read for a period of time to0, or if the complete
+ * buffer has not been read after time to1.  Note that ${buflen} must be
+ * non-zero, since otherwise deadlock would result.
+ */
+int
+tsnetwork_read(int fd, uint8_t * buf, size_t buflen,
+    struct timeval * to0, struct timeval * to1,
+    network_callback * callback, void * cookie)
+{
+
+	/* Make sure buflen is non-zero. */
+	if (buflen == 0) {
+		warn0("Cannot read zero-byte buffer");
+		return (-1);
+	}
+
+	return (network_buf(fd, buf, buflen, to0, to1, callback, cookie,
+	    recv, NETWORK_OP_READ, 0));
+}
+
+/**
+ * tsnetwork_write(fd, buf, buflen, to0, to1, callback, cookie):
+ * Asynchronously write data from the provided buffer to ${fd}, and call
+ * callback(cookie, status) where status is a NETWORK_STATUS_* value.  Time
+ * out if no data can be written for a period of time to0, or if the complete
+ * buffer has not been written after time to1.  If ${buflen} is zero, the
+ * callback will be invoked with a status of NETWORK_STATUS_CLOSED, even if
+ * the connection is still open.
+ */
+int
+tsnetwork_write(int fd, const uint8_t * buf, size_t buflen,
+    struct timeval * to0, struct timeval * to1,
+    network_callback * callback, void * cookie)
+{
+
+	return (network_buf(fd, (uint8_t *)(uintptr_t)buf, buflen,
+	    to0, to1, callback, cookie,
+	    (ssize_t (*)(int, void *, size_t, int))send, NETWORK_OP_WRITE,
+	    MSG_NOSIGNAL));
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_bwlimit.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_bwlimit.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_bwlimit.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_bwlimit.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,241 @@
+#include <string.h>
+
+#include "events.h"
+#include "monoclock.h"
+
+#include "tsnetwork.h"
+#include "tsnetwork_internal.h"
+
+/* Bandwidth limiting state. */
+struct bwlimit {
+	double Bps;
+	double bucket;
+	void * timer_cookie;
+	int suspended;
+};
+static struct bwlimit limit_read;
+static struct bwlimit limit_write;
+
+/* Last time tokens were added to buckets. */
+static struct timeval tlast;
+static int tlast_set = 0;
+
+/* Initialized? */
+static int initdone = 0;
+
+/* Update the internal state. */
+static int poke(void);
+
+/* Initialize if necessary. */
+static void
+init(void)
+{
+
+	/* Limit to 1 GBps by default. */
+	limit_read.Bps = 1000000000.0;
+
+	/* 2s burst. */
+	limit_read.bucket = 2 * limit_read.Bps;
+
+	/* No timer yet. */
+	limit_read.timer_cookie = NULL;
+
+	/* Traffic not suspended. */
+	limit_read.suspended = 0;
+
+	/* Write state is the same as the read state. */
+	memcpy(&limit_write, &limit_read, sizeof(struct bwlimit));
+
+	/* We've been initialized! */
+	initdone = 1;
+}
+
+/* Timer wakeup. */
+static int
+callback_timer(void * cookie)
+{
+	struct bwlimit * l = cookie;
+
+	/* This timer is no longer running. */
+	l->timer_cookie = NULL;
+
+	/* Update state. */
+	return (poke());
+}
+
+/* Update the state for one direction. */
+static int
+pokeone(struct bwlimit * l, double t, int op)
+{
+	double waketime;
+
+	/* Add tokens to the bucket. */
+	l->bucket += l->Bps * t;
+
+	/* Overflow the bucket at 2 seconds of bandwidth. */
+	if (l->bucket > 2 * l->Bps)
+		l->bucket = 2 * l->Bps;
+
+	/* Do we need to re-enable traffic? */
+	if ((l->bucket >= 1460) && (l->suspended != 0)) {
+		/* Allow traffic to pass. */
+		if (network_register_resume(op))
+			goto err0;
+		l->suspended = 0;
+	}
+
+	/* Do we need to block traffic? */
+	if ((l->bucket < 1460) && (l->suspended == 0)) {
+		/* Stop traffic from running. */
+		if (network_register_suspend(op))
+			goto err0;
+		l->suspended = 1;
+	}
+
+	/* If traffic is running, we don't need a timer. */
+	if ((l->suspended == 0) && (l->timer_cookie != NULL)) {
+		events_timer_cancel(l->timer_cookie);
+		l->timer_cookie = NULL;
+	}
+
+	/* If traffic is suspended, we need a timer. */
+	if ((l->suspended == 1) && (l->timer_cookie == NULL)) {
+		/* Wait 10 ms or for 1460 bytes of quota. */
+		waketime = (1460 - l->bucket) / l->Bps;
+		if (waketime < 0.01)
+			waketime = 0.01;
+
+		/* Register a timer. */
+		if ((l->timer_cookie =
+		    events_timer_register_double(callback_timer,
+		    l, waketime)) == NULL)
+			goto err0;
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/* Update the internal state. */
+static int
+poke(void)
+{
+	struct timeval tnow;
+	double t;
+
+	/* Get the current time. */
+	if (monoclock_get(&tnow))
+		goto err0;
+
+	/* Compute the duration since the last poke. */
+	if (tlast_set)
+		t = (tnow.tv_sec - tlast.tv_sec) +
+		    (tnow.tv_usec - tlast.tv_usec) * 0.000001;
+	else
+		t = 0.0;
+
+	/* Poke each direction. */
+	if (pokeone(&limit_read, t, NETWORK_OP_READ))
+		goto err0;
+	if (pokeone(&limit_write, t, NETWORK_OP_WRITE))
+		goto err0;
+
+	/* We have been poked. */
+	memcpy(&tlast, &tnow, sizeof(struct timeval));
+	tlast_set = 1;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_bwlimit(down, up):
+ * Set the bandwidth rate limit to ${down} bytes per second of read bandwidth
+ * and ${up} bytes per second of write bandwidth.  The values ${down} and
+ * ${up} must be between 8000 and 10^9.
+ */
+void
+network_bwlimit(double down, double up)
+{
+
+	/* Initialize if necessary. */
+	if (!initdone)
+		init();
+
+	/* Record these values for future reference. */
+	limit_read.Bps = down;
+	limit_write.Bps = up;
+
+	/* Don't allow more than a 2 s burst. */
+	if (limit_read.bucket > 2 * limit_read.Bps)
+		limit_read.bucket = 2 * limit_read.Bps;
+	if (limit_write.bucket > 2 * limit_write.Bps)
+		limit_write.bucket = 2 * limit_write.Bps;
+}
+
+/**
+ * network_bwlimit_get(op, len):
+ * Get the amount of instantaneously allowed bandwidth for ${op} operations.
+ */
+int
+network_bwlimit_get(int op, size_t * len)
+{
+
+	/* Initialize if necessary. */
+	if (!initdone)
+		init();
+
+	/* Update state. */
+	if (poke())
+		goto err0;
+
+	/* Return the appropriate value. */
+	if (op == NETWORK_OP_READ)
+		*len = limit_read.bucket;
+	else
+		*len = limit_write.bucket;
+
+	/*
+	 * If the allowed bandwidth is less than one normal-sized TCP segment,
+	 * force it to zero, in order to avoid silly windowing.
+	 */
+	if (*len < 1460)
+		*len = 0;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_bwlimit_eat(op, len):
+ * Consume ${len} bytes of bandwidth quota for ${op} operations.
+ */
+int
+network_bwlimit_eat(int op, size_t len)
+{
+
+	/* Initialize if necessary. */
+	if (!initdone)
+		init();
+
+	/* Eat tokens from the bucket. */
+	if (op == NETWORK_OP_READ)
+		limit_read.bucket -= len;
+	else
+		limit_write.bucket -= len;
+
+	/* Update state. */
+	return (poke());
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_connect.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_connect.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_connect.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_connect.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,169 @@
+#include "bsdtar_platform.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+
+#include "warnp.h"
+
+#include "tsnetwork.h"
+
+struct network_connect_cookie {
+	int s;
+	int failed;
+	int errnum;
+	network_callback * callback;
+	void * cookie;
+};
+
+static network_callback callback_connect;
+
+/**
+ * callback_connect(cookie, status):
+ * Callback helper for tsnetwork_connect.
+ */
+static int
+callback_connect(void * cookie, int status)
+{
+	struct network_connect_cookie * C = cookie;
+	int sockerr;
+	socklen_t sockerrlen = sizeof(int);
+	int rc;
+
+	/*
+	 * A timeout here is either a connection timeout or a connection
+	 * error, depending upon whether we got here as a result of a zero
+	 * second timeout used to postpone handling of a connect() failure.
+	 */
+	if (status == NETWORK_STATUS_TIMEOUT) {
+		if (C->failed) {
+			/*
+			 * The connect() call returned an error; restore the
+			 * errno value from that point so that when we invoke
+			 * our callback we have the right value there.
+			 */
+			status = NETWORK_STATUS_CONNERR;
+			errno = C->errnum;
+		} else {
+			/*
+			 * There was a connection timeout; set errno to zero
+			 * here since any value in errno at this point is
+			 * just left over from a previous failed syscall.
+			 */
+			status = NETWORK_STATUS_CTIMEOUT;
+			errno = 0;
+		}
+	}
+
+	if (status != NETWORK_STATUS_OK)
+		goto docallback;
+
+	/* Even if the status is ok, we need to check for pending error. */
+	if (getsockopt(C->s, SOL_SOCKET, SO_ERROR, &sockerr, &sockerrlen)) {
+		status = NETWORK_STATUS_CONNERR;
+		goto docallback;
+	}
+	if (sockerr != 0) {
+		errno = sockerr;
+		status = NETWORK_STATUS_CONNERR;
+	}
+
+docallback:
+	/* Call the upstream callback. */
+	rc = (C->callback)(C->cookie, status);
+
+	/* Free the cookie. */
+	free(C);
+
+	/* Return value from user callback. */
+	return (rc);
+}
+
+/**
+ * tsnetwork_connect(s, addr, addrlen, timeout, callback, cookie):
+ * Connect the specified socket to the specified address, and call the
+ * specified callback when connected or the connection attempt has failed.
+ */
+int
+tsnetwork_connect(int s, const struct sockaddr * addr, socklen_t addrlen,
+    struct timeval * timeout, network_callback * callback, void * cookie)
+{
+	struct network_connect_cookie * C;
+	struct timeval timeo;
+	int rc = 0;	/* Success unless specified otherwise. */
+
+	/* Create a cookie to be passed to callback_connect. */
+	if ((C = malloc(sizeof(struct network_connect_cookie))) == NULL)
+		goto err0;
+	C->s = s;
+	C->failed = 0;
+	C->callback = callback;
+	C->cookie = cookie;
+
+	/* Mark socket as non-blocking. */
+	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
+		warnp("fcntl(O_NONBLOCK)");
+		goto err1;
+	}
+
+	/* Try to connect to the server. */
+	if ((connect(s, addr, addrlen) == 0) ||
+	    (errno == EINPROGRESS) ||
+	    (errno == EINTR)) {
+		/* Connection is being established. */
+		if (network_register(s, NETWORK_OP_WRITE, timeout,
+		    callback_connect, C))
+			goto err1;
+	} else if ((errno == ECONNREFUSED) ||
+	    (errno == ECONNRESET) ||
+	    (errno == ENETDOWN) ||
+	    (errno == ENETUNREACH) ||
+#ifdef FREEBSD_PORTRANGE_BUG
+	/**
+	 * If FreeBSD's net.inet.ip.portrange.randomized sysctl is set to 1
+	 * (the default value) FreeBSD sometimes reuses a source port faster
+	 * than might naively be expected.  This doesn't cause any problems
+	 * except if the pf firewall is running on the source system; said
+	 * firewall detects the packet as belonging to an expired connection
+	 * and drops it.  This would be fine, except that the FreeBSD kernel
+	 * doesn't merely drop the packet when a firewall blocks an outgoing
+	 * packet; instead, it reports EPERM back to the userland process
+	 * which was responsible for the packet being sent.
+	 * In short, things interact in wacky ways which make it possible to
+	 * get EPERM back in response to a connect(2) syscall.  Work around
+	 * this by handling EPERM the same way as transient network glitches;
+	 * the upstream code will handle this appropriately by retrying the
+	 * connection, at which point a new source port number will be chosen
+	 * and everything will (probably) work fine.
+	 */
+	    (errno == EPERM) ||
+#endif
+	    (errno == EHOSTUNREACH)) {
+		/*
+		 * The connection attempt has failed.  Schedule a callback
+		 * to be performed after we return, since we're not allowed
+		 * to perform the callback right now.
+		 */
+		C->failed = 1;
+		C->errnum = errno;
+		timeo.tv_sec = timeo.tv_usec = 0;
+		if (network_sleep(&timeo, callback_connect, C))
+			goto err1;
+	} else {
+		/* Something went seriously wrong. */
+		warnp("Network connection failure");
+		goto err1;
+	}
+
+	/* Return success or the status from the callback. */
+	return (rc);
+
+err1:
+	free(C);
+err0:
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_cork.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_cork.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_cork.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_cork.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,111 @@
+#include "bsdtar_platform.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+
+#include "warnp.h"
+
+#include "tsnetwork_internal.h"
+
+/**
+ * XXX Portability
+ * XXX These functions serve two purposes:
+ * XXX 1. To avoid wasting bandwidth, by ensuring that multiple small writes
+ * XXX over a socket are aggregated into a single TCP/IP packet.
+ * XXX 2. To avoid severe performance issues which would otherwise result
+ * XXX from nagling, by allowing data to be "pushed" out once there are no
+ * XXX more writes queued.
+ * XXX
+ * XXX POSIX defines TCP_NODELAY for purpose #2, although it does not require
+ * XXX that implementations obey it; BSD and Linux respectively define
+ * XXX TCP_NOPUSH and TCP_CORK for purpose #1.  On OS X, TCP_NOPUSH is
+ * XXX defined, but seems to be broken; we use autoconf to detect OS X and
+ * XXX define BROKEN_TCP_NOPUSH.  On Cygwin, TCP_NOPUSH is defined, but
+ * XXX using it produces a ENOPROTOOPT error; we define BROKEN_TCP_NOPUSH
+ * XXX in this case, too.  On Minix, TCP_NODELAY fails with ENOSYS; since
+ * XXX corking occurs for performance reasons only, we ignore this errno.
+ */
+
+/* Macro to simplify setting options. */
+#define setopt(fd, opt, value, err0) do {				\
+	int val;							\
+									\
+	val = value;							\
+	if (setsockopt(fd, IPPROTO_TCP, opt, &val, sizeof(int))) {	\
+		if ((errno != ETIMEDOUT) &&				\
+		    (errno != ECONNRESET) &&				\
+		    (errno != ENOSYS)) {				\
+			warnp("setsockopt(%s, %d)", #opt, val);		\
+			goto err0;					\
+		}							\
+	}								\
+} while (0);
+
+/**
+ * network_cork(fd):
+ * Clear the TCP_NODELAY socket option, and set TCP_CORK or TCP_NOPUSH if
+ * either is defined.
+ */
+int
+network_cork(int fd)
+{
+
+	/* Clear TCP_NODELAY. */
+	setopt(fd, TCP_NODELAY, 0, err0);
+
+	/* Set TCP_CORK or TCP_NOPUSH as appropriate. */
+#ifdef TCP_CORK
+	setopt(fd, TCP_CORK, 1, err0);
+#else
+#ifdef TCP_NOPUSH
+#ifndef BROKEN_TCP_NOPUSH
+	setopt(fd, TCP_NOPUSH, 1, err0);
+#endif
+#endif
+#endif
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_uncork(fd):
+ * Set the TCP_NODELAY socket option, and clear TCP_CORK or TCP_NOPUSH if
+ * either is defined.
+ */
+int
+network_uncork(int fd)
+{
+
+	/* Clear TCP_CORK or TCP_NOPUSH as appropriate. */
+#ifdef TCP_CORK
+	setopt(fd, TCP_CORK, 0, err0);
+#else
+#ifdef TCP_NOPUSH
+#ifndef BROKEN_TCP_NOPUSH
+	setopt(fd, TCP_NOPUSH, 0, err0);
+#endif
+#endif
+#endif
+
+	/* Set TCP_NODELAY. */
+	/*
+	 * For compatibility with Linux 2.4, this must be done after we
+	 * clear TCP_CORK; otherwise it will throw an EINVAL back at us.
+	 */
+	setopt(fd, TCP_NODELAY, 1, err0);
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_internal.h tarsnap-autoconf-1.0.34/lib/network/tsnetwork_internal.h
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_internal.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,76 @@
+#ifndef _NETWORK_INTERNAL_H_
+#define _NETWORK_INTERNAL_H_
+
+/* Macros for handling struct timeval values. */
+#define tv_lt(a, b)				\
+	(((a)->tv_sec < (b)->tv_sec) ||		\
+	    (((a)->tv_sec == (b)->tv_sec) &&	\
+		((a)->tv_usec < (b)->tv_usec)))
+#define tv_add(a, b)	do {			\
+	(a)->tv_sec += (b)->tv_sec;		\
+	(a)->tv_usec += (b)->tv_usec;		\
+	if ((a)->tv_usec >= 1000000) {		\
+		(a)->tv_usec -= 1000000;	\
+		(a)->tv_sec += 1;		\
+	}					\
+} while (0)
+#define tv_sub(a, b)	do {			\
+	(a)->tv_sec -= (b)->tv_sec;		\
+	(a)->tv_usec -= (b)->tv_usec;		\
+	if ((a)->tv_usec < 0) {			\
+		(a)->tv_usec += 1000000;	\
+		(a)->tv_sec -= 1;		\
+	}					\
+} while (0)
+
+/**
+ * network_cork(fd):
+ * Clear the TCP_NODELAY socket option, and set TCP_CORK or TCP_NOPUSH if
+ * either is defined.
+ */
+int network_cork(int);
+
+/**
+ * network_uncork(fd):
+ * Set the TCP_NODELAY socket option, and clear TCP_CORK or TCP_NOPUSH if
+ * either is defined.
+ */
+int network_uncork(int);
+
+/**
+ * network_register_suspend(op):
+ * Suspend ${op} operations, on all file descriptors.
+ */
+int network_register_suspend(int);
+
+/**
+ * network_register_resume(op):
+ * Resume pending ${op} operations, on all file descriptors.
+ */
+int network_register_resume(int);
+
+/**
+ * network_register_fini(void):
+ * Free resources allocated.
+ */
+void network_register_fini(void);
+
+/**
+ * network_sleep_fini(void):
+ * Free resources allocated.
+ */
+void network_sleep_fini(void);
+
+/**
+ * network_bwlimit_get(op, len):
+ * Get the amount of instantaneously allowed bandwidth for ${op} operations.
+ */
+int network_bwlimit_get(int, size_t *);
+
+/**
+ * network_bwlimit_eat(op, len):
+ * Consume ${len} bytes of bandwidth quota for ${op} operations.
+ */
+int network_bwlimit_eat(int, size_t);
+
+#endif /* !_NETWORK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_register.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_register.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_register.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_register.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,371 @@
+#include <sys/select.h>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "elasticarray.h"
+#include "events.h"
+#include "warnp.h"
+
+#include "tsnetwork.h"
+#include "tsnetwork_internal.h"
+
+/* Callbacks. */
+struct callback {
+	network_callback * callback;
+	void * cookie;
+	int s;
+	int eop;
+	int event_network_pending;
+	void * event_timer;
+};
+ELASTICARRAY_DECL(CALLBACKS, callbacks, struct callback *);
+static CALLBACKS callbacks[2] = {NULL, NULL};
+static int suspended[2] = {0, 0};
+static int eops[2] = {EVENTS_NETWORK_OP_READ, EVENTS_NETWORK_OP_WRITE};
+
+/* Translate an "op" value to a set of callbacks. */
+static int
+op2cs(int op)
+{
+
+	switch (op) {
+	case NETWORK_OP_READ:
+		return (0);
+	case NETWORK_OP_WRITE:
+		return (1);
+	default:
+		assert(!"Invalid operation type in network_register");
+	}
+}
+
+/* Invoke the callback. */
+static int
+docallback(struct callback * c, int timedout)
+{
+	network_callback * cb;
+	int status;
+
+	/* Cancel any pending event callbacks. */
+	if (c->event_network_pending)
+		events_network_cancel(c->s, c->eop);
+	if (c->event_timer != NULL)
+		events_timer_cancel(c->event_timer);
+
+	/* Grab the callback function and empty the record. */
+	cb = c->callback;
+	c->callback = NULL;
+
+	/* Translate timeout status to network status. */
+	switch (timedout) {
+	case -1:
+		status = NETWORK_STATUS_CANCEL;
+		break;
+	case 0:
+		status = NETWORK_STATUS_OK;
+		break;
+	case 1:
+		status = NETWORK_STATUS_TIMEOUT;
+		break;
+	default:
+		assert(!"Invalid status to docallback");
+		return (-1);
+	}
+
+	/* Invoke callback. */
+	return ((cb)(c->cookie, status));
+}
+
+/* Callback from network_register when timer expires. */
+static int
+callback_timer(void * cookie)
+{
+	struct callback * c = cookie;
+
+	/* This callback is no longer pending. */
+	c->event_timer = NULL;
+
+	/* Do callback. */
+	return (docallback(c, 1));
+}
+
+/* Callback from network_register when socket is ready. */
+static int
+callback_network(void * cookie)
+{
+	struct callback * c = cookie;
+
+	/* This callback is no longer pending. */
+	c->event_network_pending = 0;
+
+	/* Do callback. */
+	return (docallback(c, 0));
+}
+
+/**
+ * network_register(fd, op, timeo, callback, cookie):
+ * Register a callback to be performed by network_select when file descriptor
+ * ${fd} is ready for operation ${op}, or once the timeout has expired.
+ */
+int
+network_register(int fd, int op, struct timeval * timeo,
+    network_callback * callback, void * cookie)
+{
+	CALLBACKS * csp;
+	CALLBACKS cs;
+	struct callback * c;
+	int osize;
+	int eop;
+
+	/* Sanity-check the file descriptor. */
+	if ((fd < 0) || (fd >= (int)FD_SETSIZE)) {
+		warn0("Invalid file descriptor: %d", fd);
+		goto err0;
+	}
+
+	/*
+	 * Figure out which set of callbacks we're dealing with and which
+	 * type of event we need to listen for.
+	 */
+	csp = &callbacks[op2cs(op)];
+	eop = eops[op2cs(op)];
+
+	/* Initialize array if required. */
+	if ((cs = *csp) == NULL) {
+		if ((cs = *csp = callbacks_init(0)) == NULL)
+			goto err0;
+	}
+
+	/* Enlarge array if necessary. */
+	if ((osize = (int)callbacks_getsize(cs)) <= fd) {
+		/* Resize. */
+		if (callbacks_resize(cs, fd + 1))
+			goto err0;
+
+		/* Initialize empty. */
+		for (; osize < fd + 1; osize++) {
+			*callbacks_get(cs, osize) = NULL;
+		}
+	}
+
+	/* Grab the relevant callback record. */
+	c = *callbacks_get(cs, fd);
+
+	/* If there is no record in that slot, allocate one. */
+	if (c == NULL) {
+		/* Allocate. */
+		if ((c = malloc(sizeof(struct callback))) == NULL)
+			goto err0;
+
+		/* Initialize. */
+		c->callback = NULL;
+		c->event_network_pending = 0;
+		c->event_timer = NULL;
+
+		/* Insert into table slot. */
+		*callbacks_get(cs, fd) = c;
+	}
+
+	/* Make sure we're not replacing an existing callback. */
+	if (c->callback != NULL) {
+		warn0("Replacing callback: op = %d, fd = %d", op, fd);
+		goto err0;
+	}
+
+	/* Set network operation parameters. */
+	c->callback = callback;
+	c->cookie = cookie;
+	c->s = fd;
+	c->eop = eop;
+
+	/* Register a timer event. */
+	if ((c->event_timer =
+	    events_timer_register(callback_timer, c, timeo)) == NULL)
+		goto err0;
+
+	/* Register a network event if not suspended. */
+	if (suspended[op2cs(op)] == 0) {
+		if (events_network_register(callback_network, c, fd, eop))
+			goto err1;
+		c->event_network_pending = 1;
+	} else {
+		c->event_network_pending = 0;
+	}
+
+	/* Success! */
+	return (0);
+
+err1:
+	events_timer_cancel(c->event_timer);
+	c->event_timer = NULL;
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_deregister(fd, op):
+ * Deregister the callback, if any, for operation ${op} on descriptor ${fd}.
+ * The callback will be called with a status of NETWORK_STATUS_CANCEL.
+ */
+int
+network_deregister(int fd, int op)
+{
+	CALLBACKS cs;
+	struct callback * c;
+
+	/* Figure out which set of callbacks we're dealing with. */
+	cs = callbacks[op2cs(op)];
+
+	/* Sanity-check: We should have a callbacks array. */
+	if (cs == NULL) {
+		warn0("Callbacks uninitialized");
+		goto err0;
+	}
+
+	/* Sanity-check the file descriptor. */
+	if ((fd < 0) || (fd >= (int)callbacks_getsize(cs))) {
+		warn0("Invalid file descriptor: %d", fd);
+		goto err0;
+	}
+
+	/* Grab the relevant callback record. */
+	c = *callbacks_get(cs, fd);
+
+	/* If there is no callback, return silently. */
+	if (c == NULL || c->callback == NULL)
+		return (0);
+
+	/* Invoke the callback. */
+	return (docallback(c, -1));
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_register_suspend(op):
+ * Suspend ${op} operations, on all file descriptors.
+ */
+int
+network_register_suspend(int op)
+{
+	CALLBACKS cs;
+	struct callback * c;
+	size_t i;
+
+	/* This direction is suspended. */
+	suspended[op2cs(op)] = 1;
+
+	/* Look up which set of callbacks we're dealing with. */
+	cs = callbacks[op2cs(op)];
+
+	/* If we have no callbacks, return immediately. */
+	if (cs == NULL)
+		return (0);
+
+	/* Scan through the callbacks... */
+	for (i = 0; i < callbacks_getsize(cs); i++) {
+		c = *callbacks_get(cs, i);
+
+		/* ... ignoring any which don't actually exist... */
+		if ((c == NULL) || (c->callback == NULL))
+			continue;
+
+		/* ... but cancelling the rest. */
+		if (c->event_network_pending) {
+			c->event_network_pending = 0;
+			if (events_network_cancel(c->s, c->eop))
+				goto err0;
+		}
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_register_resume(op):
+ * Resume pending ${op} operations, on all file descriptors.
+ */
+int
+network_register_resume(int op)
+{
+	CALLBACKS cs;
+	struct callback * c;
+	size_t i;
+
+	/* Not suspended any more. */
+	suspended[op2cs(op)] = 0;
+
+	/* Look up which set of callbacks we're dealing with. */
+	cs = callbacks[op2cs(op)];
+
+	/* If we have no callbacks, return immediately. */
+	if (cs == NULL)
+		return (0);
+
+	/* Scan through the callbacks... */
+	for (i = 0; i < callbacks_getsize(cs); i++) {
+		c = *callbacks_get(cs, i);
+
+		/* ... ignoring any which don't actually exist... */
+		if ((c == NULL) || (c->callback == NULL))
+			continue;
+
+		/* ... but starting the rest. */
+		if (c->event_network_pending == 0) {
+			c->event_network_pending = 1;
+			if (events_network_register(callback_network,
+			    c, c->s, c->eop))
+				goto err0;
+		}
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_register_fini(void):
+ * Free resources allocated.
+ */
+void
+network_register_fini(void)
+{
+	struct callback * c;
+	size_t i, j;
+
+	/* For each direction... */
+	for (i = 0; i < 2; i++) {
+		/* Skip uninitialized directions. */
+		if (callbacks[i] == NULL)
+			continue;
+
+		/* For each descriptor... */
+		for (j = 0; j < callbacks_getsize(callbacks[i]); j++) {
+			c = *callbacks_get(callbacks[i], j);
+
+			/* Skip records which don't exist. */
+			if (c == NULL)
+				continue;
+
+			/* If we have no callback, free the record. */
+			if (c->callback == NULL)
+				free(c);
+		}
+
+		/* Free the callbacks array. */
+		callbacks_free(callbacks[i]);
+	}
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_select.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_select.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_select.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_select.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,98 @@
+#include "bsdtar_platform.h"
+
+#include "events.h"
+
+#include "tsnetwork_internal.h"
+
+#include "tsnetwork.h"
+
+/* Callback from network_select with zero timeout. */
+static int
+callback_dontsleep(void * cookie)
+{
+	int * done = cookie;
+
+	/* We've been called. */
+	*done = 1;
+
+	/* Success! */
+	return (0);
+}
+
+/**
+ * network_select(blocking):
+ * Call select(2) on file descriptors provided via network_register and make
+ * callbacks as appropriate (including timeouts).  Callbacks are deregistered
+ * before being performed.  If ${blocking} is non-zero, allow select(2) to
+ * block waiting for descriptors and timeouts.  Stop performing callbacks and
+ * return the first non-zero value returned by a callback if one occurs.
+ */
+int
+network_select(int blocking)
+{
+	int done = 0;
+
+	/*
+	 * If we want to avoid blocking on descriptors and timeouts, register
+	 * a callback for "right now", and spin until that callback occurs.
+	 * Otherwise, just let events run.
+	 */
+	if (blocking == 0) {
+		if (events_timer_register_double(callback_dontsleep,
+		    &done, 0.0) == NULL)
+			goto err0;
+		return (events_spin(&done));
+	} else {
+		return (events_run());
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_spin(done):
+ * Repeatedly call network_select until either an error occurs or the value
+ * pointed to by ${done} is non-zero.
+ */
+int
+network_spin(int * done)
+{
+
+	/* Hand this off to the events system. */
+	return (events_spin(done));
+}
+
+/**
+ * network_getselectstats(N, mu, va, max):
+ * Return and zero statistics on the time between select(2) calls.
+ */
+void
+network_getselectstats(double * NN, double * mu, double * va, double * max)
+{
+
+	/* Hand off to events code. */
+	events_network_selectstats(NN, mu, va, max);
+}
+
+/**
+ * network_fini(void):
+ * Free resources associated with the network subsystem.
+ */
+void
+network_fini(void)
+{
+
+	/* Clean up network registrations. */
+	network_register_fini();
+
+	/* Clean up sleeps. */
+	network_sleep_fini();
+
+	/* Clean the underlying events system. */
+	events_shutdown();
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_sleep.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_sleep.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_sleep.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_sleep.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,161 @@
+#include <stdlib.h>
+#include <string.h>
+
+#include "elasticarray.h"
+#include "events.h"
+#include "warnp.h"
+
+#include "tsnetwork.h"
+#include "tsnetwork_internal.h"
+
+/* Sleepers. */
+struct sleeper {
+	network_callback * callback;
+	void * cookie;
+	void * event_cookie;
+};
+ELASTICARRAY_DECL(SLEEPERS, sleepers, struct sleeper *);
+static SLEEPERS sleepers = NULL;
+
+/* Callback from network_sleep when timer expires. */
+static int
+callback_timer(void * cookie)
+{
+	struct sleeper * sp = cookie;
+
+	/* This callback is no longer pending. */
+	sp->event_cookie = NULL;
+
+	/* Do callback. */
+	return ((sp->callback)(sp->cookie, NETWORK_STATUS_TIMEOUT));
+}
+
+/**
+ * network_sleep(timeo, callback, cookie):
+ * Register a callback to be performed by network_select once the specified
+ * timeout has expired.  Return a handle which can be passed to
+ * network_desleep().
+ */
+int
+network_sleep(struct timeval * timeo,
+    network_callback * callback, void * cookie)
+{
+	struct sleeper s;
+	struct sleeper * sp = NULL;	/* Silence bogus gcc warning. */
+	size_t h;
+
+	/* Initialize array if required. */
+	if (sleepers == NULL) {
+		if ((sleepers = sleepers_init(0)) == NULL)
+			goto err0;
+	}
+
+	/* Construct sleeper record. */
+	s.callback = callback;
+	s.cookie = cookie;
+	s.event_cookie = NULL;
+
+	/* Search for empty space. */
+	for (h = 0; h < sleepers_getsize(sleepers); h++) {
+		sp = *sleepers_get(sleepers, h);
+		if (sp->event_cookie == NULL) {
+			/* Use this one. */
+			memcpy(sp, &s, sizeof(struct sleeper));
+			break;
+		}
+	}
+
+	/* If we didn't find an empty space, add a new sleeper. */
+	if (h == sleepers_getsize(sleepers)) {
+		/* Don't have too many sleepers... */
+		if (h == 1024) {
+			warn0("Too many sleepers");
+			goto err0;
+		}
+
+		/* Allocate a record. */
+		if ((sp = malloc(sizeof(struct sleeper))) == NULL)
+			goto err0;
+
+		/* Copy data in. */
+		memcpy(sp, &s, sizeof(struct sleeper));
+
+		/* Append the record. */
+		if (sleepers_append(sleepers, &sp, 1))
+			goto err0;
+	}
+
+	/* Register the timer event. */
+	if ((sp->event_cookie =
+	    events_timer_register(callback_timer, sp, timeo)) == NULL)
+		goto err0;
+
+	/* Success! */
+	return (h);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_desleep(handle):
+ * Deregister the callback associated with the provided handle.  The
+ * callback will be called with a status of NETWORK_STATUS_CANCEL.
+ */
+int
+network_desleep(int handle)
+{
+	struct sleeper * sp;
+
+	/* Sanity-check the handle. */
+	if (handle >= (int)sleepers_getsize(sleepers)) {
+		warn0("Invalid sleeper handle: %d", handle);
+		goto err0;
+	}
+
+	/* Grab the relevant sleeper record. */
+	sp = *sleepers_get(sleepers, handle);
+
+	/* If there is no timer, return silently. */
+	if (sp->event_cookie == NULL)
+		return (0);
+
+	/* Cancel the timer. */
+	events_timer_cancel(sp->event_cookie);
+	sp->event_cookie = NULL;
+
+	/* Invoke the callback. */
+	return ((sp->callback)(sp->cookie, NETWORK_STATUS_CANCEL));
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_sleep_fini(void):
+ * Free resources allocated.
+ */
+void
+network_sleep_fini(void)
+{
+	struct sleeper * sp;
+	size_t i;
+
+	/* Nothing to do if we're uninitialized. */
+	if (sleepers == NULL)
+		return;
+
+	/* Free records. */
+	for (i = 0; i < sleepers_getsize(sleepers); i++) {
+		sp = *sleepers_get(sleepers, i);
+
+		/* If this sleep is no longer in progress, free the record. */
+		if (sp->event_cookie == NULL)
+			free(sp);
+	}
+
+	/* Free the sleepers array. */
+	sleepers_free(sleepers);
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/network/tsnetwork_writeq.c tarsnap-autoconf-1.0.34/lib/network/tsnetwork_writeq.c
--- tarsnap-autoconf-1.0.33/lib/network/tsnetwork_writeq.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/lib/network/tsnetwork_writeq.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,249 @@
+#include "bsdtar_platform.h"
+
+#include <sys/time.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "tsnetwork_internal.h"
+#include "tvmath.h"
+#include "warnp.h"
+
+#include "tsnetwork.h"
+
+struct network_writeq_buf {
+	const uint8_t * buf;
+	size_t buflen;
+	struct timeval timeo;
+	int abstimeo;
+	network_callback * callback;
+	void * cookie;
+	struct network_writeq_buf * next;
+};
+struct network_writeq_internal {
+	int fd;
+	struct network_writeq_buf * head;
+	struct network_writeq_buf ** tailptr;
+};
+
+static int dowrite(struct network_writeq_internal *);
+static network_callback callback_bufdone;
+
+static int
+dowrite(struct network_writeq_internal * Q)
+{
+	struct network_writeq_buf * QB = Q->head;
+	struct timeval timeo;
+
+	/* Figure out how long to allow for this buffer write. */
+	memcpy(&timeo, &QB->timeo, sizeof(struct timeval));
+	if (QB->abstimeo && tvmath_subctime(&timeo))
+		goto err0;
+
+	/* Write the buffer. */
+	if (tsnetwork_write(Q->fd, QB->buf, QB->buflen, &timeo, &timeo,
+	    callback_bufdone, Q))
+		goto err0;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * callback_bufdone(cookie, status):
+ * Call the upstream callback for the buffer at the head of the write queue
+ * ${cookie}, remove it from the queue, and write the next buffer.
+ */
+static int
+callback_bufdone(void * cookie, int status)
+{
+	struct network_writeq_internal * Q = cookie;
+	struct network_writeq_buf * head_old;
+	int rc;
+
+	/* Unlink the current buffer from the queue. */
+	head_old = Q->head;
+	Q->head = head_old->next;
+
+	/* Update tail pointer if necessary. */
+	if (Q->tailptr == &head_old->next)
+		Q->tailptr = &Q->head;
+
+	/*
+	 * A callback of NETWORK_STATUS_CLOSED in response to an attempt to
+	 * write zero bytes is really a NETWORK_STATUS_ZEROBYTE.
+	 */
+	if ((status == NETWORK_STATUS_CLOSED) && (head_old->buflen == 0))
+		status = NETWORK_STATUS_ZEROBYTE;
+
+	/*
+	 * If there's another buffer waiting to be written, register it to
+	 * be sent.  If not and we're not handling an error, uncork the
+	 * socket.
+	 */
+	if (Q->head != NULL) {
+		if (dowrite(Q))
+			goto err1;
+	} else {
+		if ((status == NETWORK_STATUS_OK) && network_uncork(Q->fd))
+			status = NETWORK_STATUS_ERR;
+	}
+
+	/* Call the upstream callback. */
+	rc = (head_old->callback)(head_old->cookie, status);
+
+	/* Free the write parameters structure. */
+	free(head_old);
+
+	/* Return value from callback. */
+	return (rc);
+
+err1:
+	(head_old->callback)(head_old->cookie, status);
+	free(head_old);
+
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_writeq_init(fd):
+ * Construct a queue to be used for writing data to ${fd}.
+ */
+NETWORK_WRITEQ *
+network_writeq_init(int fd)
+{
+	struct network_writeq_internal * Q;
+
+	/* Allocate memory. */
+	if ((Q = malloc(sizeof(struct network_writeq_internal))) == NULL)
+		goto err0;
+
+	/* Initialize structure. */
+	Q->fd = fd;
+	Q->head = NULL;
+	Q->tailptr = &Q->head;
+
+	/* Success! */
+	return (Q);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * _network_writeq_add(Q, buf, buflen, timeo, callback, cookie, abstimeo):
+ * Add a buffer write to the specified write queue.  The callback function
+ * will be called when the write is finished, fails, or is cancelled.
+ * If ${abstimeo} is zero, the timeout is relative to when the buffer in
+ * question starts to be written (i.e., when the previous buffered write
+ * finishes); otherwise, the timeout is relative to the present time.  If
+ * ${buflen} is zero, the callback will be performed, at the appropriate
+ * point, with a status of NETWORK_STATUS_ZEROBYTE.
+ */
+int
+_network_writeq_add(NETWORK_WRITEQ * Q, const uint8_t * buf, size_t buflen,
+    struct timeval * timeo, network_callback * callback, void * cookie,
+    int abstimeo)
+{
+	struct network_writeq_buf * QB;
+	struct network_writeq_buf ** tailptr_old;
+	struct network_writeq_buf * head_old;
+
+	/* Wrap parameters into a structure. */
+	if ((QB = malloc(sizeof(struct network_writeq_buf))) == NULL)
+		goto err0;
+	QB->buf = buf;
+	QB->buflen = buflen;
+	memcpy(&QB->timeo, timeo, sizeof(struct timeval));
+	QB->abstimeo = abstimeo;
+	QB->callback = callback;
+	QB->cookie = cookie;
+	QB->next = NULL;
+
+	/* Compute absolute time if appropriate. */
+	if (abstimeo && tvmath_addctime(&QB->timeo))
+		goto err1;
+
+	/* Add this to the write queue. */
+	head_old = Q->head;
+	tailptr_old = Q->tailptr;
+	*Q->tailptr = QB;
+	Q->tailptr = &QB->next;
+
+	/* If the queue head was NULL, we need to kick off the writing. */
+	if (head_old == NULL) {
+		/* Cork the socket so that we don't send small packets. */
+		if (network_cork(Q->fd))
+			goto err2;
+
+		if (dowrite(Q))
+			goto err2;
+	}
+
+	/* Success! */
+	return (0);
+
+err2:
+	Q->tailptr = tailptr_old;
+	*Q->tailptr = NULL;
+err1:
+	free(QB);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * network_writeq_cancel(Q):
+ * Cancel all queued writes, including any partially completed writes.  Note
+ * that since this leaves the connection in an indeterminate state (there is
+ * no way to know how much data from the currently in-progress write was
+ * written) this should probably only be used prior to closing a connection.
+ * The callbacks for each pending write will be called with a status of
+ * NETWORK_STATUS_DEQUEUE, and network_writeq_cancel will return the first
+ * non-zero value returned by a callback.
+ */
+int
+network_writeq_cancel(NETWORK_WRITEQ * Q)
+{
+	int rc = 0, rc2;
+
+	/* Keep on deregistering callbacks until the queue is empty. */
+	while (Q->head != NULL) {
+		rc2 = network_deregister(Q->fd, NETWORK_OP_WRITE);
+		rc = rc ? rc : rc2;
+	}
+
+	/* Return first non-zero result from deregistration. */
+	return (rc);
+}
+
+/**
+ * network_writeq_free(Q):
+ * Free the specified write queue.  If there might be any pending writes,
+ * network_writeq_cancel should be called first.
+ */
+void
+network_writeq_free(NETWORK_WRITEQ * Q)
+{
+	struct network_writeq_buf * head_old;
+
+	/* Repeat until the queue is empty. */
+	while (Q->head != NULL) {
+		/* Unlink the current buffer from the queue. */
+		head_old = Q->head;
+		Q->head = Q->head->next;
+
+		/* Free the write parameters structure. */
+		free(head_old);
+	}
+
+	/* Free the queue structure itself. */
+	free(Q);
+}
diff -ruN tarsnap-autoconf-1.0.33/lib/scryptenc/scryptenc.c tarsnap-autoconf-1.0.34/lib/scryptenc/scryptenc.c
--- tarsnap-autoconf-1.0.33/lib/scryptenc/scryptenc.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/scryptenc/scryptenc.c	2013-07-06 14:38:21.000000000 -0700
@@ -37,13 +37,15 @@
 
 #include <openssl/aes.h>
 
+#include "crypto_aesctr.h"
+#include "crypto_entropy.h"
+#include "sha256.h"
+#include "sysendian.h"
+
 #include "crypto.h"
-#include "crypto_internal.h"
 #include "crypto_scrypt.h"
 #include "memlimit.h"
 #include "scryptenc_cpuperf.h"
-#include "sha256.h"
-#include "sysendian.h"
 
 #include "scryptenc.h"
 
diff -ruN tarsnap-autoconf-1.0.33/lib/util/asprintf.c tarsnap-autoconf-1.0.34/lib/util/asprintf.c
--- tarsnap-autoconf-1.0.33/lib/util/asprintf.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/asprintf.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,53 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef HAVE_ASPRINTF
-
-/**
- * asprintf(ret, format, ...):
- * Do asprintf(3) like GNU and BSD do.
- */
-int
-asprintf(char **ret, const char *format, ...)
-{
-	va_list ap;
-	int len;
-	size_t buflen;
-
-	/* Figure out how long the string needs to be. */
-	va_start(ap, format);
-	len = vsnprintf(NULL, 0, format, ap);
-	va_end(ap);
-
-	/* Did we fail? */
-	if (len < 0)
-		goto err0;
-	buflen = (size_t)(len) + 1;
-
-	/* Allocate memory. */
-	if ((*ret = malloc(buflen)) == NULL)
-		goto err0;
-
-	/* Actually generate the string. */
-	va_start(ap, format);
-	len = vsnprintf(*ret, buflen, format, ap);
-	va_end(ap);
-
-	/* Did we fail? */
-	if (len < 0)
-		goto err1;
-
-	/* Success! */
-	return (len);
-
-err1:
-	free(*ret);
-err0:
-	/* Failure! */
-	return (-1);
-}
-
-#endif /* !HAVE_ASPRINTF */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/asprintf.h tarsnap-autoconf-1.0.34/lib/util/asprintf.h
--- tarsnap-autoconf-1.0.33/lib/util/asprintf.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/asprintf.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,6 +0,0 @@
-#ifndef _ASPRINTF_H_
-#define _ASPRINTF_H_
-
-int asprintf(char **, const char *, ...);
-
-#endif /* !_ASPRINTF_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/b64encode.c tarsnap-autoconf-1.0.34/lib/util/b64encode.c
--- tarsnap-autoconf-1.0.33/lib/util/b64encode.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/b64encode.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,121 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <string.h>
-
-#include "b64encode.h"
-
-static char b64chars[] =
-    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
-
-/**
- * b64encode(in, out, len):
- * Convert ${len} bytes from ${in} into RFC 1421 base-64 encoding, writing
- * the resulting ((len + 2) / 3) * 4 bytes to ${out}; and append a NUL byte.
- */
-void
-b64encode(const uint8_t * in, char * out, size_t len)
-{
-	uint32_t t;
-	size_t j;
-
-	/* Repeat {read up to 3 bytes; write 4 bytes} until we're done. */
-	while (len) {
-		/* Read up to 3 bytes. */
-		for (t = j = 0; j < 3; j++) {
-			t <<= 8;
-			if (j < len)
-				t += *in++;
-		}
-
-		/* Write 4 bytes. */
-		for (j = 0; j < 4; j++) {
-			if (j <= len)
-				*out++ = b64chars[(t >> 18) & 0x3f];
-			else
-				*out++ = '=';
-			t <<= 6;
-		}
-
-		/* Adjust the remaining length. */
-		if (len < 3)
-			len = 0;
-		else
-			len -= 3;
-	}
-
-	/* NUL terminate. */
-	*out++ = '\0';
-}
-
-/**
- * b64decode(in, inlen, out, outlen):
- * Convert ${inlen} bytes of RFC 1421 base-64 encoding from ${in}, writing
- * the resulting bytes to ${out}; and pass the number of bytes output back
- * via ${outlen}.  The buffer ${out} must contain at least (inlen/4)*3 bytes
- * of space; but ${outlen} might be less than this.  Return non-zero if the
- * input ${in} is not valid base-64 encoded text.
- */
-int
-b64decode(const char * in, size_t inlen, uint8_t * out, size_t * outlen)
-{
-	uint32_t t;
-	size_t deadbytes = 0;
-	size_t i;
-
-	/* We must have a multiple of 4 input bytes. */
-	if (inlen % 4 != 0)
-		goto bad;
-
-	/* Check that we have valid input and count trailing '='s. */
-	for (i = 0; i < inlen; i++) {
-		/* Must be characters from our b64 character set. */
-		if ((in[i] == '\0') || (strchr(b64chars, in[i]) == NULL))
-			goto bad;
-
-		/* Is this a '=' character? */
-		if (in[i] == '=')
-			deadbytes += 1;
-
-		/* No non-'=' bytes after a '=' byte. */
-		if ((in[i] != '=') && (deadbytes > 0))
-			goto bad;
-	}
-
-	/* Can't have more than 2 trailing '=' bytes. */
-	if (deadbytes > 2)
-		goto bad;
-
-	/* We have no output yet. */
-	*outlen = 0;
-
-	/* Loop until we run out of data. */
-	while (inlen) {
-		/* Parse 4 bytes. */
-		for (t = 0, i = 0; i < 4; i++) {
-			t <<= 6;
-			t += (strchr(b64chars, in[i]) - b64chars) & 0x3f;
-		}
-
-		/* Output 3 bytes. */
-		for (i = 0; i < 3; i++) {
-			out[i] = t >> 16;
-			t <<= 8;
-		}
-
-		/* Adjust pointers and lengths for the completed block. */
-		in += 4;
-		inlen -= 4;
-		out += 3;
-		*outlen += 3;
-	}
-
-	/* Ignore dead bytes. */
-	*outlen -= deadbytes;
-
-	/* Success! */
-	return (0);
-
-bad:
-	/* The input is not valid base-64 encoded text. */
-	return (1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/b64encode.h tarsnap-autoconf-1.0.34/lib/util/b64encode.h
--- tarsnap-autoconf-1.0.33/lib/util/b64encode.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/b64encode.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,24 +0,0 @@
-#ifndef _B64ENCODE_H_
-#define _B64ENCODE_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-/**
- * b64encode(in, out, len):
- * Convert ${len} bytes from ${in} into RFC 1421 base-64 encoding, writing
- * the resulting ((len + 2) / 3) * 4 bytes to ${out}; and append a NUL byte.
- */
-void b64encode(const uint8_t *, char *, size_t);
-
-/**
- * b64decode(in, inlen, out, outlen):
- * Convert ${inlen} bytes of RFC 1421 base-64 encoding from ${in}, writing
- * the resulting bytes to ${out}; and pass the number of bytes output back
- * via ${outlen}.  The buffer ${out} must contain at least (inlen/4)*3 bytes
- * of space; but ${outlen} might be less than this.  Return non-zero if the
- * input ${in} is not valid base-64 encoded text.
- */
-int b64decode(const char *, size_t, uint8_t *, size_t *);
-
-#endif /* !_B64ENCODE_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/ctassert.h tarsnap-autoconf-1.0.34/lib/util/ctassert.h
--- tarsnap-autoconf-1.0.33/lib/util/ctassert.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/ctassert.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,14 +0,0 @@
-#ifndef _CTASSERT_H_
-#define _CTASSERT_H_
-
-/*
- * CTASSERT(foo) will produce a compile-time error if "foo" is not a constant
- * expression which evaluates to a non-zero value.
- */
-#ifndef CTASSERT
-#define CTASSERT(x)             _CTASSERT(x, __LINE__)
-#define _CTASSERT(x, y)         __CTASSERT(x, y)
-#define __CTASSERT(x, y)        typedef char __assert ## y[(x) ? 1 : -1]
-#endif
-
-#endif /* !_CTASSERT_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/entropy.c tarsnap-autoconf-1.0.34/lib/util/entropy.c
--- tarsnap-autoconf-1.0.33/lib/util/entropy.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/entropy.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,77 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <fcntl.h>
-#include <limits.h>
-#include <stdint.h>
-
-#include "warnp.h"
-
-#include "entropy.h"
-
-/**
- * XXX Portability
- * XXX We obtain random bytes from the operating system by opening
- * XXX /dev/urandom and reading them from that device; this works on
- * XXX modern UNIX-like operating systems but not on systems like
- * XXX win32 where there is no concept of /dev/urandom.
- */
-
-/**
- * entropy_read(buf, buflen):
- * Fill the given buffer with random bytes provided by the operating system.
- */
-int
-entropy_read(uint8_t * buf, size_t buflen)
-{
-	int fd;
-	ssize_t lenread;
-
-	/* Sanity-check the buffer size. */
-	if (buflen > SSIZE_MAX) {
-		warn0("Programmer error: "
-		    "Trying to read insane amount of random data: %zu",
-		    buflen);
-		goto err0;
-	}
-
-	/* Open /dev/urandom. */
-	if ((fd = open("/dev/urandom", O_RDONLY)) == -1) {
-		warnp("open(/dev/urandom)");
-		goto err0;
-	}
-
-	/* Read bytes until we have filled the buffer. */
-	while (buflen > 0) {
-		if ((lenread = read(fd, buf, buflen)) == -1) {
-			warnp("read(/dev/urandom)");
-			goto err1;
-		}
-
-		/* The random device should never EOF. */
-		if (lenread == 0) {
-			warn0("EOF on /dev/urandom?");
-			goto err1;
-		}
-
-		/* We're partly done. */
-		buf += lenread;
-		buflen -= lenread;
-	}
-
-	/* Close the device. */
-	while (close(fd) == -1) {
-		if (errno != EINTR) {
-			warnp("close(/dev/urandom)");
-			goto err0;
-		}
-	}
-
-	/* Success! */
-	return (0);
-
-err1:
-	close(fd);
-err0:
-	/* Failure! */
-	return (-1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/entropy.h tarsnap-autoconf-1.0.34/lib/util/entropy.h
--- tarsnap-autoconf-1.0.33/lib/util/entropy.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/entropy.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,13 +0,0 @@
-#ifndef _ENTROPY_H_
-#define _ENTROPY_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-/**
- * entropy_read(buf, buflen):
- * Fill the given buffer with random bytes provided by the operating system.
- */
-int entropy_read(uint8_t *, size_t);
-
-#endif /* !_ENTROPY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/hexify.c tarsnap-autoconf-1.0.34/lib/util/hexify.c
--- tarsnap-autoconf-1.0.33/lib/util/hexify.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/hexify.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,57 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stddef.h>
-#include <stdint.h>
-#include <string.h>
-
-#include "hexify.h"
-
-static char hexchars[] ="0123456789abcdef0123456789ABCDEF";
-
-/**
- * hexify(in, out, len):
- * Convert ${len} bytes from ${in} into hexadecimal, writing the resulting
- * 2 * ${len} bytes to ${out}; and append a NUL byte.
- */
-void
-hexify(const uint8_t * in, char * out, size_t len)
-{
-	char * p = out;
-	size_t i;
-
-	for (i = 0; i < len; i++) {
-		*p++ = hexchars[in[i] >> 4];
-		*p++ = hexchars[in[i] & 0x0f];
-	}
-	*p = '\0';
-}
-
-/**
- * unhexify(in, out, len):
- * Convert 2 * ${len} hexadecimal characters from ${in} to ${len} bytes
- * and write them to ${out}.
- */
-int
-unhexify(const char * in, uint8_t * out, size_t len)
-{
-	size_t i;
-
-	/* Make sure we have at least 2 * ${len} hex characters. */
-	for (i = 0; i < 2 * len; i++) {
-		if ((in[i] == '\0') || (strchr(hexchars, in[i]) == NULL))
-			goto err0;
-	}
-
-	for (i = 0; i < len; i++) {
-		out[i] = (strchr(hexchars, in[2 * i]) - hexchars) & 0x0f;
-		out[i] <<= 4;
-		out[i] += (strchr(hexchars, in[2 * i + 1]) - hexchars) & 0x0f;
-	}
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Bad input string. */
-	return (-1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/hexify.h tarsnap-autoconf-1.0.34/lib/util/hexify.h
--- tarsnap-autoconf-1.0.33/lib/util/hexify.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/hexify.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,21 +0,0 @@
-#ifndef _HEXIFY_H_
-#define _HEXIFY_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-/**
- * hexify(in, out, len):
- * Convert ${len} bytes from ${in} into hexadecimal, writing the resulting
- * 2 * ${len} bytes to ${out}; and append a NUL byte.
- */
-void hexify(const uint8_t *, char *, size_t);
-
-/**
- * unhexify(in, out, len):
- * Convert 2 * ${len} hexadecimal characters from ${in} to ${len} bytes
- * and write them to ${out}.
- */
-int unhexify(const char *, uint8_t *, size_t);
-
-#endif /* !_HEXIFY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/humansize.c tarsnap-autoconf-1.0.34/lib/util/humansize.c
--- tarsnap-autoconf-1.0.33/lib/util/humansize.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/humansize.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,171 +0,0 @@
-#include "bsdtar_platform.h"
-
-#include <stdio.h>
-
-#include "warnp.h"
-
-#include "humansize.h"
-
-/**
- * humansize(size):
- * Given a size in bytes, allocate and return a string of the form "<N> B"
- * for 0 <= N <= 999 or "<X> <prefix>B" where either 10 <= X <= 999 or
- * 1.0 <= X <= 9.9 and <prefix> is "k", "M", "G", "T", "P", or "E"; and where
- * the value returned is the largest valid value <= the provided size.
- */
-char *
-humansize(uint64_t size)
-{
-	char * s;
-	char prefix;
-	int shiftcnt;
-	int rc;
-
-	/* Special-case for size < 1000. */
-	if (size < 1000) {
-		rc = asprintf(&s, "%d B", (int)size);
-	} else {
-		/* Keep 10 * size / 1000^(3n) in size. */
-		for (size /= 100, shiftcnt = 1; size >= 10000; shiftcnt++)
-			size /= 1000;
-
-		/*
-		 * Figure out what prefix to use.  Since 1 EB = 10^18 B and
-		 * the maximum value of a uint64_t is 2^64 which is roughly
-		 * 18.4 * 10^18, this cannot reference beyond the end of the
-		 * string.
-		 */
-		prefix = " kMGTPE"[shiftcnt];
-
-		/* Construct the string. */
-		if (size < 100)
-			rc = asprintf(&s, "%d.%d %cB", (int)size / 10,
-			    (int)size % 10, prefix);
-		else
-			rc = asprintf(&s, "%d %cB", (int)size / 10, prefix);
-	}
-
-	if (rc == -1) {
-		warnp("asprintf");
-		goto err0;
-	}
-
-	/* Success! */
-	return (s);
-
-err0:
-	/* Failure! */
-	return (NULL);
-}
-
-/**
- * humansize_parse(s, size):
- * Parse a string matching /[0-9]+ ?[kMGTPE]?B?/ as a size in bytes.
- */
-int
-humansize_parse(const char * s, uint64_t * size)
-{
-	int state = 0;
-	uint64_t multiplier = 1;
-
-	while (*s != '\0') {
-		switch (state) {
-		case -1:
-			/* Error state. */
-			break;
-		case 0:
-			/* Initial state. */
-			*size = 0;
-
-			/* We must start with at least one digit. */
-			if ((*s < '0') || (*s > '9')) {
-				state = -1;
-				break;
-			}
-
-			/* FALLTHROUGH */
-			state = 1;
-		case 1:
-			/* Digit-parsing state. */
-			if (('0' <= *s) && (*s <= '9')) {
-				if (*size > UINT64_MAX / 10)
-					state = -1;
-				else
-					*size *= 10;
-				if (*size > UINT64_MAX - (*s - '0'))
-					state = -1;
-				else
-					*size += *s - '0';
-				break;
-			}
-
-			/* FALLTHROUGH */
-			state = 2;
-		case 2:
-			/* Ignore an optional ' '. */
-			if (*s == ' ') {
-				state = 3;
-				break;
-			}
-
-			/* FALLTHROUGH */
-			state = 3;
-		case 3:
-			/* We may have one SI prefix. */
-			switch (*s) {
-			case 'E':
-				multiplier *= 1000;
-				/* FALLTHROUGH */
-			case 'P':
-				multiplier *= 1000;
-				/* FALLTHROUGH */
-			case 'T':
-				multiplier *= 1000;
-				/* FALLTHROUGH */
-			case 'G':
-				multiplier *= 1000;
-				/* FALLTHROUGH */
-			case 'M':
-				multiplier *= 1000;
-				/* FALLTHROUGH */
-			case 'k':
-				multiplier *= 1000;
-				break;
-			}
-
-			/* If we found a prefix, we've parsed this char. */
-			if (multiplier != 1) {
-				state = 4;
-				break;
-			}
-
-			/* FALLTHROUGH */
-			state = 4;
-		case 4:
-			/* Ignore an optional trailing 'B'. */
-			if (*s == 'B') {
-				state = 5;
-				break;
-			}
-
-			/* FALLTHROUGH */
-			state = 5;
-		case 5:
-			/* We have trailing garbage. */
-			state = -1;
-			break;
-		}
-
-		/* Move on to the next character. */
-		s++;
-	}
-
-	/* Multiply by multiplier. */
-	if (*size > UINT64_MAX / multiplier)
-		state = -1;
-	else
-		*size *= multiplier;
-
-	/* Anything other than state -1 is success. */
-	return ((state == -1) ? -1 : 0);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/humansize.h tarsnap-autoconf-1.0.34/lib/util/humansize.h
--- tarsnap-autoconf-1.0.33/lib/util/humansize.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/humansize.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,21 +0,0 @@
-#ifndef _HUMANSIZE_H_
-#define _HUMANSIZE_H_
-
-#include <stdint.h>
-
-/**
- * humansize(size):
- * Given a size in bytes, allocate and return a string of the form "<N> B"
- * for 0 <= N <= 999 or "<X> <prefix>B" where either 10 <= X <= 999 or
- * 1.0 <= X <= 9.9 and <prefix> is "k", "M", "G", "T", "P", or "E"; and where
- * the value returned is the largest valid value <= the provided size.
- */
-char * humansize(uint64_t);
-
-/**
- * humansize_parse(s, size):
- * Parse a string matching /[0-9]+ ?[kMGTPE]?B?/ as a size in bytes.
- */
-int humansize_parse(const char *, uint64_t *);
-
-#endif /* !_HUMANSIZE_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/monoclock.c tarsnap-autoconf-1.0.34/lib/util/monoclock.c
--- tarsnap-autoconf-1.0.33/lib/util/monoclock.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/monoclock.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,41 +0,0 @@
-#include <sys/time.h>
-
-#include <time.h>
-
-#include "warnp.h"
-
-#include "monoclock.h"
-
-/**
- * monoclock_get(tv):
- * Store the current time in ${tv}.  If CLOCK_MONOTONIC is available, use
- * that clock; otherwise, use gettimeofday(2).
- */
-int
-monoclock_get(struct timeval * tv)
-{
-#ifdef CLOCK_MONOTONIC
-	struct timespec tp;
-#endif
-
-#ifdef CLOCK_MONOTONIC
-	if (clock_gettime(CLOCK_MONOTONIC, &tp)) {
-		warnp("clock_gettime(CLOCK_MONOTONIC)");
-		goto err0;
-	}
-	tv->tv_sec = tp.tv_sec;
-	tv->tv_usec = tp.tv_nsec / 1000;
-#else
-	if (gettimeofday(tv, NULL)) {
-		warnp("gettimeofday");
-		goto err0;
-	}
-#endif
-
-	/* Success! */
-	return (0);
-
-err0:
-	/* Failure! */
-	return (-1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/monoclock.h tarsnap-autoconf-1.0.34/lib/util/monoclock.h
--- tarsnap-autoconf-1.0.33/lib/util/monoclock.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/monoclock.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,13 +0,0 @@
-#ifndef _MONOCLOCK_H_
-#define _MONOCLOCK_H_
-
-#include <sys/time.h>
-
-/**
- * monoclock_get(tv):
- * Store the current time in ${tv}.  If CLOCK_MONOTONIC is available, use
- * that clock; otherwise, use gettimeofday(2).
- */
-int monoclock_get(struct timeval *);
-
-#endif /* !_MONOCLOCK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/readpass.c tarsnap-autoconf-1.0.34/lib/util/readpass.c
--- tarsnap-autoconf-1.0.33/lib/util/readpass.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/readpass.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,145 +0,0 @@
-/*-
- * Copyright 2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#include "bsdtar_platform.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include "warnp.h"
-
-#include "readpass.h"
-
-#define MAXPASSLEN 2048
-
-/**
- * tarsnap_readpass(passwd, prompt, confirmprompt, devtty)
- * If ${devtty} is non-zero, read a password from /dev/tty if possible; if
- * not, read from stdin.  If reading from a tty (either /dev/tty or stdin),
- * disable echo and prompt the user by printing ${prompt} to stderr.  If
- * ${confirmprompt} is non-NULL, read a second password (prompting if a
- * terminal is being used) and repeat until the user enters the same password
- * twice.  Return the password as a malloced NUL-terminated string via
- * ${passwd}.  The obscure name is to avoid namespace collisions due to the
- * getpass / readpass / readpassphrase / etc. functions in various libraries.
- */
-int
-tarsnap_readpass(char ** passwd, const char * prompt,
-    const char * confirmprompt, int devtty)
-{
-	FILE * readfrom;
-	char passbuf[MAXPASSLEN];
-	char confpassbuf[MAXPASSLEN];
-	struct termios term, term_old;
-	int usingtty;
-
-	/*
-	 * If devtty != 0, try to open /dev/tty; if that fails, or if devtty
-	 * is zero, we'll read the password from stdin instead.
-	 */
-	if ((devtty == 0) || ((readfrom = fopen("/dev/tty", "r")) == NULL))
-		readfrom = stdin;
-
-	/* If we're reading from a terminal, try to disable echo. */
-	if ((usingtty = isatty(fileno(readfrom))) != 0) {
-		if (tcgetattr(fileno(readfrom), &term_old)) {
-			warnp("Cannot read terminal settings");
-			goto err2;
-		}
-		memcpy(&term, &term_old, sizeof(struct termios));
-		term.c_lflag = (term.c_lflag & ~ECHO) | ECHONL;
-		if (tcsetattr(fileno(readfrom), TCSANOW, &term)) {
-			warnp("Cannot set terminal settings");
-			goto err2;
-		}
-	}
-
-retry:
-	/* If we have a terminal, prompt the user to enter the password. */
-	if (usingtty)
-		fprintf(stderr, "%s: ", prompt);
-
-	/* Read the password. */
-	if (fgets(passbuf, MAXPASSLEN, readfrom) == NULL) {
-		warnp("Cannot read password");
-		goto err3;
-	}
-
-	/* Confirm the password if necessary. */
-	if (confirmprompt != NULL) {
-		if (usingtty)
-			fprintf(stderr, "%s: ", confirmprompt);
-		if (fgets(confpassbuf, MAXPASSLEN, readfrom) == NULL) {
-			warnp("Cannot read password");
-			goto err3;
-		}
-		if (strcmp(passbuf, confpassbuf)) {
-			fprintf(stderr,
-			    "Passwords mismatch, please try again\n");
-			goto retry;
-		}
-	}
-
-	/* Terminate the string at the first "\r" or "\n" (if any). */
-	passbuf[strcspn(passbuf, "\r\n")] = '\0';
-
-	/* If we changed terminal settings, reset them. */
-	if (usingtty)
-		tcsetattr(fileno(readfrom), TCSANOW, &term_old);
-
-	/* Close /dev/tty if we opened it. */
-	if (readfrom != stdin)
-		fclose(readfrom);
-
-	/* Copy the password out. */
-	if ((*passwd = strdup(passbuf)) == NULL)
-		goto err1;
-
-	/* Zero any stored passwords. */
-	memset(passbuf, 0, MAXPASSLEN);
-	memset(confpassbuf, 0, MAXPASSLEN);
-
-	/* Success! */
-	return (0);
-
-err3:
-	/* Reset terminal settings if necessary. */
-	if (usingtty)
-		tcsetattr(fileno(readfrom), TCSAFLUSH, &term_old);
-err2:
-	/* Close /dev/tty if we opened it. */
-	if (readfrom != stdin)
-		fclose(readfrom);
-err1:
-	/* Zero any stored passwords. */
-	memset(passbuf, 0, MAXPASSLEN);
-	memset(confpassbuf, 0, MAXPASSLEN);
-
-	/* Failure! */
-	return (-1);
-}
diff -ruN tarsnap-autoconf-1.0.33/lib/util/readpass.h tarsnap-autoconf-1.0.34/lib/util/readpass.h
--- tarsnap-autoconf-1.0.33/lib/util/readpass.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/readpass.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,45 +0,0 @@
-/*-
- * Copyright 2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This file was originally written by Colin Percival as part of the Tarsnap
- * online backup system.
- */
-#ifndef _READPASS_H_
-#define _READPASS_H_
-
-/**
- * tarsnap_readpass(passwd, prompt, confirmprompt, devtty)
- * If ${devtty} is non-zero, read a password from /dev/tty if possible; if
- * not, read from stdin.  If reading from a tty (either /dev/tty or stdin),
- * disable echo and prompt the user by printing ${prompt} to stderr.  If
- * ${confirmprompt} is non-NULL, read a second password (prompting if a
- * terminal is being used) and repeat until the user enters the same password
- * twice.  Return the password as a malloced NUL-terminated string via
- * ${passwd}.  The obscure name is to avoid namespace collisions due to the
- * getpass / readpass / readpassphrase / etc. functions in various libraries.
- */
-int tarsnap_readpass(char **, const char *, const char *, int);
-
-#endif /* !_READPASS_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/sysendian.h tarsnap-autoconf-1.0.34/lib/util/sysendian.h
--- tarsnap-autoconf-1.0.33/lib/util/sysendian.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/sysendian.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,140 +0,0 @@
-/*-
- * Copyright 2007-2009 Colin Percival
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This file was originally written by Colin Percival as part of the Tarsnap
- * online backup system.
- */
-#ifndef _SYSENDIAN_H_
-#define _SYSENDIAN_H_
-
-#include "bsdtar_platform.h"
-
-/* If we don't have be64enc, the <sys/endian.h> we have isn't usable. */
-#if !HAVE_DECL_BE64ENC
-#undef HAVE_SYS_ENDIAN_H
-#endif
-
-#ifdef HAVE_SYS_ENDIAN_H
-
-#include <sys/endian.h>
-
-#else
-
-#include <stdint.h>
-
-static inline uint32_t
-be32dec(const void *pp)
-{
-	const uint8_t *p = (uint8_t const *)pp;
-
-	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
-	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
-}
-
-static inline void
-be32enc(void *pp, uint32_t x)
-{
-	uint8_t * p = (uint8_t *)pp;
-
-	p[3] = x & 0xff;
-	p[2] = (x >> 8) & 0xff;
-	p[1] = (x >> 16) & 0xff;
-	p[0] = (x >> 24) & 0xff;
-}
-
-static inline uint64_t
-be64dec(const void *pp)
-{
-	const uint8_t *p = (uint8_t const *)pp;
-
-	return ((uint64_t)(p[7]) + ((uint64_t)(p[6]) << 8) +
-	    ((uint64_t)(p[5]) << 16) + ((uint64_t)(p[4]) << 24) +
-	    ((uint64_t)(p[3]) << 32) + ((uint64_t)(p[2]) << 40) +
-	    ((uint64_t)(p[1]) << 48) + ((uint64_t)(p[0]) << 56));
-}
-
-static inline void
-be64enc(void *pp, uint64_t x)
-{
-	uint8_t * p = (uint8_t *)pp;
-
-	p[7] = x & 0xff;
-	p[6] = (x >> 8) & 0xff;
-	p[5] = (x >> 16) & 0xff;
-	p[4] = (x >> 24) & 0xff;
-	p[3] = (x >> 32) & 0xff;
-	p[2] = (x >> 40) & 0xff;
-	p[1] = (x >> 48) & 0xff;
-	p[0] = (x >> 56) & 0xff;
-}
-
-static inline uint32_t
-le32dec(const void *pp)
-{
-	const uint8_t *p = (uint8_t const *)pp;
-
-	return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
-	    ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
-}
-
-static inline void
-le32enc(void *pp, uint32_t x)
-{
-	uint8_t * p = (uint8_t *)pp;
-
-	p[0] = x & 0xff;
-	p[1] = (x >> 8) & 0xff;
-	p[2] = (x >> 16) & 0xff;
-	p[3] = (x >> 24) & 0xff;
-}
-
-static inline uint64_t
-le64dec(const void *pp)
-{
-	const uint8_t *p = (uint8_t const *)pp;
-
-	return ((uint64_t)(p[0]) + ((uint64_t)(p[1]) << 8) +
-	    ((uint64_t)(p[2]) << 16) + ((uint64_t)(p[3]) << 24) +
-	    ((uint64_t)(p[4]) << 32) + ((uint64_t)(p[5]) << 40) +
-	    ((uint64_t)(p[6]) << 48) + ((uint64_t)(p[7]) << 56));
-}
-
-static inline void
-le64enc(void *pp, uint64_t x)
-{
-	uint8_t * p = (uint8_t *)pp;
-
-	p[0] = x & 0xff;
-	p[1] = (x >> 8) & 0xff;
-	p[2] = (x >> 16) & 0xff;
-	p[3] = (x >> 24) & 0xff;
-	p[4] = (x >> 32) & 0xff;
-	p[5] = (x >> 40) & 0xff;
-	p[6] = (x >> 48) & 0xff;
-	p[7] = (x >> 56) & 0xff;
-}
-#endif /* !HAVE_SYS_ENDIAN_H */
-
-#endif /* !_SYSENDIAN_H_ */
diff -ruN tarsnap-autoconf-1.0.33/lib/util/warnp.c tarsnap-autoconf-1.0.34/lib/util/warnp.c
--- tarsnap-autoconf-1.0.33/lib/util/warnp.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/warnp.c	1969-12-31 16:00:00.000000000 -0800
@@ -1,47 +0,0 @@
-#include "bsdtar_platform.h"
-
-#ifdef HAVE_ERR_H
-/*
- * Everything is provided through err.h and the associated library, so we
- * don't need to do anything here.
- */
-#else
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "warnp.h"
-
-const char * warn_progname = "(null)";
-
-void
-warn(const char * fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-	fprintf(stderr, "%s", warn_progname);
-	if (fmt != NULL) {
-		fprintf(stderr, ": ");
-		vfprintf(stderr, fmt, ap);
-	}
-	fprintf(stderr, ": %s\n", strerror(errno));
-	va_end(ap);
-}
-
-void
-warnx(const char * fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-	fprintf(stderr, "%s", warn_progname);
-	if (fmt != NULL) {
-		fprintf(stderr, ": ");
-		vfprintf(stderr, fmt, ap);
-	}
-	fprintf(stderr, "\n");
-	va_end(ap);
-}
-#endif
diff -ruN tarsnap-autoconf-1.0.33/lib/util/warnp.h tarsnap-autoconf-1.0.34/lib/util/warnp.h
--- tarsnap-autoconf-1.0.33/lib/util/warnp.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/lib/util/warnp.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,49 +0,0 @@
-#ifndef _WARNP_H_
-#define _WARNP_H_
-
-#ifdef HAVE_ERR_H
-#include <err.h>
-#else
-#define NEED_WARN_PROGNAME
-const char * warn_progname;
-void warn(const char *, ...);
-void warnx(const char *, ...);
-#endif
-#include <errno.h>
-
-/*
- * If compiled with DEBUG defined, print __FILE__ and __LINE__.
- */
-#ifdef DEBUG
-#define warnline	do {				\
-	warnx("%s, %d", __FILE__, __LINE__);		\
-} while (0)
-#else
-#define warnline
-#endif
-
-/*
- * Call warn(3) or warnx(3) depending upon whether errno == 0; and clear
- * errno (so that the standard error message isn't repeated later).
- */
-#define	warnp(...) do {					\
-	warnline;					\
-	if (errno != 0) {				\
-		warn(__VA_ARGS__);			\
-		errno = 0;				\
-	} else						\
-		warnx(__VA_ARGS__);			\
-} while (0)
-
-/*
- * Call warnx(3) and set errno == 0.  Unlike warnp, this should be used
- * in cases where we're reporting a problem which we discover ourselves
- * rather than one which is reported to us from a library or the kernel.
- */
-#define warn0(...) do {					\
-	warnline;					\
-	warnx(__VA_ARGS__);				\
-	errno = 0;					\
-} while (0)
-
-#endif /* !_WARNP_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/COPYRIGHT tarsnap-autoconf-1.0.34/libcperciva/COPYRIGHT
--- tarsnap-autoconf-1.0.33/libcperciva/COPYRIGHT	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/COPYRIGHT	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,25 @@
+The code and documentation in this directory ("libcperciva") is distributed
+under the following terms:
+
+Copyright 2005-2013 Colin Percival.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/alg/sha256.c tarsnap-autoconf-1.0.34/libcperciva/alg/sha256.c
--- tarsnap-autoconf-1.0.33/libcperciva/alg/sha256.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/alg/sha256.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,436 @@
+#include <stdint.h>
+#include <string.h>
+
+#include "sysendian.h"
+
+#include "sha256.h"
+
+/*
+ * Encode a length len/4 vector of (uint32_t) into a length len vector of
+ * (uint8_t) in big-endian form.  Assumes len is a multiple of 4.
+ */
+static void
+be32enc_vect(uint8_t *dst, const uint32_t *src, size_t len)
+{
+	size_t i;
+
+	for (i = 0; i < len / 4; i++)
+		be32enc(dst + i * 4, src[i]);
+}
+
+/*
+ * Decode a big-endian length len vector of (uint8_t) into a length
+ * len/4 vector of (uint32_t).  Assumes len is a multiple of 4.
+ */
+static void
+be32dec_vect(uint32_t *dst, const uint8_t *src, size_t len)
+{
+	size_t i;
+
+	for (i = 0; i < len / 4; i++)
+		dst[i] = be32dec(src + i * 4);
+}
+
+/* Elementary functions used by SHA256 */
+#define Ch(x, y, z)	((x & (y ^ z)) ^ z)
+#define Maj(x, y, z)	((x & (y | z)) | (y & z))
+#define SHR(x, n)	(x >> n)
+#define ROTR(x, n)	((x >> n) | (x << (32 - n)))
+#define S0(x)		(ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22))
+#define S1(x)		(ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25))
+#define s0(x)		(ROTR(x, 7) ^ ROTR(x, 18) ^ SHR(x, 3))
+#define s1(x)		(ROTR(x, 17) ^ ROTR(x, 19) ^ SHR(x, 10))
+
+/* SHA256 round function */
+#define RND(a, b, c, d, e, f, g, h, k)			\
+	t0 = h + S1(e) + Ch(e, f, g) + k;		\
+	t1 = S0(a) + Maj(a, b, c);			\
+	d += t0;					\
+	h  = t0 + t1;
+
+/* Adjusted round function for rotating state */
+#define RNDr(S, W, i, k)			\
+	RND(S[(64 - i) % 8], S[(65 - i) % 8],	\
+	    S[(66 - i) % 8], S[(67 - i) % 8],	\
+	    S[(68 - i) % 8], S[(69 - i) % 8],	\
+	    S[(70 - i) % 8], S[(71 - i) % 8],	\
+	    W[i] + k)
+
+/*
+ * SHA256 block compression function.  The 256-bit state is transformed via
+ * the 512-bit input block to produce a new state.
+ */
+static void
+SHA256_Transform(uint32_t * state, const uint8_t block[64])
+{
+	uint32_t W[64];
+	uint32_t S[8];
+	uint32_t t0, t1;
+	int i;
+
+	/* 1. Prepare message schedule W. */
+	be32dec_vect(W, block, 64);
+	for (i = 16; i < 64; i++)
+		W[i] = s1(W[i - 2]) + W[i - 7] + s0(W[i - 15]) + W[i - 16];
+
+	/* 2. Initialize working variables. */
+	memcpy(S, state, 32);
+
+	/* 3. Mix. */
+	RNDr(S, W, 0, 0x428a2f98);
+	RNDr(S, W, 1, 0x71374491);
+	RNDr(S, W, 2, 0xb5c0fbcf);
+	RNDr(S, W, 3, 0xe9b5dba5);
+	RNDr(S, W, 4, 0x3956c25b);
+	RNDr(S, W, 5, 0x59f111f1);
+	RNDr(S, W, 6, 0x923f82a4);
+	RNDr(S, W, 7, 0xab1c5ed5);
+	RNDr(S, W, 8, 0xd807aa98);
+	RNDr(S, W, 9, 0x12835b01);
+	RNDr(S, W, 10, 0x243185be);
+	RNDr(S, W, 11, 0x550c7dc3);
+	RNDr(S, W, 12, 0x72be5d74);
+	RNDr(S, W, 13, 0x80deb1fe);
+	RNDr(S, W, 14, 0x9bdc06a7);
+	RNDr(S, W, 15, 0xc19bf174);
+	RNDr(S, W, 16, 0xe49b69c1);
+	RNDr(S, W, 17, 0xefbe4786);
+	RNDr(S, W, 18, 0x0fc19dc6);
+	RNDr(S, W, 19, 0x240ca1cc);
+	RNDr(S, W, 20, 0x2de92c6f);
+	RNDr(S, W, 21, 0x4a7484aa);
+	RNDr(S, W, 22, 0x5cb0a9dc);
+	RNDr(S, W, 23, 0x76f988da);
+	RNDr(S, W, 24, 0x983e5152);
+	RNDr(S, W, 25, 0xa831c66d);
+	RNDr(S, W, 26, 0xb00327c8);
+	RNDr(S, W, 27, 0xbf597fc7);
+	RNDr(S, W, 28, 0xc6e00bf3);
+	RNDr(S, W, 29, 0xd5a79147);
+	RNDr(S, W, 30, 0x06ca6351);
+	RNDr(S, W, 31, 0x14292967);
+	RNDr(S, W, 32, 0x27b70a85);
+	RNDr(S, W, 33, 0x2e1b2138);
+	RNDr(S, W, 34, 0x4d2c6dfc);
+	RNDr(S, W, 35, 0x53380d13);
+	RNDr(S, W, 36, 0x650a7354);
+	RNDr(S, W, 37, 0x766a0abb);
+	RNDr(S, W, 38, 0x81c2c92e);
+	RNDr(S, W, 39, 0x92722c85);
+	RNDr(S, W, 40, 0xa2bfe8a1);
+	RNDr(S, W, 41, 0xa81a664b);
+	RNDr(S, W, 42, 0xc24b8b70);
+	RNDr(S, W, 43, 0xc76c51a3);
+	RNDr(S, W, 44, 0xd192e819);
+	RNDr(S, W, 45, 0xd6990624);
+	RNDr(S, W, 46, 0xf40e3585);
+	RNDr(S, W, 47, 0x106aa070);
+	RNDr(S, W, 48, 0x19a4c116);
+	RNDr(S, W, 49, 0x1e376c08);
+	RNDr(S, W, 50, 0x2748774c);
+	RNDr(S, W, 51, 0x34b0bcb5);
+	RNDr(S, W, 52, 0x391c0cb3);
+	RNDr(S, W, 53, 0x4ed8aa4a);
+	RNDr(S, W, 54, 0x5b9cca4f);
+	RNDr(S, W, 55, 0x682e6ff3);
+	RNDr(S, W, 56, 0x748f82ee);
+	RNDr(S, W, 57, 0x78a5636f);
+	RNDr(S, W, 58, 0x84c87814);
+	RNDr(S, W, 59, 0x8cc70208);
+	RNDr(S, W, 60, 0x90befffa);
+	RNDr(S, W, 61, 0xa4506ceb);
+	RNDr(S, W, 62, 0xbef9a3f7);
+	RNDr(S, W, 63, 0xc67178f2);
+
+	/* 4. Mix local working variables into global state. */
+	for (i = 0; i < 8; i++)
+		state[i] += S[i];
+
+	/* Clean the stack. */
+	memset(W, 0, 256);
+	memset(S, 0, 32);
+	t0 = t1 = 0;
+}
+
+static uint8_t PAD[64] = {
+	0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* Add padding and terminating bit-count. */
+static void
+SHA256_Pad(SHA256_CTX * ctx)
+{
+	uint8_t len[8];
+	uint32_t r, plen;
+
+	/*
+	 * Convert length to a vector of bytes -- we do this now rather
+	 * than later because the length will change after we pad.
+	 */
+	be32enc_vect(len, ctx->count, 8);
+
+	/* Add 1--64 bytes so that the resulting length is 56 mod 64. */
+	r = (ctx->count[1] >> 3) & 0x3f;
+	plen = (r < 56) ? (56 - r) : (120 - r);
+	SHA256_Update(ctx, PAD, (size_t)plen);
+
+	/* Add the terminating bit-count. */
+	SHA256_Update(ctx, len, 8);
+}
+
+/**
+ * SHA256_Init(ctx):
+ * Initialize the SHA256 context ${ctx}.
+ */
+void
+SHA256_Init(SHA256_CTX * ctx)
+{
+
+	/* Zero bits processed so far. */
+	ctx->count[0] = ctx->count[1] = 0;
+
+	/* Magic initialization constants. */
+	ctx->state[0] = 0x6A09E667;
+	ctx->state[1] = 0xBB67AE85;
+	ctx->state[2] = 0x3C6EF372;
+	ctx->state[3] = 0xA54FF53A;
+	ctx->state[4] = 0x510E527F;
+	ctx->state[5] = 0x9B05688C;
+	ctx->state[6] = 0x1F83D9AB;
+	ctx->state[7] = 0x5BE0CD19;
+}
+
+/**
+ * SHA256_Update(ctx, in, len):
+ * Input ${len} bytes from ${in} into the SHA256 context ${ctx}.
+ */
+void
+SHA256_Update(SHA256_CTX * ctx, const void *in, size_t len)
+{
+	uint32_t bitlen[2];
+	uint32_t r;
+	const uint8_t *src = in;
+
+	/* Return immediately if we have nothing to do. */
+	if (len == 0)
+		return;
+
+	/* Number of bytes left in the buffer from previous updates. */
+	r = (ctx->count[1] >> 3) & 0x3f;
+
+	/* Convert the length into a number of bits. */
+	bitlen[1] = ((uint32_t)len) << 3;
+	bitlen[0] = (uint32_t)(len >> 29);
+
+	/* Update number of bits. */
+	if ((ctx->count[1] += bitlen[1]) < bitlen[1])
+		ctx->count[0]++;
+	ctx->count[0] += bitlen[0];
+
+	/* Handle the case where we don't need to perform any transforms. */
+	if (len < 64 - r) {
+		memcpy(&ctx->buf[r], src, len);
+		return;
+	}
+
+	/* Finish the current block. */
+	memcpy(&ctx->buf[r], src, 64 - r);
+	SHA256_Transform(ctx->state, ctx->buf);
+	src += 64 - r;
+	len -= 64 - r;
+
+	/* Perform complete blocks. */
+	while (len >= 64) {
+		SHA256_Transform(ctx->state, src);
+		src += 64;
+		len -= 64;
+	}
+
+	/* Copy left over data into buffer. */
+	memcpy(ctx->buf, src, len);
+}
+
+/**
+ * SHA256_Final(digest, ctx):
+ * Output the SHA256 hash of the data input to the context ${ctx} into the
+ * buffer ${digest}.
+ */
+void
+SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx)
+{
+
+	/* Add padding. */
+	SHA256_Pad(ctx);
+
+	/* Write the hash. */
+	be32enc_vect(digest, ctx->state, 32);
+
+	/* Clear the context state. */
+	memset((void *)ctx, 0, sizeof(*ctx));
+}
+
+/**
+ * SHA256_Buf(in, len, digest):
+ * Compute the SHA256 hash of ${len} bytes from $in} and write it to ${digest}.
+ */
+void
+SHA256_Buf(const void * in, size_t len, uint8_t digest[32])
+{
+	SHA256_CTX ctx;
+
+	SHA256_Init(&ctx);
+	SHA256_Update(&ctx, in, len);
+	SHA256_Final(digest, &ctx);
+}
+
+/**
+ * HMAC_SHA256_Init(ctx, K, Klen):
+ * Initialize the HMAC-SHA256 context ${ctx} with ${Klen} bytes of key from
+ * ${K}.
+ */
+void
+HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
+{
+	uint8_t pad[64];
+	uint8_t khash[32];
+	const uint8_t * K = _K;
+	size_t i;
+
+	/* If Klen > 64, the key is really SHA256(K). */
+	if (Klen > 64) {
+		SHA256_Init(&ctx->ictx);
+		SHA256_Update(&ctx->ictx, K, Klen);
+		SHA256_Final(khash, &ctx->ictx);
+		K = khash;
+		Klen = 32;
+	}
+
+	/* Inner SHA256 operation is SHA256(K xor [block of 0x36] || data). */
+	SHA256_Init(&ctx->ictx);
+	memset(pad, 0x36, 64);
+	for (i = 0; i < Klen; i++)
+		pad[i] ^= K[i];
+	SHA256_Update(&ctx->ictx, pad, 64);
+
+	/* Outer SHA256 operation is SHA256(K xor [block of 0x5c] || hash). */
+	SHA256_Init(&ctx->octx);
+	memset(pad, 0x5c, 64);
+	for (i = 0; i < Klen; i++)
+		pad[i] ^= K[i];
+	SHA256_Update(&ctx->octx, pad, 64);
+
+	/* Clean the stack. */
+	memset(khash, 0, 32);
+	memset(pad, 0, 64);
+}
+
+/**
+ * HMAC_SHA256_Update(ctx, in, len):
+ * Input ${len} bytes from ${in} into the HMAC-SHA256 context ${ctx}.
+ */
+void
+HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void *in, size_t len)
+{
+
+	/* Feed data to the inner SHA256 operation. */
+	SHA256_Update(&ctx->ictx, in, len);
+}
+
+/**
+ * HMAC_SHA256_Final(digest, ctx):
+ * Output the HMAC-SHA256 of the data input to the context ${ctx} into the
+ * buffer ${digest}.
+ */
+void
+HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx)
+{
+	uint8_t ihash[32];
+
+	/* Finish the inner SHA256 operation. */
+	SHA256_Final(ihash, &ctx->ictx);
+
+	/* Feed the inner hash to the outer SHA256 operation. */
+	SHA256_Update(&ctx->octx, ihash, 32);
+
+	/* Finish the outer SHA256 operation. */
+	SHA256_Final(digest, &ctx->octx);
+
+	/* Clean the stack. */
+	memset(ihash, 0, 32);
+}
+
+/**
+ * HMAC_SHA256_Buf(K, Klen, in, len, digest):
+ * Compute the HMAC-SHA256 of ${len} bytes from ${in} using the key ${K} of
+ * length ${Klen}, and write the result to ${digest}.
+ */
+void
+HMAC_SHA256_Buf(const void * K, size_t Klen, const void * in, size_t len,
+    uint8_t digest[32])
+{
+	HMAC_SHA256_CTX ctx;
+
+	HMAC_SHA256_Init(&ctx, K, Klen);
+	HMAC_SHA256_Update(&ctx, in, len);
+	HMAC_SHA256_Final(digest, &ctx);
+}
+
+/**
+ * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
+ * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
+ * write the output to buf.  The value dkLen must be at most 32 * (2^32 - 1).
+ */
+void
+PBKDF2_SHA256(const uint8_t * passwd, size_t passwdlen, const uint8_t * salt,
+    size_t saltlen, uint64_t c, uint8_t * buf, size_t dkLen)
+{
+	HMAC_SHA256_CTX PShctx, hctx;
+	size_t i;
+	uint8_t ivec[4];
+	uint8_t U[32];
+	uint8_t T[32];
+	uint64_t j;
+	int k;
+	size_t clen;
+
+	/* Compute HMAC state after processing P and S. */
+	HMAC_SHA256_Init(&PShctx, passwd, passwdlen);
+	HMAC_SHA256_Update(&PShctx, salt, saltlen);
+
+	/* Iterate through the blocks. */
+	for (i = 0; i * 32 < dkLen; i++) {
+		/* Generate INT(i + 1). */
+		be32enc(ivec, (uint32_t)(i + 1));
+
+		/* Compute U_1 = PRF(P, S || INT(i)). */
+		memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX));
+		HMAC_SHA256_Update(&hctx, ivec, 4);
+		HMAC_SHA256_Final(U, &hctx);
+
+		/* T_i = U_1 ... */
+		memcpy(T, U, 32);
+
+		for (j = 2; j <= c; j++) {
+			/* Compute U_j. */
+			HMAC_SHA256_Init(&hctx, passwd, passwdlen);
+			HMAC_SHA256_Update(&hctx, U, 32);
+			HMAC_SHA256_Final(U, &hctx);
+
+			/* ... xor U_j ... */
+			for (k = 0; k < 32; k++)
+				T[k] ^= U[k];
+		}
+
+		/* Copy as many bytes as necessary into buf. */
+		clen = dkLen - i * 32;
+		if (clen > 32)
+			clen = 32;
+		memcpy(&buf[i * 32], T, clen);
+	}
+
+	/* Clean PShctx, since we never called _Final on it. */
+	memset(&PShctx, 0, sizeof(HMAC_SHA256_CTX));
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/alg/sha256.h tarsnap-autoconf-1.0.34/libcperciva/alg/sha256.h
--- tarsnap-autoconf-1.0.33/libcperciva/alg/sha256.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/alg/sha256.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,95 @@
+#ifndef _SHA256_H_
+#define _SHA256_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/*
+ * Use #defines in order to avoid namespace collisions with anyone else's
+ * SHA256 code (e.g., the code in OpenSSL).
+ */
+#define SHA256_Init libcperciva_SHA256_Init
+#define SHA256_Update libcperciva_SHA256_Update
+#define SHA256_Final libcperciva_SHA256_Final
+#define SHA256_Buf libcperciva_SHA256_Buf
+#define SHA256_CTX libcperciva_SHA256_CTX
+#define HMAC_SHA256_Init libcperciva_HMAC_SHA256_Init
+#define HMAC_SHA256_Update libcperciva_HMAC_SHA256_Update
+#define HMAC_SHA256_Final libcperciva_HMAC_SHA256_Final
+#define HMAC_SHA256_Buf libcperciva_HMAC_SHA256_Buf
+#define HMAC_SHA256_CTX libcperciva_HMAC_SHA256_CTX
+
+/* Context structure for SHA256 operations. */
+typedef struct {
+	uint32_t state[8];
+	uint32_t count[2];
+	uint8_t buf[64];
+} SHA256_CTX;
+
+/**
+ * SHA256_Init(ctx):
+ * Initialize the SHA256 context ${ctx}.
+ */
+void SHA256_Init(SHA256_CTX *);
+
+/**
+ * SHA256_Update(ctx, in, len):
+ * Input ${len} bytes from ${in} into the SHA256 context ${ctx}.
+ */
+void SHA256_Update(SHA256_CTX *, const void *, size_t);
+
+/**
+ * SHA256_Final(digest, ctx):
+ * Output the SHA256 hash of the data input to the context ${ctx} into the
+ * buffer ${digest}.
+ */
+void SHA256_Final(uint8_t[32], SHA256_CTX *);
+
+/**
+ * SHA256_Buf(in, len, digest):
+ * Compute the SHA256 hash of ${len} bytes from $in} and write it to ${digest}.
+ */
+void SHA256_Buf(const void *, size_t, uint8_t[32]);
+
+/* Context structure for HMAC-SHA256 operations. */
+typedef struct {
+	SHA256_CTX ictx;
+	SHA256_CTX octx;
+} HMAC_SHA256_CTX;
+
+/**
+ * HMAC_SHA256_Init(ctx, K, Klen):
+ * Initialize the HMAC-SHA256 context ${ctx} with ${Klen} bytes of key from
+ * ${K}.
+ */
+void HMAC_SHA256_Init(HMAC_SHA256_CTX *, const void *, size_t);
+
+/**
+ * HMAC_SHA256_Update(ctx, in, len):
+ * Input ${len} bytes from ${in} into the HMAC-SHA256 context ${ctx}.
+ */
+void HMAC_SHA256_Update(HMAC_SHA256_CTX *, const void *, size_t);
+
+/**
+ * HMAC_SHA256_Final(digest, ctx):
+ * Output the HMAC-SHA256 of the data input to the context ${ctx} into the
+ * buffer ${digest}.
+ */
+void HMAC_SHA256_Final(uint8_t[32], HMAC_SHA256_CTX *);
+
+/**
+ * HMAC_SHA256_Buf(K, Klen, in, len, digest):
+ * Compute the HMAC-SHA256 of ${len} bytes from ${in} using the key ${K} of
+ * length ${Klen}, and write the result to ${digest}.
+ */
+void HMAC_SHA256_Buf(const void *, size_t, const void *, size_t, uint8_t[32]);
+
+/**
+ * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):
+ * Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and
+ * write the output to buf.  The value dkLen must be at most 32 * (2^32 - 1).
+ */
+void PBKDF2_SHA256(const uint8_t *, size_t, const uint8_t *, size_t,
+    uint64_t, uint8_t *, size_t);
+
+#endif /* !_SHA256_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_aesctr.c tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_aesctr.c
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_aesctr.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_aesctr.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,124 @@
+#include <stdint.h>
+#include <stdlib.h>
+
+#include <openssl/aes.h>
+
+#include "sysendian.h"
+
+#include "crypto_aesctr.h"
+
+struct crypto_aesctr {
+	const AES_KEY * key;
+	uint64_t nonce;
+	uint64_t bytectr;
+	uint8_t buf[16];
+};
+
+/**
+ * crypto_aesctr_init(key, nonce):
+ * Prepare to encrypt/decrypt data with AES in CTR mode, using the provided
+ * expanded key and nonce.  The key provided must remain valid for the
+ * lifetime of the stream.
+ */
+struct crypto_aesctr *
+crypto_aesctr_init(const AES_KEY * key, uint64_t nonce)
+{
+	struct crypto_aesctr * stream;
+
+	/* Allocate memory. */
+	if ((stream = malloc(sizeof(struct crypto_aesctr))) == NULL)
+		goto err0;
+
+	/* Initialize values. */
+	stream->key = key;
+	stream->nonce = nonce;
+	stream->bytectr = 0;
+
+	/* Success! */
+	return (stream);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * crypto_aesctr_stream(stream, inbuf, outbuf, buflen):
+ * Generate the next ${buflen} bytes of the AES-CTR stream and xor them with
+ * bytes from ${inbuf}, writing the result into ${outbuf}.  If the buffers
+ * ${inbuf} and ${outbuf} overlap, they must be identical.
+ */
+void
+crypto_aesctr_stream(struct crypto_aesctr * stream, const uint8_t * inbuf,
+    uint8_t * outbuf, size_t buflen)
+{
+	uint8_t pblk[16];
+	size_t pos;
+	int bytemod;
+
+	for (pos = 0; pos < buflen; pos++) {
+		/* How far through the buffer are we? */
+		bytemod = stream->bytectr % 16;
+
+		/* Generate a block of cipherstream if needed. */
+		if (bytemod == 0) {
+			be64enc(pblk, stream->nonce);
+			be64enc(pblk + 8, stream->bytectr / 16);
+			AES_encrypt(pblk, stream->buf, stream->key);
+		}
+
+		/* Encrypt a byte. */
+		outbuf[pos] = inbuf[pos] ^ stream->buf[bytemod];
+
+		/* Move to the next byte of cipherstream. */
+		stream->bytectr += 1;
+	}
+}
+
+/**
+ * crypto_aesctr_free(stream):
+ * Free the provided stream object.
+ */
+void
+crypto_aesctr_free(struct crypto_aesctr * stream)
+{
+	int i;
+
+	/* Be compatible with free(NULL). */
+	if (stream == NULL)
+		return;
+
+	/* Zero potentially sensitive information. */
+	for (i = 0; i < 16; i++)
+		stream->buf[i] = 0;
+	stream->bytectr = stream->nonce = 0;
+
+	/* Free the stream. */
+	free(stream);
+}
+
+/**
+ * crypto_aesctr_buf(key, nonce, inbuf, outbuf, buflen):
+ * Equivalent to init(key, nonce); stream(inbuf, outbuf, buflen); free.
+ */
+void
+crypto_aesctr_buf(const AES_KEY * key, uint64_t nonce,
+    const uint8_t * inbuf, uint8_t * outbuf, size_t buflen)
+{
+	struct crypto_aesctr stream_rec;
+	struct crypto_aesctr * stream = &stream_rec;
+	int i;
+
+	/* Initialize values. */
+	stream->key = key;
+	stream->nonce = nonce;
+	stream->bytectr = 0;
+
+	/* Perform the encryption. */
+	crypto_aesctr_stream(stream, inbuf, outbuf, buflen);
+
+	/* Zero potentially sensitive information. */
+	for (i = 0; i < 16; i++)
+		stream->buf[i] = 0;
+	stream->bytectr = stream->nonce = 0;
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_aesctr.h tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_aesctr.h
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_aesctr.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_aesctr.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,39 @@
+#ifndef _CRYPTO_AESCTR_H_
+#define _CRYPTO_AESCTR_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include <openssl/aes.h>
+
+/**
+ * crypto_aesctr_init(key, nonce):
+ * Prepare to encrypt/decrypt data with AES in CTR mode, using the provided
+ * expanded key and nonce.  The key provided must remain valid for the
+ * lifetime of the stream.
+ */
+struct crypto_aesctr * crypto_aesctr_init(const AES_KEY *, uint64_t);
+
+/**
+ * crypto_aesctr_stream(stream, inbuf, outbuf, buflen):
+ * Generate the next ${buflen} bytes of the AES-CTR stream and xor them with
+ * bytes from ${inbuf}, writing the result into ${outbuf}.  If the buffers
+ * ${inbuf} and ${outbuf} overlap, they must be identical.
+ */
+void crypto_aesctr_stream(struct crypto_aesctr *, const uint8_t *,
+    uint8_t *, size_t);
+
+/**
+ * crypto_aesctr_free(stream):
+ * Free the provided stream object.
+ */
+void crypto_aesctr_free(struct crypto_aesctr *);
+
+/**
+ * crypto_aesctr_buf(key, nonce, inbuf, outbuf, buflen):
+ * Equivalent to init(key, nonce); stream(inbuf, outbuf, buflen); free.
+ */
+void crypto_aesctr_buf(const AES_KEY *, uint64_t,
+    const uint8_t *, uint8_t *, size_t);
+
+#endif /* !_CRYPTO_AESCTR_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh.c tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh.c
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,293 @@
+#include <stdint.h>
+#include <string.h>
+
+#include <openssl/bn.h>
+#include <openssl/err.h>
+
+#include "warnp.h"
+
+#include "crypto_entropy.h"
+#include "crypto_dh_group14.h"
+
+#include "crypto_dh.h"
+
+static int blinded_modexp(uint8_t r[CRYPTO_DH_PUBLEN], BIGNUM * a,
+    const uint8_t priv[CRYPTO_DH_PRIVLEN]);
+
+/* Big-endian representation of 2^256. */
+static uint8_t two_exp_256[] = {
+	0x01,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00
+};
+
+/**
+ * blinded_modexp(r, a, priv):
+ * Compute ${r} = ${a}^(2^258 + ${priv}), where ${r} and ${priv} are treated
+ * as big-endian integers; and avoid leaking timing data in this process.
+ */
+static int
+blinded_modexp(uint8_t r[CRYPTO_DH_PUBLEN], BIGNUM * a,
+    const uint8_t priv[CRYPTO_DH_PRIVLEN])
+{
+	BIGNUM * two_exp_256_bn;
+	BIGNUM * priv_bn;
+	uint8_t blinding[CRYPTO_DH_PRIVLEN];
+	BIGNUM * blinding_bn;
+	BIGNUM * priv_blinded;
+	BIGNUM * m_bn;
+	BN_CTX * ctx;
+	BIGNUM * r1;
+	BIGNUM * r2;
+	size_t rlen;
+
+	/* Construct 2^256 in BN representation. */
+	if ((two_exp_256_bn = BN_bin2bn(two_exp_256, 33, NULL)) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err0;
+	}
+
+	/* Construct 2^258 + ${priv} in BN representation. */
+	if ((priv_bn = BN_bin2bn(priv, CRYPTO_DH_PRIVLEN, NULL)) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err1;
+	}
+	if ((!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
+	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
+	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn)) ||
+	    (!BN_add(priv_bn, priv_bn, two_exp_256_bn))) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err2;
+	}
+
+	/* Generate blinding exponent. */
+	if (crypto_entropy_read(blinding, CRYPTO_DH_PRIVLEN))
+		goto err2;
+	if ((blinding_bn = BN_bin2bn(blinding,
+	    CRYPTO_DH_PRIVLEN, NULL)) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err2;
+	}
+	if (!BN_add(blinding_bn, blinding_bn, two_exp_256_bn)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err3;
+	}
+
+	/* Generate blinded exponent. */
+	if ((priv_blinded = BN_new()) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err3;
+	}
+	if (!BN_sub(priv_blinded, priv_bn, blinding_bn)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err4;
+	}
+
+	/* Construct group #14 modulus in BN representation. */
+	if ((m_bn = BN_bin2bn(crypto_dh_group14, 256, NULL)) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err4;
+	}
+
+	/* Allocate BN context. */
+	if ((ctx = BN_CTX_new()) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err5;
+	}
+
+	/* Allocate space for storing results of exponentiations. */
+	if ((r1 = BN_new()) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err6;
+	}
+	if ((r2 = BN_new()) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err7;
+	}
+
+	/* Perform modular exponentiations. */
+	if (!BN_mod_exp(r1, a, blinding_bn, m_bn, ctx)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err8;
+	}
+	if (!BN_mod_exp(r2, a, priv_blinded, m_bn, ctx)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err8;
+	}
+
+	/* Compute final result and export to big-endian integer format. */
+	if (!BN_mod_mul(r1, r1, r2, m_bn, ctx)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err8;
+	}
+	rlen = BN_num_bytes(r1);
+	if (rlen > CRYPTO_DH_PUBLEN) {
+		warn0("Exponent result too large!");
+		goto err8;
+	}
+	memset(r, 0, CRYPTO_DH_PUBLEN - rlen);
+	BN_bn2bin(r1, r + CRYPTO_DH_PUBLEN - rlen);
+
+	/* Free space allocated by BN_new. */
+	BN_free(r2);
+	BN_free(r1);
+
+	/* Free context allocated by BN_CTX_new. */
+	BN_CTX_free(ctx);
+
+	/* Free space allocated by BN_bin2bn. */
+	BN_free(m_bn);
+
+	/* Free space allocated by BN_new. */
+	BN_free(priv_blinded);
+
+	/* Free space allocated by BN_bin2bn. */
+	BN_free(blinding_bn);
+	BN_free(priv_bn);
+	BN_free(two_exp_256_bn);
+
+	/* Success! */
+	return (0);
+
+err8:
+	BN_free(r2);
+err7:
+	BN_free(r1);
+err6:
+	BN_CTX_free(ctx);
+err5:
+	BN_free(m_bn);
+err4:
+	BN_free(priv_blinded);
+err3:
+	BN_free(blinding_bn);
+err2:
+	BN_free(priv_bn);
+err1:
+	BN_free(two_exp_256_bn);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * crypto_dh_generate_pub(pub, priv):
+ * Compute ${pub} equal to 2^(2^258 + ${priv}) in Diffie-Hellman group #14.
+ */
+int
+crypto_dh_generate_pub(uint8_t pub[CRYPTO_DH_PUBLEN],
+    const uint8_t priv[CRYPTO_DH_PRIVLEN])
+{
+	BIGNUM * two;
+
+	/* Generate BN representation for 2. */
+	if ((two = BN_new()) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err0;
+	}
+	if (!BN_set_word(two, 2)) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err1;
+	}
+
+	/* Compute pub = two^(2^258 + priv). */
+	if (blinded_modexp(pub, two, priv))
+		goto err1;
+
+	/* Free storage allocated by BN_new. */
+	BN_free(two);
+
+	/* Success! */
+	return (0);
+
+err1:
+	BN_free(two);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * crypto_dh_generate(pub, priv):
+ * Generate a 256-bit private key ${priv}, and compute ${pub} equal to
+ * 2^(2^258 + ${priv}) mod p where p is the Diffie-Hellman group #14 modulus.
+ * Both values are stored as big-endian integers.
+ */
+int
+crypto_dh_generate(uint8_t pub[CRYPTO_DH_PUBLEN],
+    uint8_t priv[CRYPTO_DH_PRIVLEN])
+{
+
+	/* Generate a random private key. */
+	if (crypto_entropy_read(priv, CRYPTO_DH_PRIVLEN))
+		goto err0;
+
+	/* Compute the public key. */
+	if (crypto_dh_generate_pub(pub, priv))
+		goto err0;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * crypto_dh_compute(pub, priv, key):
+ * In the Diffie-Hellman group #14, compute ${pub}^(2^258 + ${priv}) and
+ * write the result into ${key}.  All values are big-endian.  Note that the
+ * value ${pub} is the public key produced the call to crypto_dh_generate
+ * made by the *other* participant in the key exchange.
+ */
+int
+crypto_dh_compute(const uint8_t pub[CRYPTO_DH_PUBLEN],
+    const uint8_t priv[CRYPTO_DH_PRIVLEN], uint8_t key[CRYPTO_DH_KEYLEN])
+{
+	BIGNUM * a;
+
+	/* Convert ${pub} into BN representation. */
+	if ((a = BN_bin2bn(pub, CRYPTO_DH_PUBLEN, NULL)) == NULL) {
+		warn0("%s", ERR_error_string(ERR_get_error(), NULL));
+		goto err0;
+	}
+
+	/* Compute key = pub^(2^258 + priv). */
+	if (blinded_modexp(key, a, priv))
+		goto err1;
+
+	/* Free storage allocated by BN_bin2bn. */
+	BN_free(a);
+
+	/* Success! */
+	return (0);
+
+err1:
+	BN_free(a);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * crypto_dh_sanitycheck(pub):
+ * Sanity-check the Diffie-Hellman public value ${pub} by checking that it
+ * is less than the group #14 modulus.  Return 0 if sane, -1 if insane.
+ */
+int
+crypto_dh_sanitycheck(const uint8_t pub[CRYPTO_DH_PUBLEN])
+{
+
+	if (memcmp(pub, crypto_dh_group14, 256) >= 0)
+		return (-1);
+
+	/* Value is sane. */
+	return (0);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh.h tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh.h
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,43 @@
+#ifndef _CRYPTO_DH_H_
+#define _CRYPTO_DH_H_
+
+#include <stdint.h>
+
+/* Sizes of Diffie-Hellman private, public, and exchanged keys. */
+#define CRYPTO_DH_PRIVLEN	32
+#define CRYPTO_DH_PUBLEN	256
+#define CRYPTO_DH_KEYLEN	256
+
+/**
+ * crypto_dh_generate_pub(pub, priv):
+ * Compute ${pub} equal to 2^(2^258 + ${priv}) in Diffie-Hellman group #14.
+ */
+int crypto_dh_generate_pub(uint8_t[CRYPTO_DH_PUBLEN],
+    const uint8_t[CRYPTO_DH_PRIVLEN]);
+
+/**
+ * crypto_dh_generate(pub, priv):
+ * Generate a 256-bit private key ${priv}, and compute ${pub} equal to
+ * 2^(2^258 + ${priv}) mod p where p is the Diffie-Hellman group #14 modulus.
+ * Both values are stored as big-endian integers.
+ */
+int crypto_dh_generate(uint8_t[CRYPTO_DH_PUBLEN], uint8_t[CRYPTO_DH_PRIVLEN]);
+
+/**
+ * crypto_dh_compute(pub, priv, key):
+ * In the Diffie-Hellman group #14, compute ${pub}^(2^258 + ${priv}) and
+ * write the result into ${key}.  All values are big-endian.  Note that the
+ * value ${pub} is the public key produced the call to crypto_dh_generate
+ * made by the *other* participant in the key exchange.
+ */
+int crypto_dh_compute(const uint8_t[CRYPTO_DH_PUBLEN],
+    const uint8_t[CRYPTO_DH_PRIVLEN], uint8_t[CRYPTO_DH_KEYLEN]);
+
+/**
+ * crypto_dh_sanitycheck(pub):
+ * Sanity-check the Diffie-Hellman public value ${pub} by checking that it
+ * is less than the group #14 modulus.  Return 0 if sane, -1 if insane.
+ */
+int crypto_dh_sanitycheck(const uint8_t[CRYPTO_DH_PUBLEN]);
+
+#endif /* !_CRYPTO_DH_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh_group14.c tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh_group14.c
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh_group14.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh_group14.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,46 @@
+#include <stdint.h>
+
+#include "crypto_dh_group14.h"
+
+/**
+ * This is the big-endian representation of
+ * p = 2^2048 - 2^1984 + 2^64 * floor(2^1918 pi + 124476) - 1
+ * where the value 124476 is chosen to be the least positive integer such
+ * that both p and (p - 1)/2 are prime.  Diffie-Hellman operations are done
+ * in the group of quadratic residues modulo p, and the integer 2 is a
+ * generator of this group.
+ */
+uint8_t crypto_dh_group14[256] = {
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+	0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x34,
+	0xc4, 0xc6, 0x62, 0x8b, 0x80, 0xdc, 0x1c, 0xd1,
+	0x29, 0x02, 0x4e, 0x08, 0x8a, 0x67, 0xcc, 0x74,
+	0x02, 0x0b, 0xbe, 0xa6, 0x3b, 0x13, 0x9b, 0x22,
+	0x51, 0x4a, 0x08, 0x79, 0x8e, 0x34, 0x04, 0xdd,
+	0xef, 0x95, 0x19, 0xb3, 0xcd, 0x3a, 0x43, 0x1b,
+	0x30, 0x2b, 0x0a, 0x6d, 0xf2, 0x5f, 0x14, 0x37,
+	0x4f, 0xe1, 0x35, 0x6d, 0x6d, 0x51, 0xc2, 0x45,
+	0xe4, 0x85, 0xb5, 0x76, 0x62, 0x5e, 0x7e, 0xc6,
+	0xf4, 0x4c, 0x42, 0xe9, 0xa6, 0x37, 0xed, 0x6b,
+	0x0b, 0xff, 0x5c, 0xb6, 0xf4, 0x06, 0xb7, 0xed,
+	0xee, 0x38, 0x6b, 0xfb, 0x5a, 0x89, 0x9f, 0xa5,
+	0xae, 0x9f, 0x24, 0x11, 0x7c, 0x4b, 0x1f, 0xe6,
+	0x49, 0x28, 0x66, 0x51, 0xec, 0xe4, 0x5b, 0x3d,
+	0xc2, 0x00, 0x7c, 0xb8, 0xa1, 0x63, 0xbf, 0x05,
+	0x98, 0xda, 0x48, 0x36, 0x1c, 0x55, 0xd3, 0x9a,
+	0x69, 0x16, 0x3f, 0xa8, 0xfd, 0x24, 0xcf, 0x5f,
+	0x83, 0x65, 0x5d, 0x23, 0xdc, 0xa3, 0xad, 0x96,
+	0x1c, 0x62, 0xf3, 0x56, 0x20, 0x85, 0x52, 0xbb,
+	0x9e, 0xd5, 0x29, 0x07, 0x70, 0x96, 0x96, 0x6d,
+	0x67, 0x0c, 0x35, 0x4e, 0x4a, 0xbc, 0x98, 0x04,
+	0xf1, 0x74, 0x6c, 0x08, 0xca, 0x18, 0x21, 0x7c,
+	0x32, 0x90, 0x5e, 0x46, 0x2e, 0x36, 0xce, 0x3b,
+	0xe3, 0x9e, 0x77, 0x2c, 0x18, 0x0e, 0x86, 0x03,
+	0x9b, 0x27, 0x83, 0xa2, 0xec, 0x07, 0xa2, 0x8f,
+	0xb5, 0xc5, 0x5d, 0xf0, 0x6f, 0x4c, 0x52, 0xc9,
+	0xde, 0x2b, 0xcb, 0xf6, 0x95, 0x58, 0x17, 0x18,
+	0x39, 0x95, 0x49, 0x7c, 0xea, 0x95, 0x6a, 0xe5,
+	0x15, 0xd2, 0x26, 0x18, 0x98, 0xfa, 0x05, 0x10,
+	0x15, 0x72, 0x8e, 0x5a, 0x8a, 0xac, 0xaa, 0x68,
+	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+};
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh_group14.h tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh_group14.h
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_dh_group14.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_dh_group14.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,9 @@
+#ifndef _CRYPTO_DH_GROUP14_H_
+#define _CRYPTO_DH_GROUP14_H_
+
+#include <stdint.h>
+
+/* Diffie-Hellman group #14, from RFC 3526. */
+extern uint8_t crypto_dh_group14[];
+
+#endif /* !_CRYPTO_DH_GROUP14_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_entropy.c tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_entropy.c
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_entropy.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_entropy.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,214 @@
+#include <assert.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "entropy.h"
+
+#include "sha256.h"
+
+#include "crypto_entropy.h"
+
+/**
+ * This system implements the HMAC_DRBG pseudo-random number generator as
+ * specified in section 10.1.2 of the NIST SP 800-90 standard.  In this
+ * implementation, the optional personalization_string and additional_input
+ * specified in the standard are not implemented.
+ */
+
+/* Internal HMAC_DRBG state. */
+static struct {
+	uint8_t Key[32];
+	uint8_t V[32];
+	uint32_t reseed_counter;
+} drbg;
+
+/* Set to non-zero once the PRNG has been instantiated. */
+static int instantiated = 0;
+
+/* Could be as high as 2^48 if we wanted... */
+#define RESEED_INTERVAL	256
+
+/* Limited to 2^16 by specification. */
+#define GENERATE_MAXLEN	65536
+
+static int instantiate(void);
+static void update(uint8_t *, size_t);
+static int reseed(void);
+static void generate(uint8_t *, size_t);
+
+/**
+ * instantiate(void):
+ * Initialize the DRBG state.  (Section 10.1.2.3)
+ */
+static int
+instantiate(void)
+{
+	uint8_t seed_material[48];
+
+	/* Obtain random seed_material = (entropy_input || nonce). */
+	if (entropy_read(seed_material, 48))
+		return (-1);
+
+	/* Initialize Key, V, and reseed_counter. */
+	memset(drbg.Key, 0x00, 32);
+	memset(drbg.V, 0x01, 32);
+	drbg.reseed_counter = 1;
+
+	/* Mix the random seed into the state. */
+	update(seed_material, 48);
+
+	/* Clean the stack. */
+	memset(seed_material, 0, 48);
+
+	/* Success! */
+	return (0);
+}
+
+/**
+ * update(data, datalen):
+ * Update the DRBG state using the provided data.  (Section 10.1.2.2)
+ */
+static void
+update(uint8_t * data, size_t datalen)
+{
+	HMAC_SHA256_CTX ctx;
+	uint8_t K[32];
+	uint8_t Vx[33];
+
+	/* Load (Key, V) into (K, Vx). */
+	memcpy(K, drbg.Key, 32);
+	memcpy(Vx, drbg.V, 32);
+
+	/* K <- HMAC(K, V || 0x00 || data). */
+	Vx[32] = 0x00;
+	HMAC_SHA256_Init(&ctx, K, 32);
+	HMAC_SHA256_Update(&ctx, Vx, 33);
+	HMAC_SHA256_Update(&ctx, data, datalen);
+	HMAC_SHA256_Final(K, &ctx);
+
+	/* V <- HMAC(K, V). */
+	HMAC_SHA256_Buf(K, 32, Vx, 32, Vx);
+
+	/* If the provided data is non-Null, perform another mixing stage. */
+	if (datalen != 0) {
+		/* K <- HMAC(K, V || 0x01 || data). */
+		Vx[32] = 0x01;
+		HMAC_SHA256_Init(&ctx, K, 32);
+		HMAC_SHA256_Update(&ctx, Vx, 33);
+		HMAC_SHA256_Update(&ctx, data, datalen);
+		HMAC_SHA256_Final(K, &ctx);
+
+		/* V <- HMAC(K, V). */
+		HMAC_SHA256_Buf(K, 32, Vx, 32, Vx);
+	}
+
+	/* Copy (K, Vx) back to (Key, V). */
+	memcpy(drbg.Key, K, 32);
+	memcpy(drbg.V, Vx, 32);
+
+	/* Clean the stack. */
+	memset(K, 0, 32);
+	memset(Vx, 0, 33);
+}
+
+/**
+ * reseed(void):
+ * Reseed the DRBG state (mix in new entropy).  (Section 10.1.2.4)
+ */
+static int
+reseed(void)
+{
+	uint8_t seed_material[32];
+
+	/* Obtain random seed_material = entropy_input. */
+	if (entropy_read(seed_material, 32))
+		return (-1);
+
+	/* Mix the random seed into the state. */
+	update(seed_material, 32);
+
+	/* Reset the reseed_counter. */
+	drbg.reseed_counter = 1;
+
+	/* Clean the stack. */
+	memset(seed_material, 0, 32);
+
+	/* Success! */
+	return (0);
+}
+
+/**
+ * generate(buf, buflen):
+ * Fill the provided buffer with random bits, assuming that reseed_counter
+ * is less than RESEED_INTERVAL (the caller is responsible for calling
+ * reseed() as needed) and ${buflen} is less than 2^16 (the caller is
+ * responsible for splitting up larger requests).  (Section 10.1.2.5)
+ */
+static void
+generate(uint8_t * buf, size_t buflen)
+{
+	size_t bufpos;
+
+	assert(buflen <= GENERATE_MAXLEN);
+	assert(drbg.reseed_counter <= RESEED_INTERVAL);
+
+	/* Iterate until we've filled the buffer. */
+	for (bufpos = 0; bufpos < buflen; bufpos += 32) {
+		HMAC_SHA256_Buf(drbg.Key, 32, drbg.V, 32, drbg.V);
+		if (buflen - bufpos >= 32)
+			memcpy(&buf[bufpos], drbg.V, 32);
+		else
+			memcpy(&buf[bufpos], drbg.V, buflen - bufpos);
+	}
+
+	/* Mix up state. */
+	update(NULL, 0);
+
+	/* We're one data-generation step closer to needing a reseed. */
+	drbg.reseed_counter += 1;
+}
+
+/**
+ * crypto_entropy_read(buf, buflen):
+ * Fill the buffer with unpredictable bits.
+ */
+int
+crypto_entropy_read(uint8_t * buf, size_t buflen)
+{
+	size_t bytes_to_provide;
+
+	/* Instantiate if needed. */
+	if (instantiated == 0) {
+		/* Try to instantiate the PRNG. */
+		if (instantiate())
+			return (-1);
+
+		/* We have instantiated the PRNG. */
+		instantiated = 1;
+	}
+
+	/* Loop until we've filled the buffer. */
+	while (buflen > 0) {
+		/* Do we need to reseed? */
+		if (drbg.reseed_counter > RESEED_INTERVAL) {
+			if (reseed())
+				return (-1);
+		}
+
+		/* How much data are we generating in this step? */
+		if (buflen > GENERATE_MAXLEN)
+			bytes_to_provide = GENERATE_MAXLEN;
+		else
+			bytes_to_provide = buflen;
+
+		/* Generate bytes. */
+		generate(buf, bytes_to_provide);
+
+		/* We've done part of the buffer. */
+		buf += bytes_to_provide;
+		buflen -= bytes_to_provide;
+	}
+
+	/* Success! */
+	return (0);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_entropy.h tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_entropy.h
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_entropy.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_entropy.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,14 @@
+#ifndef _CRYPTO_ENTROPY_H_
+#define _CRYPTO_ENTROPY_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * crypto_entropy_read(buf, buflen):
+ * Fill the buffer with unpredictable bits.  The value ${buflen} must be
+ * less than 2^16.
+ */
+int crypto_entropy_read(uint8_t *, size_t);
+
+#endif /* !_CRYPTO_ENTROPY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_verify_bytes.c tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_verify_bytes.c
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_verify_bytes.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_verify_bytes.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,21 @@
+#include <stddef.h>
+#include <stdint.h>
+
+#include "crypto_verify_bytes.h"
+
+/**
+ * crypto_verify_bytes(buf0, buf1, len):
+ * Return zero if and only if buf0[0 .. len - 1] and buf1[0 .. len - 1] are
+ * identical.  Do not leak any information via timing side channels.
+ */
+uint8_t
+crypto_verify_bytes(const uint8_t * buf0, const uint8_t * buf1, size_t len)
+{
+	uint8_t rc = 0;
+	size_t i;
+
+	for (i = 0; i < len; i++)
+		rc = rc | (buf0[i] ^ buf1[i]);
+
+	return (rc);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_verify_bytes.h tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_verify_bytes.h
--- tarsnap-autoconf-1.0.33/libcperciva/crypto/crypto_verify_bytes.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/crypto/crypto_verify_bytes.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,14 @@
+#ifndef _CRYPTO_VERIFY_BYTES_H_
+#define _CRYPTO_VERIFY_BYTES_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * crypto_verify_bytes(buf0, buf1, len):
+ * Return zero if and only if buf0[0 .. len - 1] and buf1[0 .. len - 1] are
+ * identical.  Do not leak any information via timing side channels.
+ */
+uint8_t crypto_verify_bytes(const uint8_t *, const uint8_t *, size_t);
+
+#endif /* !_CRYPTO_VERIFY_BYTES_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/elasticarray.c tarsnap-autoconf-1.0.34/libcperciva/datastruct/elasticarray.c
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/elasticarray.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/elasticarray.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,250 @@
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "elasticarray.h"
+
+struct elasticarray {
+	size_t size;
+	size_t alloc;
+	void * buf;
+};
+
+/**
+ * resize(EA, nsize):
+ * Resize the virtual buffer for ${EA} to length ${nsize} bytes.  The actual
+ * buffer may or may not need to be resized.  On failure, the buffer will be
+ * unmodified.
+ */
+static int
+resize(struct elasticarray * EA, size_t nsize)
+{
+	size_t nalloc;
+	void * nbuf;
+
+	/* Figure out how large an allocation we want. */
+	if (EA->alloc < nsize) {
+		/* We need to enlarge the buffer. */
+		nalloc = EA->alloc * 2;
+		if (nalloc < nsize)
+			nalloc = nsize;
+	} else if (EA->alloc > nsize * 4) {
+		/* We need to shrink the buffer. */
+		nalloc = nsize * 2;
+	} else {
+		nalloc = EA->alloc;
+	}
+
+	/* Reallocate if necessary. */
+	if (nalloc != EA->alloc) {
+		nbuf = realloc(EA->buf, nalloc);
+		if ((nbuf == NULL) && (nalloc > 0))
+			goto err0;
+		EA->buf = nbuf;
+		EA->alloc = nalloc;
+	}
+
+	/* Record the new array size. */
+	EA->size = nsize;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * elasticarray_init(nrec, reclen):
+ * Create and return an elastic array holding ${nrec} (uninitialized) records
+ * of length ${reclen}.  Takes O(nrec * reclen) time.
+ */
+struct elasticarray *
+elasticarray_init(size_t nrec, size_t reclen)
+{
+	struct elasticarray * EA;
+
+	/* Allocate structure. */
+	if ((EA = malloc(sizeof(struct elasticarray))) == NULL)
+		goto err0;
+
+	/* The array is empty for now. */
+	EA->size = EA->alloc = 0;
+	EA->buf = NULL;
+
+	/* Reallocate to the requested length. */
+	if (elasticarray_resize(EA, nrec, reclen))
+		goto err1;
+
+	/* Success! */
+	return (EA);
+
+err1:
+	elasticarray_free(EA);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * elasticarray_resize(EA, nrec, reclen):
+ * Resize the elastic array pointed to by ${EA} to hold ${nrec} records of
+ * length ${reclen}.  If ${nrec} exceeds the number of records previously
+ * held by the array, the additional records will be uninitialized.  Takes
+ * O(nrec * reclen) time.
+ */
+int
+elasticarray_resize(struct elasticarray * EA, size_t nrec, size_t reclen)
+{
+
+	/* Check for overflow. */
+	if (nrec > SIZE_MAX / reclen) {
+		errno = ENOMEM;
+		goto err0;
+	}
+
+	/* Resize the buffer. */
+	if (resize(EA, nrec * reclen))
+		goto err0;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * elasticarray_getsize(EA, reclen):
+ * Return the number of length-${reclen} records in the array, rounding down
+ * if there is a partial record (which can only occur if elasticarray_*
+ * functions have been called with different values of reclen).
+ */
+size_t
+elasticarray_getsize(struct elasticarray * EA, size_t reclen)
+{
+
+	return (EA->size / reclen);
+}
+
+/**
+ * elasticarray_append(EA, buf, nrec, reclen):
+ * Append to the elastic array ${EA} the ${nrec} records of length ${reclen}
+ * stored in ${buf}.  Takes O(nrec * reclen) amortized time.
+ */
+int
+elasticarray_append(struct elasticarray * EA,
+    const void * buf, size_t nrec, size_t reclen)
+{
+	size_t bufpos = EA->size;
+
+	/* Check for overflow. */
+	if ((nrec > SIZE_MAX / reclen) ||
+	    (nrec * reclen > SIZE_MAX - EA->size)) {
+		errno = ENOMEM;
+		goto err0;
+	}
+
+	/* Resize the buffer. */
+	if (resize(EA, EA->size + nrec * reclen))
+		goto err0;
+
+	/* Copy bytes in. */
+	memcpy((void *)((uintptr_t)(EA->buf) + bufpos), buf, nrec * reclen);
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * elasticarray_shrink(EA, nrec, reclen):
+ * Delete the final ${nrec} records of length ${reclen} from the elastic
+ * array ${EA}.  If there are fewer than ${nrec} records, all records
+ * present will be deleted.
+ *
+ * As an exception to the normal rule, an elastic array may occupy more than
+ * 4 times the optimal storage immediately following an elasticarray_shrink
+ * call; but only if realloc(3) failed to shrink a memory allocation.
+ */
+void
+elasticarray_shrink(struct elasticarray * EA, size_t nrec, size_t reclen)
+{
+	size_t nsize;
+
+	/* Figure out how much to keep. */
+	if ((nrec > SIZE_MAX / reclen) ||
+	    (nrec * reclen > EA->size))
+		nsize = 0;
+	else
+		nsize = EA->size - nrec * reclen;
+
+	/* Resize the buffer... */
+	if (resize(EA, nsize)) {
+		/*
+		 * ... and if we fail to reallocate, just record the new
+		 * length and continue using the old buffer.
+		 */
+		EA->size = nsize;
+	}
+}
+
+/**
+ * elasticarray_truncate(EA):
+ * Release any spare space in the elastic array ${EA}.
+ */
+int
+elasticarray_truncate(struct elasticarray * EA)
+{
+	void * nbuf;
+
+	/* If there is spare space, reallocate. */
+	if (EA->alloc > EA->size) {
+		nbuf = realloc(EA->buf, EA->size);
+		if ((nbuf == NULL) && (EA->size > 0))
+			goto err0;
+		EA->buf = nbuf;
+		EA->alloc = EA->size;
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * elasticarray_get(EA, pos, reclen):
+ * Return a pointer to record number ${pos} of length ${reclen} in the
+ * elastic array ${EA}.  Takes O(1) time.
+ */
+void *
+elasticarray_get(struct elasticarray * EA, size_t pos, size_t reclen)
+{
+
+	return ((void *)((uintptr_t)(EA->buf) + pos * reclen));
+}
+
+/**
+ * elasticarray_free(EA):
+ * Free the elastic array ${EA}.  Takes O(1) time.
+ */
+void
+elasticarray_free(struct elasticarray * EA)
+{
+
+	/* Be compatible with free(NULL). */
+	if (EA == NULL)
+		return;
+
+	free(EA->buf);
+	free(EA);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/elasticarray.h tarsnap-autoconf-1.0.34/libcperciva/datastruct/elasticarray.h
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/elasticarray.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/elasticarray.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,153 @@
+#ifndef _ELASTICARRAY_H_
+#define _ELASTICARRAY_H_
+
+#include <stddef.h>
+
+/**
+ * Elastic Arrays are dynamically resizing arrays which remain within a
+ * factor of 4 of the optimal size for the data they contain and have (within
+ * a constant factor) amortized optimal running time providing that all of
+ * the allocated space is accessed at some point.  Functions return NULL or
+ * (int)(-1) on error and set errno; other return types indicate that failure
+ * is not possible.  On error, the array will be unmodified.
+ *
+ * The ELASTICARRAY_DECL(type, prefix, rectype) macro can be used to create a
+ * more friendly interface, at the expense of restricting the array to only
+ * holding a single data type.
+ */
+
+/* Opaque elastic array type. */
+struct elasticarray;
+
+/**
+ * elasticarray_init(nrec, reclen):
+ * Create and return an elastic array holding ${nrec} (uninitialized) records
+ * of length ${reclen}.  Takes O(nrec * reclen) time.
+ */
+struct elasticarray * elasticarray_init(size_t, size_t);
+
+/**
+ * elasticarray_resize(EA, nrec, reclen):
+ * Resize the elastic array pointed to by ${EA} to hold ${nrec} records of
+ * length ${reclen}.  If ${nrec} exceeds the number of records previously
+ * held by the array, the additional records will be uninitialized.  Takes
+ * O(nrec * reclen) time.
+ */
+int elasticarray_resize(struct elasticarray *, size_t, size_t);
+
+/**
+ * elasticarray_getsize(EA, reclen):
+ * Return the number of length-${reclen} records in the array, rounding down
+ * if there is a partial record (which can only occur if elasticarray_*
+ * functions have been called with different values of reclen).  The value
+ * ${reclen} must be positive.
+ */
+size_t elasticarray_getsize(struct elasticarray *, size_t);
+
+/**
+ * elasticarray_append(EA, buf, nrec, reclen):
+ * Append to the elastic array ${EA} the ${nrec} records of length ${reclen}
+ * stored in ${buf}.  Takes O(nrec * reclen) amortized time.
+ */
+int elasticarray_append(struct elasticarray *, const void *, size_t, size_t);
+
+/**
+ * elasticarray_shrink(EA, nrec, reclen):
+ * Delete the final ${nrec} records of length ${reclen} from the elastic
+ * array ${EA}.  If there are fewer than ${nrec} records, all records
+ * present will be deleted.
+ *
+ * As an exception to the normal rule, an elastic array may occupy more than
+ * 4 times the optimal storage immediately following an elasticarray_shrink
+ * call; but only if realloc(3) failed to shrink a memory allocation.
+ */
+void elasticarray_shrink(struct elasticarray *, size_t, size_t);
+
+/**
+ * elasticarray_truncate(EA):
+ * Release any spare space in the elastic array ${EA}.
+ */
+int elasticarray_truncate(struct elasticarray *);
+
+/**
+ * elasticarray_get(EA, pos, reclen):
+ * Return a pointer to record number ${pos} of length ${reclen} in the
+ * elastic array ${EA}.  Takes O(1) time.
+ */
+void * elasticarray_get(struct elasticarray *, size_t, size_t);
+
+/**
+ * elasticarray_free(EA):
+ * Free the elastic array ${EA}.  Takes O(1) time.
+ */
+void elasticarray_free(struct elasticarray *);
+
+/**
+ * ELASTICARRAY_DECL(type, prefix, rectype):
+ * Declare the type ${type} and the following functions:
+ * ${type} ${prefix}_init(size_t nrec);
+ * int ${prefix}_resize(${type} EA, size_t nrec);
+ * size_t ${prefix}_getsize(${type} EA);
+ * int ${prefix}_append(${type} EA, const void * buf, size_t nrec);
+ * void ${prefix}_shrink(${type} EA, size_t nrec);
+ * int ${prefix}_truncate(${type} EA);
+ * ${rectype} * ${prefix}_get(${type} EA, size_t pos);
+ * void ${prefix}_free(${type} EA);
+ */
+#define ELASTICARRAY_DECL(type, prefix, rectype)			\
+	static inline struct prefix##_struct *				\
+	prefix##_init(size_t nrec)					\
+	{								\
+		struct elasticarray * EA;				\
+									\
+		EA = elasticarray_init(nrec, sizeof(rectype));		\
+		return ((struct  prefix##_struct *)EA);			\
+	}								\
+	static inline int						\
+	prefix##_resize(struct prefix##_struct * EA, size_t nrec)	\
+	{								\
+		return (elasticarray_resize((struct elasticarray *)EA,	\
+		    nrec, sizeof(rectype)));				\
+	}								\
+	static inline size_t						\
+	prefix##_getsize(struct prefix##_struct * EA)			\
+	{								\
+		return (elasticarray_getsize((struct elasticarray *)EA,	\
+		    sizeof(rectype)));					\
+	}								\
+	static inline int						\
+	prefix##_append(struct prefix##_struct * EA,			\
+	    const void * buf, size_t nrec)				\
+	{								\
+		return (elasticarray_append((struct elasticarray *)EA,	\
+		    buf, nrec, sizeof(rectype)));			\
+	}								\
+	static inline void						\
+	prefix##_shrink(struct prefix##_struct * EA, size_t nrec)	\
+	{								\
+		elasticarray_shrink((struct elasticarray *)EA,		\
+		    nrec, sizeof(rectype));				\
+	}								\
+	static inline int						\
+	prefix##_truncate(struct prefix##_struct * EA)			\
+	{								\
+		return (elasticarray_truncate(				\
+		    (struct elasticarray *)EA));			\
+	}								\
+	static inline rectype *						\
+	prefix##_get(struct prefix##_struct * EA, size_t pos)		\
+	{								\
+		void * rec;						\
+									\
+		rec = elasticarray_get((struct elasticarray *)EA,	\
+		    pos, sizeof(rectype));				\
+		return ((rectype *)rec);				\
+	}								\
+	static inline void						\
+	prefix##_free(struct prefix##_struct * EA)			\
+	{								\
+		elasticarray_free((struct elasticarray *)EA);		\
+	}								\
+	typedef struct prefix##_struct * type
+
+#endif /* !_ELASTICARRAY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/mpool.h tarsnap-autoconf-1.0.34/libcperciva/datastruct/mpool.h
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/mpool.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/mpool.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,85 @@
+#ifndef _MPOOL_H_
+#define _MPOOL_H_
+
+#include <stdlib.h>
+
+/**
+ * Memory allocator cache.  Memory allocations can be returned to the pool
+ * and reused by a subsequent allocation without returning all the way to
+ * free/malloc.  In effect, this is an optimization for the case where we
+ * know we will want another allocation of the same size soon, at the expense
+ * of allowing the memory to be reused by some other code.
+ */
+
+/**
+ * MPOOL(name, type, size):
+ * Define the functions
+ *
+ * ${type} * mpool_${name}_malloc(void);
+ * void mpool_${name}_free(${type} *);
+ *
+ * which allocate and free structures of type ${type}.  Up to ${size}
+ * such structures are kept cached after _free is called in order to
+ * allow future _malloc calls to be rapidly serviced.
+ *
+ * Cached structures will be freed at program exit time in order to aid
+ * in the detection of memory leaks.
+ */
+#define MPOOL(name, type, size) 				\
+static struct mpool_##name##_struct {				\
+	size_t stacklen;					\
+	void * top;						\
+	int atexit_set;						\
+} mpool_##name##_rec = {0, NULL, 0};				\
+								\
+static void							\
+mpool_##name##_atexit(void)					\
+{								\
+	void * top;						\
+								\
+	while ((top = mpool_##name##_rec.top) != NULL) {	\
+		mpool_##name##_rec.top = *(void **)top;		\
+		free(top);					\
+	}							\
+}								\
+								\
+static inline type *						\
+mpool_##name##_malloc(void)					\
+{								\
+	type * p;						\
+								\
+	if (mpool_##name##_rec.stacklen) {			\
+		p = mpool_##name##_rec.top;			\
+		mpool_##name##_rec.top = *(void **)p;		\
+		mpool_##name##_rec.stacklen -= 1;		\
+	} else {						\
+		if (mpool_##name##_rec.atexit_set == 0) {	\
+			atexit(mpool_##name##_atexit);		\
+			mpool_##name##_rec.atexit_set = 1;	\
+		}						\
+		p = malloc((sizeof(type) > sizeof(void *)) ?	\
+		    sizeof(type) : sizeof(void *));		\
+	}							\
+								\
+	return (p);						\
+}								\
+								\
+static inline void						\
+mpool_##name##_free(type * p)					\
+{								\
+								\
+	if (p == NULL)						\
+		return;						\
+								\
+	if (mpool_##name##_rec.stacklen < size) {		\
+		*(void **)p = mpool_##name##_rec.top;		\
+		mpool_##name##_rec.top = p;			\
+		mpool_##name##_rec.stacklen += 1;		\
+	} else {						\
+		free(p);					\
+	}							\
+}								\
+								\
+struct mpool_##name##_dummy
+
+#endif /* !_MPOOL_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/ptrheap.c tarsnap-autoconf-1.0.34/libcperciva/datastruct/ptrheap.c
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/ptrheap.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/ptrheap.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,334 @@
+#include <stdlib.h>
+
+#include "elasticarray.h"
+
+#include "ptrheap.h"
+
+ELASTICARRAY_DECL(PTRLIST, ptrlist, void *);
+
+struct ptrheap {
+	int (* compar)(void *, const void *, const void *);
+	void (* setreccookie)(void *, void *, size_t);
+	void * cookie;
+	PTRLIST elems;
+	size_t nelems;
+};
+
+/**
+ * swap(elems, i, j, setreccookie, cookie):
+ * Swap elements ${i} and ${j} in ${elems}.  If ${setreccookie} is non-NULL,
+ * invoke ${setreccookie}(${cookie}, elem, pos) for each of the elements and
+ * their new positions in the tree.
+ */
+static void
+swap(PTRLIST elems, size_t i, size_t j,
+    void (* setreccookie)(void *, void *, size_t), void * cookie)
+{
+	void * tmp;
+
+	/* Swap the elements. */
+	tmp = *ptrlist_get(elems, i);
+	*ptrlist_get(elems, i) = *ptrlist_get(elems, j);
+	*ptrlist_get(elems, j) = tmp;
+
+	/* Notify about the moved elements. */
+	if (setreccookie != NULL) {
+		setreccookie(cookie, *ptrlist_get(elems, i), i);
+		setreccookie(cookie, *ptrlist_get(elems, j), j);
+	}
+}
+
+/**
+ * heapifyup(elems, i, compar, setreccookie, cookie):
+ * Sift up element ${i} of the elements ${elems}, using the comparison
+ * function ${compar} and the cookie ${cookie}.  If elements move and
+ * ${setreccookie} is non-NULL, use it to notify about the updated position
+ * of elements in the heap.
+ */
+static void
+heapifyup(PTRLIST elems, size_t i,
+    int (* compar)(void *, const void *, const void *),
+    void (* setreccookie)(void *, void *, size_t), void * cookie)
+{
+
+	/* Iterate up the tree. */
+	do {
+		/* If we're at the root, we have nothing to do. */
+		if (i == 0)
+			break;
+
+		/* If this is >= its parent, we're done. */
+		if (compar(cookie, *ptrlist_get(elems, i),
+		    *ptrlist_get(elems, (i - 1) / 2)) >= 0)
+			break;
+
+		/* Swap with the parent. */
+		swap(elems, i, (i - 1) / 2, setreccookie, cookie);
+
+		/* Move up the tree. */
+		i = (i - 1) / 2;
+	} while (1);
+}
+
+/**
+ * heapify(elems, i, N, compar, setreccookie, cookie):
+ * Sift down element number ${i} out of ${N} of the elements ${elems}, using
+ * the comparison function ${compar} and the cookie ${cookie}.  If elements
+ * move and ${setreccookie} is non-NULL, use it to notify about the updated
+ * position of elements in the heap.
+ */
+static void
+heapify(PTRLIST elems, size_t i, size_t N,
+    int (* compar)(void *, const void *, const void *),
+    void (* setreccookie)(void *, void *, size_t), void * cookie)
+{
+	size_t min;
+
+	/* Iterate down the tree. */
+	do {
+		/* Look for the minimum element out of {i, 2i+1, 2i+2}. */
+		min = i;
+
+		/* Is this bigger than element 2i+1? */
+		if ((2 * i + 1 < N) &&
+		    (compar(cookie, *ptrlist_get(elems, min),
+			*ptrlist_get(elems, 2 * i + 1)) > 0))
+			min = 2 * i + 1;
+
+		/* Is this bigger than element 2i+2? */
+		if ((2 * i + 2 < N) &&
+		    (compar(cookie, *ptrlist_get(elems, min),
+			*ptrlist_get(elems, 2 * i + 2)) > 0))
+			min = 2 * i + 2;
+
+		/* If the minimum is i, we have heap-property. */
+		if (min == i)
+			break;
+
+		/* Move the minimum into position i. */
+		swap(elems, min, i, setreccookie, cookie);
+
+		/* Move down the tree. */
+		i = min;
+	} while (1);
+}
+
+/**
+ * ptrheap_init(compar, setreccookie, cookie):
+ * Create and return an empty heap.  The function ${compar}(${cookie}, x, y)
+ * should return less than, equal to, or greater than 0 depending on whether
+ * x is less than, equal to, or greater than y; and if ${setreccookie} is
+ * non-zero it will be called as ${setreccookie}(${cookie}, ${ptr}, ${rc}) to
+ * indicate that the value ${rc} is the current record cookie for the pointer
+ * ${ptr}.  The function ${setreccookie} may not make any ptrheap_* calls.
+ */
+struct ptrheap *
+ptrheap_init(int (* compar)(void *, const void *, const void *),
+    void (* setreccookie)(void *, void *, size_t), void * cookie)
+{
+
+	/* Let ptrheap_create handle this. */
+	return (ptrheap_create(compar, setreccookie, cookie, 0, NULL));
+}
+
+/**
+ * ptrheap_create(compar, setreccookie, cookie, N, ptrs):
+ * Create and return a heap, as in ptrheap_init, but with the ${N} pointers
+ * in ${ptrs} as heap elements.  This is faster than creating an empty heap
+ * and adding the elements individually.
+ */
+struct ptrheap *
+ptrheap_create(int (* compar)(void *, const void *, const void *),
+    void (* setreccookie)(void *, void *, size_t), void * cookie,
+    size_t N, void ** ptrs)
+{
+	struct ptrheap * H;
+	size_t i;
+
+	/* Allocate structure. */
+	if ((H = malloc(sizeof(struct ptrheap))) == NULL)
+		goto err0;
+
+	/* Store parameters. */
+	H->compar = compar;
+	H->setreccookie = setreccookie;
+	H->cookie = cookie;
+
+	/* We will have N elements. */
+	H->nelems = N;
+
+	/* Allocate space for N heap elements. */
+	if ((H->elems = ptrlist_init(N)) == NULL)
+		goto err1;
+
+	/* Copy the heap elements in. */
+	for (i = 0; i < N; i++)
+		*ptrlist_get(H->elems, i) = ptrs[i];
+
+	/* Turn this into a heap. */
+	for (i = N - 1; i < N; i--)
+		heapify(H->elems, i, N, H->compar, NULL, H->cookie);
+
+	/* Advise the caller about the record cookies. */
+	if (H->setreccookie != NULL)
+		for (i = 0; i < N; i++)
+			(H->setreccookie)(H->cookie,
+			    *ptrlist_get(H->elems, i), i);
+
+	/* Success! */
+	return (H);
+
+err1:
+	free(H);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * ptrheap_add(H, ptr):
+ * Add the pointer ${ptr} to the heap ${H}.
+ */
+int
+ptrheap_add(struct ptrheap * H, void * ptr)
+{
+
+	/* Add the element to the end of the heap. */
+	if (ptrlist_append(H->elems, &ptr, 1))
+		goto err0;
+	H->nelems += 1;
+
+	/* Advise the caller about the current location of this record. */
+	if (H->setreccookie != NULL)
+		(H->setreccookie)(H->cookie, ptr, H->nelems - 1);
+
+	/* Move the new element up in the tree if necessary. */
+	heapifyup(H->elems, H->nelems - 1,
+	    H->compar, H->setreccookie, H->cookie);
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * ptrheap_getmin(H):
+ * Return the minimum pointer in the heap ${H}.  If the heap is empty, NULL
+ * is returned.
+ */
+void *
+ptrheap_getmin(struct ptrheap * H)
+{
+
+	/* If we have any elements, the minimum is in position 0. */
+	if (H->nelems)
+		return (*ptrlist_get(H->elems, 0));
+	else
+		return (NULL);
+}
+
+/**
+ * ptrheap_delete(H, rc):
+ * Delete from the heap ${H} the element ptr for which the function call
+ * setreccookie(cookie, ptr, ${rc}) was most recently made.
+ */
+void
+ptrheap_delete(struct ptrheap * H, size_t rc)
+{
+
+	/*
+	 * If the element we're deleting is not at the end of the heap,
+	 * replace it with the element which is currently at the end.
+	 */
+	if (rc != H->nelems - 1) {
+		/* Move ptr from position H->nelems - 1 into position rc. */
+		*ptrlist_get(H->elems, rc) =
+		    *ptrlist_get(H->elems, H->nelems - 1);
+		if (H->setreccookie != NULL)
+			(H->setreccookie)(H->cookie,
+			    *ptrlist_get(H->elems, rc), rc);
+
+		/* Is this too small to be in position ${rc}? */
+		if ((rc > 0) &&
+		    (H->compar(H->cookie, *ptrlist_get(H->elems, rc),
+			*ptrlist_get(H->elems, (rc - 1) / 2)) < 0)) {
+			/* Swap with the parent, and keep moving up. */
+			swap(H->elems, rc, (rc - 1) / 2,
+			    H->setreccookie, H->cookie);
+			heapifyup(H->elems, (rc - 1) / 2,
+			    H->compar, H->setreccookie, H->cookie);
+		} else {
+			/* Maybe we need to move it down instead? */
+			heapify(H->elems, rc, H->nelems,
+			    H->compar, H->setreccookie, H->cookie);
+		}
+	}
+
+	/*
+	 * We've got everything we want to keep in positions 0 .. nelems - 2,
+	 * and we have heap-nature, so all we need to do is strip off the
+	 * final pointer.
+	 */
+	ptrlist_shrink(H->elems, 1);
+	H->nelems--;
+}
+
+/**
+ * ptrheap_deletemin(H):
+ * Delete the minimum element in the heap ${H}.
+ */
+void
+ptrheap_deletemin(struct ptrheap * H)
+{
+
+	/* Let ptrheap_delete handle this. */
+	ptrheap_delete(H, 0);
+}
+
+/**
+ * ptrheap_increase(H, rc):
+ * Adjust the heap ${H} to account for the fact that the element ptr for
+ * which the function call setreccookie(cookie, ptr, ${rc}) was most recently
+ * made has incrased.
+ */
+void
+ptrheap_increase(struct ptrheap * H, size_t rc)
+{
+
+	/* Move the element down if necessary. */
+	heapify(H->elems, rc, H->nelems,
+	    H->compar, H->setreccookie, H->cookie);
+}
+
+/**
+ * ptrheap_increasemin(H):
+ * Adjust the heap ${H} to account for the fact that the (formerly) minimum
+ * element has increased.
+ */
+void
+ptrheap_increasemin(struct ptrheap * H)
+{
+
+	/* Move the element down if necessary. */
+	heapify(H->elems, 0, H->nelems,
+	    H->compar, H->setreccookie, H->cookie);
+}
+
+/**
+ * ptrheap_free(H):
+ * Free the pointer heap ${H}.
+ */
+void
+ptrheap_free(struct ptrheap * H)
+{
+
+	/* Be compatible with free(NULL). */
+	if (H == NULL)
+		return;
+
+	ptrlist_free(H->elems);
+	free(H);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/ptrheap.h tarsnap-autoconf-1.0.34/libcperciva/datastruct/ptrheap.h
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/ptrheap.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/ptrheap.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,88 @@
+#ifndef _PTRHEAP_H_
+#define _PTRHEAP_H_
+
+#include <stddef.h>
+
+/**
+ * Pointer-heap data structure.  Arbitrary pointers can be inserted and are
+ * compared using a provided callback; the usual heapy getmin / increasemin /
+ * deletemin algorithms are supported.  In addition, a setreccookie callback
+ * can also be provided, in which case the most recent cookie provided for a
+ * heap element can be used to delete or increase that element.  Functions
+ * return NULL or (int)(-1) on error and set errno; other return types
+ * indicate that failure is not possible.  On error, the heap will be
+ * unmodified.
+ */
+
+/* Opaque pointer-heap type. */
+struct ptrheap;
+
+/**
+ * ptrheap_init(compar, setreccookie, cookie):
+ * Create and return an empty heap.  The function ${compar}(${cookie}, x, y)
+ * should return less than, equal to, or greater than 0 depending on whether
+ * x is less than, equal to, or greater than y; and if ${setreccookie} is
+ * non-zero it will be called as ${setreccookie}(${cookie}, ${ptr}, ${rc}) to
+ * indicate that the value ${rc} is the current record cookie for the pointer
+ * ${ptr}.  The function ${setreccookie} may not make any ptrheap_* calls.
+ */
+struct ptrheap * ptrheap_init(int (*)(void *, const void *, const void *),
+    void (*)(void *, void *, size_t), void *);
+
+/**
+ * ptrheap_create(compar, setreccookie, cookie, N, ptrs):
+ * Create and return a heap, as in ptrheap_init, but with the ${N} pointers
+ * in ${ptrs} as heap elements.  This is faster than creating an empty heap
+ * and adding the elements individually.
+ */
+struct ptrheap * ptrheap_create(int (*)(void *, const void *, const void *),
+    void (*)(void *, void *, size_t), void *, size_t, void **);
+
+/**
+ * ptrheap_add(H, ptr):
+ * Add the pointer ${ptr} to the heap ${H}.
+ */
+int ptrheap_add(struct ptrheap *, void *);
+
+/**
+ * ptrheap_getmin(H):
+ * Return the minimum pointer in the heap ${H}.  If the heap is empty, NULL
+ * is returned.
+ */
+void * ptrheap_getmin(struct ptrheap *);
+
+/**
+ * ptrheap_delete(H, rc):
+ * Delete from the heap ${H} the element ptr for which the function call
+ * setreccookie(cookie, ptr, ${rc}) was most recently made.
+ */
+void ptrheap_delete(struct ptrheap *, size_t);
+
+/**
+ * ptrheap_deletemin(H):
+ * Delete the minimum element in the heap ${H}.
+ */
+void ptrheap_deletemin(struct ptrheap *);
+
+/**
+ * ptrheap_increase(H, rc):
+ * Adjust the heap ${H} to account for the fact that the element ptr for
+ * which the function call setreccookie(cookie, ptr, ${rc}) was most recently
+ * made has incrased.
+ */
+void ptrheap_increase(struct ptrheap *, size_t);
+
+/**
+ * ptrheap_increasemin(H):
+ * Adjust the heap ${H} to account for the fact that the (formerly) minimum
+ * element has increased.
+ */
+void ptrheap_increasemin(struct ptrheap *);
+
+/**
+ * ptrheap_free(H):
+ * Free the pointer heap ${H}.
+ */
+void ptrheap_free(struct ptrheap *);
+
+#endif /* !_PTRHEAP_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/timerqueue.c tarsnap-autoconf-1.0.34/libcperciva/datastruct/timerqueue.c
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/timerqueue.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/timerqueue.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,241 @@
+#include <sys/time.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "ptrheap.h"
+
+#include "timerqueue.h"
+
+struct timerqueue {
+	struct ptrheap * H;
+};
+
+struct timerrec {
+	struct timeval tv;
+	size_t rc;
+	void * ptr;
+};
+
+/* Compare two timevals. */
+static int
+tvcmp(const struct timeval * x, const struct timeval * y)
+{
+
+	/* Does one have more seconds? */
+	if (x->tv_sec > y->tv_sec)
+		return (1);
+	if (x->tv_sec < y->tv_sec)
+		return (-1);
+
+	/* Does one have more microseconds? */
+	if (x->tv_usec > y->tv_usec)
+		return (1);
+	if (x->tv_usec < y->tv_usec)
+		return (-1);
+
+	/* They must be equal. */
+	return (0);
+}
+
+/* Record-comparison callback from ptrheap. */
+static int
+compar(void * cookie, const void * x, const void * y)
+{
+	const struct timerrec *_x = x;
+	const struct timerrec *_y = y;
+
+	(void)cookie; /* UNUSED */
+
+	return (tvcmp(&_x->tv, &_y->tv));
+}
+
+/* Cookie-recording callback from ptrheap. */
+static void
+setreccookie(void * cookie, void * ptr, size_t rc)
+{
+	struct timerrec * rec = ptr;
+
+	(void)cookie; /* UNUSED */
+
+	rec->rc = rc;
+}
+
+/**
+ * timerqueue_init(void):
+ * Create and return an empty timer priority queue.
+ */
+struct timerqueue *
+timerqueue_init(void)
+{
+	struct timerqueue * Q;
+
+	/* Allocate structure. */
+	if ((Q = malloc(sizeof(struct timerqueue))) == NULL)
+		goto err0;
+
+	/* Allocate heap. */
+	if ((Q->H = ptrheap_init(compar, setreccookie, Q)) == NULL)
+		goto err1;
+
+	/* Success! */
+	return (Q);
+
+err1:
+	free(Q);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * timerqueue_add(Q, tv, ptr):
+ * Add the pair (${tv}, ${ptr}) to the priority queue ${Q}.  Returns a cookie
+ * which can be passed to timerqueue_delete or timerqueue_increase.
+ */
+void *
+timerqueue_add(struct timerqueue * Q, const struct timeval * tv, void * ptr)
+{
+	struct timerrec * r;
+
+	/* Allocate (timeval, ptr) pair record. */
+	if ((r = malloc(sizeof(struct timerrec))) == NULL)
+		goto err0;
+
+	/* Fill in values. */
+	memcpy(&r->tv, tv, sizeof(struct timeval));
+	r->ptr = ptr;
+
+	/*
+	 * Add the record to the heap.  The value r->rc will be filled in
+	 * by setreccookie which will be called by ptrheap_add.
+	 */
+	if (ptrheap_add(Q->H, r))
+		goto err1;
+
+	/* Success! */
+	return (r);
+
+err1:
+	free(r);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * timerqueue_delete(Q, cookie):
+ * Delete the (timeval, ptr) pair associated with the cookie ${cookie} from
+ * the priority queue ${Q}.
+ */
+void
+timerqueue_delete(struct timerqueue * Q, void * cookie)
+{
+	struct timerrec * r = cookie;
+
+	/* Remove the record from the heap. */
+	ptrheap_delete(Q->H, r->rc);
+
+	/* Free the record. */
+	free(r);
+}
+
+/**
+ * timerqueue_increase(Q, cookie, tv):
+ * Increase the timer associated with the cookie ${cookie} in the priority
+ * queue ${Q} to ${tv}.
+ */
+void
+timerqueue_increase(struct timerqueue * Q, void * cookie,
+    const struct timeval * tv)
+{
+	struct timerrec * r = cookie;
+
+	/* Adjust timer value. */
+	memcpy(&r->tv, tv, sizeof(struct timeval));
+
+	/* Inform the heap that the record value has increased. */
+	ptrheap_increase(Q->H, r->rc);
+}
+
+/**
+ * timerqueue_getmin(Q):
+ * Return a pointer to the least timeval in ${Q}, or NULL if the priority
+ * queue is empty.  The pointer will remain valid until the next call to a
+ * timerqueue_* function.  This function cannot fail.
+ */
+const struct timeval *
+timerqueue_getmin(struct timerqueue * Q)
+{
+	struct timerrec * r;
+
+	/* Get the minimum element from the heap. */
+	r = ptrheap_getmin(Q->H);
+
+	/* If we have an element, return its timeval; otherwise, NULL. */
+	if (r != NULL)
+		return (&r->tv);
+	else
+		return (NULL);
+}
+
+/**
+ * timerqueue_getptr(Q, tv):
+ * If the least timeval in ${Q} is less than or equal to ${tv}, return the
+ * associated pointer and remove the pair from the priority queue.  If not,
+ * return NULL.
+ */
+void *
+timerqueue_getptr(struct timerqueue * Q, const struct timeval * tv)
+{
+	struct timerrec * r;
+	void * ptr;
+
+	/*
+	 * Get the minimum element from the heap.  Return NULL if the heap
+	 * has no minimum element (i.e., is empty).
+	 */
+	if ((r = ptrheap_getmin(Q->H)) == NULL)
+		return (NULL);
+
+	/* If the minimum timeval is greater than ${tv}, return NULL. */
+	if (tvcmp(&r->tv, tv) > 0)
+		return (NULL);
+
+	/* Remove this record from the heap. */
+	ptrheap_deletemin(Q->H);
+
+	/* Extract its pointer. */
+	ptr = r->ptr;
+
+	/* Free the record. */
+	free(r);
+
+	/*
+	 * And finally return the pointer which was associated with the
+	 * (formerly) minimum timeval in the heap.
+	 */
+	return (ptr);
+}
+
+/**
+ * timerqueue_free(Q):
+ * Free the timer priority queue ${Q}.
+ */
+void
+timerqueue_free(struct timerqueue * Q)
+{
+	struct timerrec * r;
+
+	/* Extract elements from the heap and free them one by one. */
+	while ((r = ptrheap_getmin(Q->H)) != NULL) {
+		free(r);
+		ptrheap_deletemin(Q->H);
+	}
+
+	/* Free the heap. */
+	ptrheap_free(Q->H);
+
+	/* Free the timer priority queue structure. */
+	free(Q);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/datastruct/timerqueue.h tarsnap-autoconf-1.0.34/libcperciva/datastruct/timerqueue.h
--- tarsnap-autoconf-1.0.33/libcperciva/datastruct/timerqueue.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/datastruct/timerqueue.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,60 @@
+#ifndef _TIMERQUEUE_H_
+#define _TIMERQUEUE_H_
+
+#include <sys/time.h>
+
+/* Timer priority queue.  Contains (timeval, ptr) pairs. */
+
+/* Opaque timer priority queue type. */
+struct timerqueue;
+
+/**
+ * timerqueue_init(void):
+ * Create and return an empty timer priority queue.
+ */
+struct timerqueue * timerqueue_init(void);
+
+/**
+ * timerqueue_add(Q, tv, ptr):
+ * Add the pair (${tv}, ${ptr}) to the priority queue ${Q}.  Returns a cookie
+ * which can be passed to timerqueue_delete or timerqueue_increase.
+ */
+void * timerqueue_add(struct timerqueue *, const struct timeval *, void *);
+
+/**
+ * timerqueue_delete(Q, cookie):
+ * Delete the (timeval, ptr) pair associated with the cookie ${cookie} from
+ * the priority queue ${Q}.
+ */
+void timerqueue_delete(struct timerqueue *, void *);
+
+/**
+ * timerqueue_increase(Q, cookie, tv):
+ * Increase the timer associated with the cookie ${cookie} in the priority
+ * queue ${Q} to ${tv}.
+ */
+void timerqueue_increase(struct timerqueue *, void *, const struct timeval *);
+
+/**
+ * timerqueue_getmin(Q):
+ * Return a pointer to the least timeval in ${Q}, or NULL if the priority
+ * queue is empty.  The pointer will remain valid until the next call to a
+ * timerqueue_* function.  This function cannot fail.
+ */
+const struct timeval * timerqueue_getmin(struct timerqueue *);
+
+/**
+ * timerqueue_getptr(Q, tv):
+ * If the least timeval in ${Q} is less than or equal to ${tv}, return the
+ * associated pointer and remove the pair from the priority queue.  If not,
+ * return NULL.  This function cannot fail.
+ */
+void * timerqueue_getptr(struct timerqueue *, const struct timeval *);
+
+/**
+ * timerqueue_free(Q):
+ * Free the timer priority queue ${Q}.
+ */
+void timerqueue_free(struct timerqueue *);
+
+#endif /* !_TIMERQUEUE_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events.c tarsnap-autoconf-1.0.34/libcperciva/events/events.c
--- tarsnap-autoconf-1.0.33/libcperciva/events/events.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,200 @@
+#include <sys/time.h>
+
+#include <stdlib.h>
+
+#include "mpool.h"
+
+#include "events_internal.h"
+#include "events.h"
+
+/* Event structure. */
+struct eventrec {
+	int (*func)(void *);
+	void * cookie;
+};
+
+MPOOL(eventrec, struct eventrec, 4096);
+
+/* Zero timeval, for use with non-blocking event runs. */
+struct timeval tv_zero = {0, 0};
+
+/**
+ * events_mkrec(func, cookie):
+ * Package ${func}, ${cookie} into a struct eventrec.
+ */
+struct eventrec *
+events_mkrec(int (*func)(void *), void * cookie)
+{
+	struct eventrec * r;
+
+	/* Allocate structure. */
+	if ((r = mpool_eventrec_malloc()) == NULL)
+		goto err0;
+
+	/* Initialize. */
+	r->func = func;
+	r->cookie = cookie;
+
+	/* Success! */
+	return (r);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * events_freerec(r):
+ * Free the eventrec ${r}.
+ */
+void
+events_freerec(struct eventrec * r)
+{
+
+	mpool_eventrec_free(r);
+}
+
+/* Do an event.  This makes events_run cleaner. */
+static inline int
+doevent(struct eventrec * r)
+{
+	int rc;
+
+	/* Invoke the callback. */
+	rc = (r->func)(r->cookie);
+
+	/* Free the event record. */
+	mpool_eventrec_free(r);
+
+	/* Return the status code from the callback. */
+	return (rc);
+}
+
+/**
+ * events_run(void):
+ * Run events.  Events registered via events_immediate_register will be run
+ * first, in order of increasing ${prio} values; then events associated with
+ * ready sockets registered via events_network_register; finally, events
+ * associated with expired timers registered via events_timer_register will
+ * be run.  If any event function returns a non-zero result, no further
+ * events will be run and said non-zero result will be returned; on error,
+ * -1 will be returned.
+ */
+int
+events_run(void)
+{
+	struct eventrec * r;
+	struct timeval * tv;
+	int rc = 0;
+
+	/* If we have any immediate events, process them and return. */
+	if ((r = events_immediate_get()) != NULL) {
+		while (r != NULL) {
+			/* Process the event. */
+			if ((rc = doevent(r)) != 0)
+				goto done;
+
+			/* Get the next event. */
+			r = events_immediate_get();
+		}
+
+		/* We've processed at least one event; time to return. */
+		goto done;
+	}
+
+	/*
+	 * Figure out the maximum duration to block, and wait up to that
+	 * duration for network events to become available.
+	 */
+	if (events_timer_min(&tv))
+		goto err0;
+	if (events_network_select(tv))
+		goto err1;
+	free(tv);
+
+	/*
+	 * Check for available immediate events, network events, and timer
+	 * events, in that order of priority; exit only when no more events
+	 * are available.
+	 */
+	do {
+		/* Run an immediate event, if one is available. */
+		if ((r = events_immediate_get()) != NULL) {
+			if ((rc = doevent(r)) != 0)
+				goto done;
+			continue;
+		}
+
+		/* Run a network event, if one is available. */
+		if ((r = events_network_get()) != NULL) {
+			if ((rc = doevent(r)) != 0)
+				goto done;
+			continue;
+		}
+
+		/* Check if any new network events are available. */
+		if (events_network_select(&tv_zero))
+			goto err0;
+		if ((r = events_network_get()) != NULL) {
+			if ((rc = doevent(r)) != 0)
+				goto done;
+			continue;
+		}
+
+		/* Run a timer event, if one is available. */
+		if (events_timer_get(&r))
+			goto err0;
+		if (r != NULL) {
+			if ((rc = doevent(r)) != 0)
+				goto done;
+			continue;
+		}
+
+		/* No events available. */
+		break;
+	} while (1);
+
+done:
+	/* Success! */
+	return (rc);
+
+err1:
+	free(tv);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_spin(done):
+ * Run events until ${done} is non-zero (and return 0), an error occurs (and
+ * return -1), or a callback returns a non-zero status (and return the status
+ * code from the callback).
+ */
+int
+events_spin(int * done)
+{
+	int rc = 0;
+
+	/* Loop until we're done or have a non-zero status. */
+	while ((done[0] == 0) && (rc == 0)) {
+		/* Run events. */
+		rc = events_run();
+	}
+
+	/* Return status code. */
+	return (rc);
+}
+
+/**
+ * events_shutdown(void):
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void
+events_shutdown(void)
+{
+
+	events_network_shutdown();
+	events_timer_shutdown();
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events.h tarsnap-autoconf-1.0.34/libcperciva/events/events.h
--- tarsnap-autoconf-1.0.33/libcperciva/events/events.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,106 @@
+#ifndef _EVENTS_H_
+#define _EVENTS_H_
+
+#include <sys/select.h>
+
+/**
+ * events_immediate_register(func, cookie, prio):
+ * Register ${func}(${cookie}) to be run the next time events_run is invoked,
+ * after immediate events with smaller ${prio} values and before events with
+ * larger ${prio} values.  The value ${prio} must be in the range [0, 31].
+ * Return a cookie which can be passed to events_immediate_cancel.
+ */
+void * events_immediate_register(int (*)(void *), void *, int);
+
+/**
+ * events_immediate_cancel(cookie):
+ * Cancel the immediate event for which the cookie ${cookie} was returned by
+ * events_immediate_register.
+ */
+void events_immediate_cancel(void *);
+
+/* "op" parameter to events_network_register. */
+#define EVENTS_NETWORK_OP_READ 	0
+#define EVENTS_NETWORK_OP_WRITE	1
+
+/**
+ * events_network_register(func, cookie, s, op):
+ * Register ${func}(${cookie}) to be run when socket ${s} is ready for
+ * reading or writing depending on whether ${op} is EVENTS_NETWORK_OP_READ or
+ * EVENTS_NETWORK_OP_WRITE.  If there is already an event registration for
+ * this ${s}/${op} pair, errno will be set to EEXIST and the function will
+ * fail.
+ */
+int events_network_register(int (*)(void *), void *, int, int);
+
+/**
+ * events_network_cancel(s, op):
+ * Cancel the event registered for the socket/operation pair ${s}/${op}.  If
+ * there is no such registration, errno will be set to ENOENT and the
+ * function will fail.
+ */
+int events_network_cancel(int, int);
+
+/**
+ * events_network_selectstats(N, mu, va, max):
+ * Return statistics on the inter-select durations since the last time this
+ * function was called.
+ */
+void events_network_selectstats(double *, double *, double *, double *);
+
+/**
+ * events_timer_register(func, cookie, timeo):
+ * Register ${func}(${cookie}) to be run ${timeo} in the future.  Return a
+ * cookie which can be passed to events_timer_cancel or events_timer_reset.
+ */
+void * events_timer_register(int (*)(void *), void *, const struct timeval *);
+
+/**
+ * events_timer_register_double(func, cookie, timeo):
+ * As events_timer_register, but ${timeo} is a double-precision floating point
+ * value specifying a number of seconds.
+ */
+void * events_timer_register_double(int (*)(void *), void *, double);
+
+/**
+ * events_timer_cancel(cookie):
+ * Cancel the timer for which the cookie ${cookie} was returned by
+ * events_timer_register.
+ */
+void events_timer_cancel(void *);
+
+/**
+ * events_timer_reset(cookie):
+ * Reset the timer for which the cookie ${cookie} was returned by
+ * events_timer_register to its initial value.
+ */
+int events_timer_reset(void *);
+
+/**
+ * events_run(void):
+ * Run events.  Events registered via events_immediate_register will be run
+ * first, in order of increasing ${prio} values; then events associated with
+ * ready sockets registered via events_network_register; finally, events
+ * associated with expired timers registered via events_timer_register will
+ * be run.  If any event function returns a non-zero result, no further
+ * events will be run and said non-zero result will be returned; on error,
+ * -1 will be returned.
+ */
+int events_run(void);
+
+/**
+ * events_spin(done):
+ * Run events until ${done} is non-zero (and return 0), an error occurs (and
+ * return -1), or a callback returns a non-zero status (and return the status
+ * code from the callback).
+ */
+int events_spin(int *);
+
+/**
+ * events_shutdown(void):
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void events_shutdown(void);
+
+#endif /* !_EVENTS_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events_immediate.c tarsnap-autoconf-1.0.34/libcperciva/events/events_immediate.c
--- tarsnap-autoconf-1.0.33/libcperciva/events/events_immediate.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events_immediate.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,153 @@
+#include <assert.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include "mpool.h"
+
+#include "events_internal.h"
+#include "events.h"
+
+struct eventq {
+	struct eventrec * r;
+	struct eventq * next;
+	struct eventq * prev;
+	int prio;
+};
+
+MPOOL(eventq, struct eventq, 4096);
+
+/* First nodes in the linked lists. */
+static struct eventq * heads[32] = {
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
+};
+
+/* For non-NULL heads[i], tails[i] is the last node in the list. */
+static struct eventq * tails[32];
+
+/* For i < minq, heads[i] == NULL. */
+static int minq = 0;
+
+/**
+ * events_immediate_register(func, cookie, prio):
+ * Register ${func}(${cookie}) to be run the next time events_run is invoked,
+ * after immediate events with smaller ${prio} values and before events with
+ * larger ${prio} values.  The value ${prio} must be in the range [0, 31].
+ * Return a cookie which can be passed to events_immediate_cancel.
+ */
+void *
+events_immediate_register(int (*func)(void *), void * cookie, int prio)
+{
+	struct eventrec * r;
+	struct eventq * q;
+
+	/* Sanity check. */
+	assert((prio >= 0) && (prio < 32));
+
+	/* Bundle into an eventrec record. */
+	if ((r = events_mkrec(func, cookie)) == NULL)
+		goto err0;
+
+	/* Create a linked list node. */
+	if ((q = mpool_eventq_malloc()) == NULL)
+		goto err1;
+	q->r = r;
+	q->next = NULL;
+	q->prev = NULL;
+	q->prio = prio;
+
+	/* Add to the queue. */
+	if (heads[prio] == NULL) {
+		heads[prio] = q;
+		if (prio < minq)
+			minq = prio;
+	} else {
+		tails[prio]->next = q;
+		q->prev = tails[prio];
+	}
+	tails[prio] = q;
+
+	/* Success! */
+	return (q);
+
+err1:
+	events_freerec(r);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * events_immediate_cancel(cookie):
+ * Cancel the immediate event for which the cookie ${cookie} was returned by
+ * events_immediate_register.
+ */
+void
+events_immediate_cancel(void * cookie)
+{
+	struct eventq * q = cookie;
+	int prio = q->prio;
+
+	/* If we have a predecessor, point it at our successor. */
+	if (q->prev != NULL)
+		q->prev->next = q->next;
+	else
+		heads[prio] = q->next;
+
+	/* If we have a successor, point it at our predecessor. */
+	if (q->next != NULL)
+		q->next->prev = q->prev;
+	else
+		tails[prio] = q->prev;
+
+	/* Free the eventrec. */
+	events_freerec(q->r);
+
+	/* Return the node to the malloc pool. */
+	mpool_eventq_free(q);
+}
+
+/**
+ * events_immediate_get(void):
+ * Remove and return an eventrec structure from the immediate event queue,
+ * or return NULL if there are no such events.  The caller is responsible for
+ * freeing the returned memory.
+ */
+struct eventrec *
+events_immediate_get(void)
+{
+	struct eventq * q;
+	struct eventrec * r;
+	int prio;
+
+	/* Scan through priorities until we find an event or run out. */
+	for (prio = minq; prio < 32; prio++) {
+		/* Did we find an event? */
+		if (heads[prio] != NULL)
+			break;
+
+		/* This queue is empty; move on to the next one. */
+		minq++;
+	}
+
+	/* Are there any events? */
+	if (prio == 32)
+		return (NULL);
+
+	/* Remove the first node from the linked list. */
+	q = heads[prio];
+	heads[prio] = q->next;
+	if (heads[prio] != NULL)
+		heads[prio]->prev = NULL;
+
+	/* Extract the eventrec. */
+	r = q->r;
+
+	/* Return the node to the malloc pool. */
+	mpool_eventq_free(q);
+
+	/* Return the eventrec. */
+	return (r);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events_internal.h tarsnap-autoconf-1.0.34/libcperciva/events/events_internal.h
--- tarsnap-autoconf-1.0.33/libcperciva/events/events_internal.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,94 @@
+#ifndef _EVENTS_INTERNAL_H_
+#define _EVENTS_INTERNAL_H_
+
+#include <sys/time.h>
+
+/* Opaque event structure. */
+struct eventrec;
+
+/**
+ * events_mkrec(func, cookie):
+ * Package ${func}, ${cookie} into a struct eventrec.
+ */
+struct eventrec * events_mkrec(int (*)(void *), void *);
+
+/**
+ * events_freerec(r):
+ * Free the eventrec ${r}.
+ */
+void events_freerec(struct eventrec *);
+
+/**
+ * events_immediate_get(void):
+ * Remove and return an eventrec structure from the immediate event queue,
+ * or return NULL if there are no such events.  The caller is responsible for
+ * freeing the returned memory.
+ */
+struct eventrec * events_immediate_get(void);
+
+/**
+ * events_network_select(tv):
+ * Check for socket readiness events, waiting up to ${tv} time if there are
+ * no sockets immediately ready, or indefinitely if ${tv} is NULL.
+ */
+int events_network_select(struct timeval *);
+
+/**
+ * events_network_selectstats_startclock(void):
+ * Start the inter-select duration clock: There is a selectable event.
+ */
+void events_network_selectstats_startclock(void);
+
+/**
+ * events_network_selectstats_stopclock(void):
+ * Stop the inter-select duration clock: There are no selectable events.
+ */
+void events_network_selectstats_stopclock(void);
+
+/**
+ * events_network_selectstats_select(void):
+ * Update inter-select duration statistics in relation to an upcoming
+ * select(2) call.
+ */
+void events_network_selectstats_select(void);
+
+/**
+ * events_network_get(void):
+ * Find a socket readiness event which was identified by a previous call to
+ * events_network_select, and return it as an eventrec structure; or return
+ * NULL if there are no such events available.  The caller is responsible for
+ * freeing the returned memory.
+ */
+struct eventrec * events_network_get(void);
+
+/**
+ * events_network_shutdown(void)
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void events_network_shutdown(void);
+
+/**
+ * events_timer_min(timeo):
+ * Return via ${timeo} a pointer to the minimum time which must be waited
+ * before a timer will expire; or to NULL if there are no timers.  The caller
+ * is responsible for freeing the returned pointer.
+ */
+int events_timer_min(struct timeval **);
+
+/**
+ * events_timer_get(r):
+ * Return via ${r} a pointer to an eventrec structure corresponding to an
+ * expired timer, and delete said timer; or to NULL if there are no expired
+ * timers.  The caller is responsible for freeing the returned pointer.
+ */
+int events_timer_get(struct eventrec **);
+
+/**
+ * events_timer_shutdown(void):
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void events_timer_shutdown(void);
+
+#endif /* !_EVENTS_INTERNAL_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events_network.c tarsnap-autoconf-1.0.34/libcperciva/events/events_network.c
--- tarsnap-autoconf-1.0.33/libcperciva/events/events_network.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events_network.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,346 @@
+#include <sys/select.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+#include "elasticarray.h"
+#include "warnp.h"
+
+#include "events_internal.h"
+#include "events.h"
+
+/* Structure for holding readability and writability events for a socket. */
+struct socketrec {
+	struct eventrec * reader;
+	struct eventrec * writer;
+};
+
+/* List of sockets. */
+ELASTICARRAY_DECL(SOCKETLIST, socketlist, struct socketrec);
+static SOCKETLIST S = NULL;
+
+/* File descriptor sets containing unevented ready sockets. */
+static fd_set readfds;
+static fd_set writefds;
+
+/* Position to which events_network_get has scanned in *fds. */
+static size_t fdscanpos;
+
+/* Number of registered events. */
+static size_t nev;
+
+/* Initialize the socket list if we haven't already done so. */
+static int
+initsocketlist(void)
+{
+
+	/* If we're already initialized, do nothing. */
+	if (S != NULL)
+		goto done;
+
+	/* Initialize the socket list. */
+	if ((S = socketlist_init(0)) == NULL)
+		goto err0;
+
+	/* There are no events registered. */
+	nev = 0;
+
+	/* There are no unevented ready sockets. */
+	fdscanpos = FD_SETSIZE;
+
+done:
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/* Grow the socket list and initialize new records. */
+static int
+growsocketlist(size_t nrec)
+{
+	size_t i;
+
+	/* Get the old size. */
+	i = socketlist_getsize(S);
+
+	/* Grow the list. */
+	if (socketlist_resize(S, nrec))
+		goto err0;
+
+	/* Initialize new members. */
+	for (; i < nrec; i++) {
+		socketlist_get(S, i)->reader = NULL;
+		socketlist_get(S, i)->writer = NULL;
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_network_register(func, cookie, s, op):
+ * Register ${func}(${cookie}) to be run when socket ${s} is ready for
+ * reading or writing depending on whether ${op} is EVENTS_NETWORK_OP_READ or
+ * EVENTS_NETWORK_OP_WRITE.  If there is already an event registration for
+ * this ${s}/${op} pair, errno will be set to EEXIST and the function will
+ * fail.
+ */
+int
+events_network_register(int (*func)(void *), void * cookie, int s, int op)
+{
+	struct eventrec ** r;
+
+	/* Initialize if necessary. */
+	if (initsocketlist())
+		goto err0;
+
+	/* Sanity-check socket number. */
+	if ((s < 0) || (s >= (int)FD_SETSIZE)) {
+		warn0("Invalid file descriptor for network event: %d", s);
+		goto err0;
+	}
+
+	/* Sanity-check operation. */
+	if ((op != EVENTS_NETWORK_OP_READ) &&
+	    (op != EVENTS_NETWORK_OP_WRITE)) {
+		warn0("Invalid operation for network event: %d", op);
+		goto err0;
+	}
+
+	/* Grow the array if necessary. */
+	if (((size_t)(s) >= socketlist_getsize(S)) &&
+	    (growsocketlist(s + 1) != 0))
+		goto err0;
+
+	/* Look up the relevant event pointer. */
+	if (op == EVENTS_NETWORK_OP_READ)
+		r = &socketlist_get(S, s)->reader;
+	else
+		r = &socketlist_get(S, s)->writer;
+
+	/* Error out if we already have an event registered. */
+	if (*r != NULL) {
+		errno = EEXIST;
+		goto err0;
+	}
+
+	/* Register the new event. */
+	if ((*r = events_mkrec(func, cookie)) == NULL)
+		goto err0;
+
+	/*
+	 * Increment events-registered counter; and if it was zero, start the
+	 * inter-select duration clock.
+	 */
+	if (nev++ == 0)
+		events_network_selectstats_startclock();
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_network_cancel(s, op):
+ * Cancel the event registered for the socket/operation pair ${s}/${op}.  If
+ * there is no such registration, errno will be set to ENOENT and the
+ * function will fail.
+ */
+int
+events_network_cancel(int s, int op)
+{
+	struct eventrec ** r;
+
+	/* Initialize if necessary. */
+	if (initsocketlist())
+		goto err0;
+
+	/* Sanity-check socket number. */
+	if ((s < 0) || (s >= (int)FD_SETSIZE)) {
+		warn0("Invalid file descriptor for network event: %d", s);
+		goto err0;
+	}
+
+	/* Sanity-check operation. */
+	if ((op != EVENTS_NETWORK_OP_READ) &&
+	    (op != EVENTS_NETWORK_OP_WRITE)) {
+		warn0("Invalid operation for network event: %d", op);
+		goto err0;
+	}
+
+	/* We have no events registered beyond the end of the array. */
+	if ((size_t)(s) >= socketlist_getsize(S)) {
+		errno = ENOENT;
+		goto err0;
+	}
+
+	/* Look up the relevant event pointer. */
+	if (op == EVENTS_NETWORK_OP_READ)
+		r = &socketlist_get(S, s)->reader;
+	else
+		r = &socketlist_get(S, s)->writer;
+
+	/* Check if we have an event. */
+	if (*r == NULL) {
+		errno = ENOENT;
+		goto err0;
+	}
+
+	/* Free the event. */
+	events_freerec(*r);
+	*r = NULL;
+
+	/*
+	 * Since there is no longer an event registered for this socket /
+	 * operation pair, it doesn't make any sense for it to be ready.
+	 */
+	if (op == EVENTS_NETWORK_OP_READ)
+		FD_CLR(s, &readfds);
+	else
+		FD_CLR(s, &writefds);
+
+	/*
+	 * Decrement events-registered counter; and if it is becoming zero,
+	 * stop the inter-select duration clock.
+	 */
+	if (--nev == 0)
+		events_network_selectstats_stopclock();
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_network_select(tv):
+ * Check for socket readiness events, waiting up to ${tv} time if there are
+ * no sockets immediately ready, or indefinitely if ${tv} is NULL.
+ */
+int
+events_network_select(struct timeval * tv)
+{
+	size_t i;
+
+	/* Initialize if necessary. */
+	if (initsocketlist())
+		goto err0;
+
+	/* Zero the fd sets... */
+	FD_ZERO(&readfds);
+	FD_ZERO(&writefds);
+
+	/* ... and add the ones we care about. */
+	for (i = 0; i < socketlist_getsize(S); i++) {
+		if (socketlist_get(S, i)->reader)
+			FD_SET(i, &readfds);
+		if (socketlist_get(S, i)->writer)
+			FD_SET(i, &writefds);
+	}
+
+	/* We're about to call select! */
+	events_network_selectstats_select();
+
+	/* Select. */
+	while (select(socketlist_getsize(S), &readfds, &writefds,
+	    NULL, tv) == -1) {
+		/* EINTR is harmless. */
+		if (errno == EINTR)
+			continue;
+
+		/* Anything else is an error. */
+		warnp("select()");
+		goto err0;
+	}
+
+	/* If we have any events registered, start the clock again. */
+	if (nev > 0)
+		events_network_selectstats_startclock();
+
+	/* We should start scanning for events at the beginning. */
+	fdscanpos = 0;
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_network_get(void):
+ * Find a socket readiness event which was identified by a previous call to
+ * events_network_select, and return it as an eventrec structure; or return
+ * NULL if there are no such events available.  The caller is responsible for
+ * freeing the returned memory.
+ */
+struct eventrec *
+events_network_get(void)
+{
+	struct eventrec * r;
+	size_t nfds = socketlist_getsize(S);
+
+	/* We haven't found any events yet. */
+	r = NULL;
+
+	/* Scan through the fd sets looking for ready sockets. */
+	for (; fdscanpos < nfds; fdscanpos++) {
+		/* Are we ready for reading? */
+		if (FD_ISSET(fdscanpos, &readfds)) {
+			r = socketlist_get(S, fdscanpos)->reader;
+			socketlist_get(S, fdscanpos)->reader = NULL;
+			if (--nev == 0)
+				events_network_selectstats_stopclock();
+			FD_CLR(fdscanpos, &readfds);
+			break;
+		}
+
+		/* Are we ready for writing? */
+		if (FD_ISSET(fdscanpos, &writefds)) {
+			r = socketlist_get(S, fdscanpos)->writer;
+			socketlist_get(S, fdscanpos)->writer = NULL;
+			if (--nev == 0)
+				events_network_selectstats_stopclock();
+			FD_CLR(fdscanpos, &writefds);
+			break;
+		}
+	}
+
+	/* Return the event we found, or NULL if we didn't find any. */
+	return (r);
+}
+
+/**
+ * events_network_shutdown(void)
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void
+events_network_shutdown(void)
+{
+
+	/* If we're not initialized, do nothing. */
+	if (S == NULL)
+		return;
+
+	/* If we have any registered events, do nothing. */
+	if (nev > 0)
+		return;
+
+	/* Free the socket list. */
+	socketlist_free(S);
+	S = NULL;
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events_network_selectstats.c tarsnap-autoconf-1.0.34/libcperciva/events/events_network_selectstats.c
--- tarsnap-autoconf-1.0.33/libcperciva/events/events_network_selectstats.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events_network_selectstats.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,106 @@
+#include <sys/time.h>
+
+#include "monoclock.h"
+
+#include "events.h"
+#include "events_internal.h"
+
+/* Time when inter-select duration clock started. */
+static struct timeval st;
+static int running = 0;
+
+/* Statistics on inter-select durations. */
+static double N = 0.0;
+static double mu = 0.0;
+static double M2 = 0.0;
+static double max = 0.0;
+
+/**
+ * events_network_selectstats_startclock(void):
+ * Start the inter-select duration clock: There is a selectable event.
+ */
+void
+events_network_selectstats_startclock(void)
+{
+
+	/* If the clock is already running, return silently. */
+	if (running)
+		return;
+
+	/* Get the current time; return silently on error. */
+	if (monoclock_get(&st))
+		return;
+
+	/* The clock is now running. */
+	running = 1;
+}
+
+/**
+ * events_network_selectstats_stopclock(void):
+ * Stop the inter-select duration clock: There are no selectable events.
+ */
+void
+events_network_selectstats_stopclock(void)
+{
+
+	/* The clock is no longer running. */
+	running = 0;
+}
+
+/**
+ * events_network_selectstats_select(void):
+ * Update inter-select duration statistics in relation to an upcoming
+ * select(2) call.
+ */
+void
+events_network_selectstats_select(void)
+{
+	struct timeval tnow;
+	double t, d;
+
+	/* If the clock is not running, return silently. */
+	if (!running)
+		return;
+
+	/* If we can't get the current time, fail silently. */
+	if (monoclock_get(&tnow))
+		goto done;
+
+	/* Compute inter-select duration in seconds. */
+	t = (tnow.tv_sec - st.tv_sec) + (tnow.tv_usec - st.tv_usec) * 0.000001;
+
+	/* Adjust statistics.  We track running mean, variance * N, and max. */
+	N += 1.0;
+	d = t - mu;
+	mu += d / N;
+	M2 += d * (t - mu);
+	if (max < t)
+		max = t;
+
+done:
+	/* The clock is no longer running. */
+	running = 0;	
+}
+
+/**
+ * events_network_selectstats(N, mu, va, max):
+ * Return statistics on the inter-select durations since the last time this
+ * function was called.
+ */
+void
+events_network_selectstats(double * _N, double * _mu, double * _va,
+    double * _max)
+{
+
+	/* Copy statistics out. */
+	*_N = N;
+	*_mu = mu;
+	if (N > 1.0)
+		*_va = M2 / (N - 1.0);
+	else
+		*_va = 0.0;
+	*_max = max;
+
+	/* Zero statistics. */
+	N = mu = M2 = max = 0.0;
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/events/events_timer.c tarsnap-autoconf-1.0.34/libcperciva/events/events_timer.c
--- tarsnap-autoconf-1.0.33/libcperciva/events/events_timer.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/events/events_timer.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,262 @@
+#include <sys/time.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "monoclock.h"
+#include "timerqueue.h"
+
+#include "events_internal.h"
+#include "events.h"
+
+struct timerrec {
+	struct eventrec * r;
+	void * cookie;
+	struct timeval tv_orig;
+};
+
+static struct timerqueue * Q = NULL;
+
+/**
+ * events_timer_register(func, cookie, timeo):
+ * Register ${func}(${cookie}) to be run ${timeo} in the future.  Return a
+ * cookie which can be passed to events_timer_cancel or events_timer_reset.
+ */
+void *
+events_timer_register(int (*func)(void *), void * cookie,
+    const struct timeval * timeo)
+{
+	struct eventrec * r;
+	struct timerrec * t;
+	struct timeval tv;
+
+	/* Create the timer queue if it doesn't exist yet. */
+	if (Q == NULL) {
+		if ((Q = timerqueue_init()) == NULL)
+			goto err0;
+	}
+
+	/* Bundle into an eventrec record. */
+	if ((r = events_mkrec(func, cookie)) == NULL)
+		goto err0;
+
+	/* Create a timer record. */
+	if ((t = malloc(sizeof(struct timerrec))) == NULL)
+		goto err1;
+	t->r = r;
+	memcpy(&t->tv_orig, timeo, sizeof(struct timeval));
+
+	/* Compute the absolute timeout. */
+	if (monoclock_get(&tv))
+		goto err2;
+	tv.tv_sec += t->tv_orig.tv_sec;
+	if ((tv.tv_usec += t->tv_orig.tv_usec) >= 1000000) {
+		tv.tv_usec -= 1000000;
+		tv.tv_sec += 1;
+	}
+
+	/* Add this to the timer queue. */
+	if ((t->cookie = timerqueue_add(Q, &tv, t)) == NULL)
+		goto err2;
+
+	/* Success! */
+	return (t);
+
+err2:
+	free(t);
+err1:
+	events_freerec(r);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * events_timer_register_double(func, cookie, timeo):
+ * As events_timer_register, but ${timeo} is a double-precision floating point
+ * value specifying a number of seconds.
+ */
+void *
+events_timer_register_double(int (*func)(void *), void * cookie,
+    double timeo)
+{
+	struct timeval tv;
+
+	/* Convert timeo to a struct timeval. */
+	tv.tv_sec = timeo;
+	tv.tv_usec = (timeo - tv.tv_sec) * 1000000.0;
+
+	/* Schedule the timeout. */
+	return (events_timer_register(func, cookie, &tv));
+}
+
+/**
+ * events_timer_cancel(cookie):
+ * Cancel the timer for which the cookie ${cookie} was returned by
+ * events_timer_register.
+ */
+void
+events_timer_cancel(void * cookie)
+{
+	struct timerrec * t = cookie;
+
+	/* Remove from the timer queue. */
+	timerqueue_delete(Q, t->cookie);
+
+	/* Free the eventrec and timer records. */
+	events_freerec(t->r);
+	free(t);
+}
+
+/**
+ * events_timer_reset(cookie):
+ * Reset the timer for which the cookie ${cookie} was returned by
+ * events_timer_register to its initial value.
+ */
+int
+events_timer_reset(void * cookie)
+{
+	struct timerrec * t = cookie;
+	struct timeval tv;
+
+	/* Compute the new timeout. */
+	if (monoclock_get(&tv))
+		goto err0;
+	tv.tv_sec += t->tv_orig.tv_sec;
+	if ((tv.tv_usec += t->tv_orig.tv_usec) >= 1000000) {
+		tv.tv_usec -= 1000000;
+		tv.tv_sec += 1;
+	}
+
+	/* Adjust the timer. */
+	timerqueue_increase(Q, t->cookie, &tv);
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_timer_min(timeo):
+ * Return via ${timeo} a pointer to the minimum time which must be waited
+ * before a timer will expire; or to NULL if there are no timers.  The caller
+ * is responsible for freeing the returned pointer.
+ */
+int
+events_timer_min(struct timeval ** timeo)
+{
+	struct timeval tnow;
+	const struct timeval * tv;
+
+	/* If we have no queue, we have no timers; return NULL. */
+	if (Q == NULL) {
+		*timeo = NULL;
+		goto done;
+	}
+
+	/* Get the minimum timer from the queue. */
+	tv = timerqueue_getmin(Q);
+
+	/* If there are no timers, return NULL. */
+	if (tv == NULL) {
+		*timeo = NULL;
+		goto done;
+	}
+
+	/* Allocate space for holding the returned timeval. */
+	if ((*timeo = malloc(sizeof(struct timeval))) == NULL)
+		goto err0;
+
+	/* Get the current time... */
+	if (monoclock_get(&tnow))
+		goto err1;
+
+	/* ... and compare it to the minimum timer. */
+	if ((tnow.tv_sec > tv->tv_sec) ||
+	    ((tnow.tv_sec == tv->tv_sec) && (tnow.tv_usec > tv->tv_usec))) {
+		/* The timer has already expired, so return zero. */
+		(*timeo)->tv_sec = 0;
+		(*timeo)->tv_usec = 0;
+	} else {
+		/* Compute the difference. */
+		(*timeo)->tv_sec = tv->tv_sec - tnow.tv_sec;
+		(*timeo)->tv_usec = tv->tv_usec - tnow.tv_usec;
+		if (tv->tv_usec < tnow.tv_usec) {
+			(*timeo)->tv_usec += 1000000;
+			(*timeo)->tv_sec -= 1;
+		}
+	}
+
+done:
+	/* Success! */
+	return (0);
+
+err1:
+	free(*timeo);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_timer_get(r):
+ * Return via ${r} a pointer to an eventrec structure corresponding to an
+ * expired timer, and delete said timer; or to NULL if there are no expired
+ * timers.  The caller is responsible for freeing the returned pointer.
+ */
+int
+events_timer_get(struct eventrec ** r)
+{
+	struct timeval tnow;
+	struct timerrec * t;
+
+	/* If we have no queue, we have no timers; return NULL. */
+	if (Q == NULL) {
+		*r = NULL;
+		goto done;
+	}
+
+	/* Get current time. */
+	if (monoclock_get(&tnow))
+		goto err0;
+
+	/* Get an expired timer, if there is one. */
+	t = timerqueue_getptr(Q, &tnow);
+
+	/* If there is an expired timer... */
+	if (t != NULL) {
+		/* ... pass back the eventrec and free the timer. */
+		*r = t->r;
+		free(t);
+	} else {
+		/* Otherwise, return NULL. */
+		*r = NULL;
+	}
+
+done:
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * events_timer_shutdown(void):
+ * Clean up and free memory.  This call is not necessary on program exit and
+ * is only expected to be useful when checking for memory leaks.
+ */
+void
+events_timer_shutdown(void)
+{
+
+	/* If we have a queue and it is empty, free it. */
+	if ((Q != NULL) && (timerqueue_getmin(Q) == NULL)) {
+		timerqueue_free(Q);
+		Q = NULL;
+	}
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/network/network.h tarsnap-autoconf-1.0.34/libcperciva/network/network.h
--- tarsnap-autoconf-1.0.33/libcperciva/network/network.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/network/network.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,95 @@
+#ifndef _NETWORK_H_
+#define _NETWORK_H_
+
+#include <sys/select.h>
+
+#include <stddef.h>
+#include <stdint.h>
+#include <unistd.h>
+
+/* Opaque address structure. */
+struct sock_addr;
+
+/**
+ * network_accept(fd, callback, cookie):
+ * Asynchronously accept a connection on the socket ${fd}, which must be
+ * already marked as listening and non-blocking.  When a connection has been
+ * accepted or an error occurs, invoke ${callback}(${cookie}, s) where s is
+ * the accepted connection or -1 on error.  Return a cookie which can be
+ * passed to network_accept_cancel in order to cancel the accept.
+ */
+void * network_accept(int, int (*)(void *, int), void *);
+
+/**
+ * network_accept_cancel(cookie);
+ * Cancel the connection accept for which the cookie ${cookie} was returned
+ * by network_accept.  Do not invoke the callback associated with the accept.
+ */
+void network_accept_cancel(void *);
+
+/**
+ * network_connect(sas, callback, cookie):
+ * Iterate through the addresses in ${sas}, attempting to create and connect
+ * a non-blocking socket.  Once connected, invoke ${callback}(${cookie}, s)
+ * where s is the connected socket; upon fatal error or if there are no
+ * addresses remaining to attempt, invoke ${callback}(${cookie}, -1).  Return
+ * a cookie which can be passed to network_connect_cancel in order to cancel
+ * the connection attempt.
+ */
+void * network_connect(struct sock_addr * const *,
+    int (*)(void *, int), void *);
+
+/**
+ * network_connect_timeo(sas, timeo, callback, cookie):
+ * Behave as network_connect, but wait a duration of at most ${timeo} for
+ * each address which is being attempted.
+ */
+void * network_connect_timeo(struct sock_addr * const *, const struct timeval *,
+    int (*)(void *, int), void *);
+
+/**
+ * network_connect_cancel(cookie):
+ * Cancel the connection attempt for which ${cookie} was returned by
+ * network_connect.  Do not invoke the associated callback.
+ */
+void network_connect_cancel(void *);
+
+/**
+ * network_read(fd, buf, buflen, minread, callback, cookie):
+ * Asynchronously read up to ${buflen} bytes of data from ${fd} into ${buf}.
+ * When at least ${minread} bytes have been read or on error, invoke
+ * ${callback}(${cookie}, lenread), where lenread is 0 on EOF or -1 on error,
+ * and the number of bytes read (between ${minread} and ${buflen} inclusive)
+ * otherwise.  Return a cookie which can be passed to network_read_cancel in
+ * order to cancel the read.
+ */
+void * network_read(int, uint8_t *, size_t, size_t,
+    int (*)(void *, ssize_t), void *);
+
+/**
+ * network_read_cancel(cookie):
+ * Cancel the buffer read for which the cookie ${cookie} was returned by
+ * network_read.  Do not invoke the callback associated with the read.
+ */
+void network_read_cancel(void *);
+
+/**
+ * network_write(fd, buf, buflen, minwrite, callback, cookie):
+ * Asynchronously write up to ${buflen} bytes of data from ${buf} to ${fd}.
+ * When at least ${minwrite} bytes have been written or on error, invoke
+ * ${callback}(${cookie}, lenwrit), where lenwrit is -1 on error and the
+ * number of bytes written (between ${minwrite} and ${buflen} inclusive)
+ * otherwise.  Return a cookie which can be passed to network_write_cancel in
+ * order to cancel the write.
+ */
+void * network_write(int, const uint8_t *, size_t, size_t,
+    int (*)(void *, ssize_t), void *);
+
+/**
+ * network_write_cancel(cookie):
+ * Cancel the buffer write for which the cookie ${cookie} was returned by
+ * network_write.  Do not invoke the callback associated with the write.
+ */
+void network_write_cancel(void *);
+
+#endif /* !_NETWORK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/network/network_accept.c tarsnap-autoconf-1.0.34/libcperciva/network/network_accept.c
--- tarsnap-autoconf-1.0.33/libcperciva/network/network_accept.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/network/network_accept.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,103 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+#include "events.h"
+
+#include "network.h"
+
+struct accept_cookie {
+	int (* callback)(void *, int);
+	void * cookie;
+	int fd;
+};
+
+/* Accept the connection and invoke the callback. */
+static int
+callback_accept(void * cookie)
+{
+	struct accept_cookie * C = cookie;
+	int s;
+	int rc;
+
+	/* Attempt to accept a new connection. */
+	if ((s = accept(C->fd, NULL, NULL)) == -1) {
+		/* If a connection isn't available, reset the callback. */
+		if ((errno == EAGAIN) ||
+		    (errno == EWOULDBLOCK) ||
+		    (errno == ECONNABORTED) ||
+		    (errno == EINTR))
+			goto tryagain;
+	}
+
+	/* Call the upstream callback. */
+	rc = (C->callback)(C->cookie, s);
+
+	/* Free the cookie. */
+	free(C);
+
+	/* Return status from upstream callback. */
+	return (rc);
+
+tryagain:
+	/* Reset the callback. */
+	return (events_network_register(callback_accept, C, C->fd,
+	    EVENTS_NETWORK_OP_READ));
+}
+
+/**
+ * network_accept(fd, callback, cookie):
+ * Asynchronously accept a connection on the socket ${fd}, which must be
+ * already marked as listening and non-blocking.  When a connection has been
+ * accepted or an error occurs, invoke ${callback}(${cookie}, s) where s is
+ * the accepted connection or -1 on error.  Return a cookie which can be
+ * passed to network_accept_cancel in order to cancel the accept.
+ */
+void *
+network_accept(int fd, int (* callback)(void *, int), void * cookie)
+{
+	struct accept_cookie * C;
+
+	/* Bake a cookie. */
+	if ((C = malloc(sizeof(struct accept_cookie))) == NULL)
+		goto err0;
+	C->callback = callback;
+	C->cookie = cookie;
+	C->fd = fd;
+
+	/*
+	 * Register a network event.  A connection arriving on a listening
+	 * socket is treated by select(2) as the socket becoming readable.
+	 */
+	if (events_network_register(callback_accept, C, C->fd,
+	    EVENTS_NETWORK_OP_READ))
+		goto err1;
+
+	/* Success! */
+	return (C);
+
+err1:
+	free(C);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * network_accept_cancel(cookie);
+ * Cancel the connection accept for which the cookie ${cookie} was returned
+ * by network_accept.  Do not invoke the callback associated with the accept.
+ */
+void
+network_accept_cancel(void * cookie)
+{
+	struct accept_cookie * C = cookie;
+
+	/* Cancel the network event. */
+	events_network_cancel(C->fd, EVENTS_NETWORK_OP_READ);
+
+	/* Free the cookie. */
+	free(C);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/network/network_buf.c tarsnap-autoconf-1.0.34/libcperciva/network/network_buf.c
--- tarsnap-autoconf-1.0.33/libcperciva/network/network_buf.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/network/network_buf.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,297 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "events.h"
+#include "warnp.h"
+
+#include "network.h"
+
+/**
+ * We use three methods to prevent SIGPIPE from being sent, in order of
+ * preference:
+ * 1. The MSG_NOSIGNAL send(2) flag.
+ * 2. The SO_NOSIGPIPE socket option.
+ * 3. Blocking the SIGPIPE signal.
+ */
+#ifdef MSG_NOSIGNAL
+#define USE_MSG_NOSIGNAL
+#else /* !MSG_NOSIGNAL */
+#define MSG_NOSIGNAL 0
+#ifdef SO_NOSIGPIPE
+#define USE_SO_NOSIGPIPE
+#else /* !MSG_NOSIGNAL, !SO_NOSIGPIPE */
+#define USE_SIGNAL
+#endif /* !MSG_NOSIGNAL, !SO_NOSIGPIPE */
+#endif /* !MSG_NOSIGNAL */
+
+struct network_buf_cookie {
+	int (*callback)(void *, ssize_t);
+	void * cookie;
+	int fd;
+	uint8_t * buf;
+	size_t buflen;
+	size_t minlen;
+	size_t bufpos;
+	ssize_t (* sendrecv)(int, void *, size_t, int);
+	int op;
+	int flags;
+};
+
+static int docallback(struct network_buf_cookie *, size_t);
+static int callback_buf(void *);
+static struct network_buf_cookie * network_buf(int, uint8_t *, size_t,
+    size_t, int (*)(void *, ssize_t), void *,
+    ssize_t (*)(int, void *, size_t, int), int, int);
+static void cancel(void *);
+
+/* Invoke the callback, clean up, and return the callback's status. */
+static int
+docallback(struct network_buf_cookie * C, size_t nbytes)
+{
+	int rc;
+
+	/* Invoke the callback. */
+	rc = (C->callback)(C->cookie, nbytes);
+
+	/* Clean up. */
+	free(C);
+
+	/* Return the callback's status. */
+	return (rc);
+}
+
+/* The socket is ready for reading/writing. */
+static int
+callback_buf(void * cookie)
+{
+	struct network_buf_cookie * C = cookie;
+	size_t oplen;
+	ssize_t len;
+#ifdef USE_SO_NOSIGPIPE
+	int val;
+#endif
+#ifdef USE_SIGNAL
+	void (*oldsig)(int);
+#endif
+
+	/* Make sure we don't get a SIGPIPE. */
+#ifdef USE_SO_NOSIGPIPE
+	val = 1;
+	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
+		warnp("setsockopt(SO_NOSIGPIPE)");
+		goto failed;
+	}
+#endif
+#ifdef USE_SIGNAL
+	if ((oldsig = signal(SIGPIPE, SIG_IGN)) == SIG_ERR) {
+		warnp("signal(SIGPIPE)");
+		goto failed;
+	}
+#endif
+
+	/* Attempt to read/write data to/from the buffer. */
+	oplen = C->buflen - C->bufpos;
+	len = (C->sendrecv)(C->fd, C->buf + C->bufpos, oplen, C->flags);
+
+	/* Undo whatever we did to prevent SIGPIPEs. */
+#ifdef USE_SO_NOSIGPIPE
+	val = 0;
+	if (setsockopt(C->fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(int))) {
+		warnp("setsockopt(SO_NOSIGPIPE)");
+		goto failed;
+	}
+#endif
+#ifdef USE_SIGNAL
+	if (signal(SIGPIPE, oldsig) == SIG_ERR) {
+		warnp("signal(SIGPIPE)");
+		goto failed;
+	}
+#endif
+
+	/* Failure? */
+	if (len == -1) {
+		/* Was it really an error, or just a try-again? */
+		if ((errno == EAGAIN) ||
+		    (errno == EWOULDBLOCK) ||
+		    (errno == EINTR))
+			goto tryagain;
+
+		/* Something went wrong. */
+		goto failed;
+	} else if (len == 0) {
+		/* The socket was shut down by the remote host. */
+		goto eof;
+	}
+
+	/* We processed some data.  Do we need to keep going? */
+	if ((C->bufpos += len) < C->minlen)
+		goto tryagain;
+
+	/* Invoke the callback and return. */
+	return (docallback(C, C->bufpos));
+
+tryagain:
+	/* Reset the event. */
+	if (events_network_register(callback_buf, C, C->fd, C->op))
+		goto failed;
+
+	/* Callback was reset. */
+	return (0);
+
+eof:
+	/* Sanity-check: This should only occur for reads. */
+	assert(C->op == EVENTS_NETWORK_OP_READ);
+
+	/* Invoke the callback with an EOF status and return. */
+	return (docallback(C, 0));
+
+failed:
+	/* Invoke the callback with a failure status and return. */
+	return (docallback(C, -1));
+}
+
+/**
+ * network_buf(fd, buf, buflen, minlen, callback, cookie, sendrecv, op, flags):
+ * Asynchronously read/write up to ${buflen} bytes of data from/to ${fd}
+ * to/from ${buf}.  When at least ${minlen} bytes have been read/written,
+ * invoke ${callback}(${cookie}, nbytes), where nbytes is 0 on EOF or -1 on
+ * error and the number of bytes read/written (between ${minlen} and ${buflen}
+ * inclusive) otherwise.  Return a cookie which can be passed to buf_cancel
+ * in order to cancel the read/write.
+ */
+static struct network_buf_cookie *
+network_buf(int fd, uint8_t * buf, size_t buflen, size_t minlen,
+    int (* callback)(void *, ssize_t), void * cookie,
+    ssize_t (* sendrecv)(int, void *, size_t, int), int op, int flags)
+{
+	struct network_buf_cookie * C;
+
+	/* Sanity-check: # bytes must fit into a ssize_t. */
+	assert(buflen <= SSIZE_MAX);
+
+	/* Bake a cookie. */
+	if ((C = malloc(sizeof(struct network_buf_cookie))) == NULL)
+		goto err0;
+	C->callback = callback;
+	C->cookie = cookie;
+	C->fd = fd;
+	C->buf = buf;
+	C->buflen = buflen;
+	C->minlen = minlen;
+	C->bufpos = 0;
+	C->sendrecv = sendrecv;
+	C->op = op;
+	C->flags = flags;
+
+	/* Register a callback for network readiness. */
+	if (events_network_register(callback_buf, C, C->fd, C->op))
+		goto err1;
+
+	/* Success! */
+	return (C);
+
+err1:
+	free(C);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/* Cancel the read/write. */
+static void
+cancel(void * cookie)
+{
+	struct network_buf_cookie * C = cookie;
+
+	/* Kill the network event. */
+	events_network_cancel(C->fd, C->op);
+
+	/* Free the cookie. */
+	free(C);
+}
+
+/**
+ * network_read(fd, buf, buflen, minread, callback, cookie):
+ * Asynchronously read up to ${buflen} bytes of data from ${fd} into ${buf}.
+ * When at least ${minread} bytes have been read or on error, invoke
+ * ${callback}(${cookie}, lenread), where lenread is 0 on EOF or -1 on error,
+ * and the number of bytes read (between ${minread} and ${buflen} inclusive)
+ * otherwise.  Return a cookie which can be passed to network_read_cancel in
+ * order to cancel the read.
+ */
+void *
+network_read(int fd, uint8_t * buf, size_t buflen, size_t minread,
+    int (* callback)(void *, ssize_t), void * cookie)
+{
+
+	/* Make sure buflen is non-zero. */
+	if (buflen == 0) {
+		warn0("Programmer error: Cannot read zero-byte buffer");
+		return (NULL);
+	}
+
+	/* Get network_buf to set things up for us. */
+	return (network_buf(fd, buf, buflen, minread, callback, cookie, recv,
+	    EVENTS_NETWORK_OP_READ, 0));
+}
+
+/**
+ * network_read_cancel(cookie):
+ * Cancel the buffer read for which the cookie ${cookie} was returned by
+ * network_read.  Do not invoke the callback associated with the read.
+ */
+void
+network_read_cancel(void * cookie)
+{
+
+	/* Get cancel to do the work for us. */
+	cancel(cookie);
+}
+
+/**
+ * network_write(fd, buf, buflen, minwrite, callback, cookie):
+ * Asynchronously write up to ${buflen} bytes of data from ${buf} to ${fd}.
+ * When at least ${minwrite} bytes have been written or on error, invoke
+ * ${callback}(${cookie}, lenwrit), where lenwrit is -1 on error and the
+ * number of bytes written (between ${minwrite} and ${buflen} inclusive)
+ * otherwise.  Return a cookie which can be passed to network_write_cancel in
+ * order to cancel the write.
+ */
+void *
+network_write(int fd, const uint8_t * buf, size_t buflen, size_t minwrite,
+    int (* callback)(void *, ssize_t), void * cookie)
+{
+
+	/* Make sure buflen is non-zero. */
+	if (buflen == 0) {
+		warn0("Programmer error: Cannot write zero-byte buffer");
+		return (NULL);
+	}
+
+	/* Get network_buf to set things up for us. */
+	return (network_buf(fd, (uint8_t *)(uintptr_t)buf, buflen, minwrite,
+	    callback, cookie,
+	    (ssize_t (*)(int, void *, size_t, int))send,
+	    EVENTS_NETWORK_OP_WRITE, MSG_NOSIGNAL));
+}
+
+/**
+ * network_write_cancel(cookie):
+ * Cancel the buffer write for which the cookie ${cookie} was returned by
+ * network_write.  Do not invoke the callback associated with the write.
+ */
+void
+network_write_cancel(void * cookie)
+{
+
+	/* Get cancel to do the work for us. */
+	cancel(cookie);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/network/network_connect.c tarsnap-autoconf-1.0.34/libcperciva/network/network_connect.c
--- tarsnap-autoconf-1.0.33/libcperciva/network/network_connect.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/network/network_connect.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,255 @@
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+
+#include <assert.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "events.h"
+#include "sock.h"
+
+#include "network.h"
+
+struct connect_cookie {
+	int (* callback)(void *, int);
+	void * cookie;
+	struct sock_addr * const * sas;
+	struct timeval timeo;
+	void * cookie_immediate;
+	int s;
+	int timeo_enabled;
+	void * cookie_timeo;
+};
+
+static int tryconnect(struct connect_cookie *);
+
+/* Invoke the upstream callback and clean up. */
+static int
+docallback(void * cookie)
+{
+	struct connect_cookie * C = cookie;
+	int rc;
+
+	/* Invoke the upstream callback. */
+	rc = (C->callback)(C->cookie, C->s);
+
+	/* Free the cookie. */
+	free(C);
+
+	/* Return status from upstream callback. */
+	return (rc);
+}
+
+/* An address failed to connect. */
+static int
+dofailed(struct connect_cookie * C)
+{
+
+	/* Close the socket which failed to connect. */
+	close(C->s);
+
+	/* We don't have an open socket any more. */
+	C->s = -1;
+
+	/* This address didn't work. */
+	C->sas++;
+
+	/* Try other addresses until we run out of options. */
+	return (tryconnect(C));
+}
+
+/* Callback when connect(2) succeeds or fails. */
+static int
+callback_connect(void * cookie)
+{
+	struct connect_cookie * C = cookie;
+	int sockerr;
+	socklen_t sockerrlen = sizeof(int);
+
+	/* Stop waiting for the timer callback. */
+	if (C->cookie_timeo != NULL) {
+		events_timer_cancel(C->cookie_timeo);
+		C->cookie_timeo = NULL;
+	}
+
+	/* Did we succeed? */
+	if (getsockopt(C->s, SOL_SOCKET, SO_ERROR, &sockerr, &sockerrlen))
+		goto err1;
+	if (sockerr != 0)
+		return (dofailed(C));
+
+	/*
+	 * Perform the callback (this can be done here rather than being
+	 * scheduled as an immediate callback, as we're already running from
+	 * callback context).
+	 */
+	return (docallback(C));
+
+err1:
+	close(C->s);
+	free(C);
+
+	/* Fatal error! */
+	return (-1);
+}
+
+/* Callback when a timer expires. */
+static int
+callback_timeo(void * cookie)
+{
+	struct connect_cookie * C = cookie;
+
+	/* We're not waiting for a timer callback any more. */
+	C->cookie_timeo = NULL;
+
+	/* This connect attempt failed. */
+	return (dofailed(C));
+}
+
+/* Try to launch a connection.  Free the cookie on fatal errors. */
+static int
+tryconnect(struct connect_cookie * C)
+{
+
+	/* Try addresses until we find one which doesn't fail immediately. */
+	for (; C->sas[0] != NULL; C->sas++) {
+		/* Can we try to connect to this address? */
+		if ((C->s = sock_connect_nb(C->sas[0])) != -1)
+			break;
+	}
+
+	/* Did we run out of addresses to try? */
+	if (C->sas[0] == NULL)
+		goto failed;
+
+	/* If we've been asked to have a timeout, set one. */
+	if (C->timeo_enabled) {
+		if ((C->cookie_timeo = events_timer_register(callback_timeo,
+		    C, &C->timeo)) == NULL)
+			goto err1;
+	} else {
+		C->cookie_timeo = NULL;
+	}
+
+	/* Wait until this socket connects or fails to do so. */
+	if (events_network_register(callback_connect, C, C->s,
+	    EVENTS_NETWORK_OP_WRITE))
+		goto err2;
+
+	/* Success! */
+	return (0);
+
+failed:
+	/* Schedule a callback. */
+	if ((C->cookie_immediate =
+	    events_immediate_register(docallback, C, 0)) == NULL)
+		goto err1;
+
+	/* Failure successfully handled. */
+	return (0);
+
+err2:
+	if (C->cookie_timeo != NULL)
+		events_timer_cancel(C->cookie_timeo);
+err1:
+	if (C->s != -1)
+		close(C->s);
+	free(C);
+
+	/* Fatal error. */
+	return (-1);
+}
+
+/**
+ * network_connect(sas, callback, cookie):
+ * Iterate through the addresses in ${sas}, attempting to create and connect
+ * a non-blocking socket.  Once connected, invoke ${callback}(${cookie}, s)
+ * where s is the connected socket; upon fatal error or if there are no
+ * addresses remaining to attempt, invoke ${callback}(${cookie}, -1).  Return
+ * a cookie which can be passed to network_connect_cancel in order to cancel
+ * the connection attempt.
+ */
+void *
+network_connect(struct sock_addr * const * sas,
+    int (* callback)(void *, int), void * cookie)
+{
+
+	/* Let network_connect_timeo handle this. */
+	return (network_connect_timeo(sas, NULL, callback, cookie));
+}
+
+/**
+ * network_connect_timeo(sas, timeo, callback, cookie):
+ * Behave as network_connect, but wait a duration of at most ${timeo} for
+ * each address which is being attempted.
+ */
+void *
+network_connect_timeo(struct sock_addr * const * sas,
+    const struct timeval * timeo,
+    int (* callback)(void *, int), void * cookie)
+{
+	struct connect_cookie * C;
+
+	/* Bake a cookie. */
+	if ((C = malloc(sizeof(struct connect_cookie))) == NULL)
+		goto err0;
+	C->callback = callback;
+	C->cookie = cookie;
+	C->sas = sas;
+	C->cookie_immediate = NULL;
+	C->cookie_timeo = NULL;
+	C->s = -1;
+
+	/* Do we have a timeout? */
+	if (timeo != NULL) {
+		memcpy(&C->timeo, timeo, sizeof(struct timeval));
+		C->timeo_enabled = 1;
+	} else {
+		C->timeo_enabled = 0;
+	}
+
+	/* Try to connect to the first address. */
+	if (tryconnect(C))
+		goto err0;
+
+	/* Success! */
+	return (C);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * network_connect_cancel(cookie):
+ * Cancel the connection attempt for which ${cookie} was returned by
+ * network_connect.  Do not invoke the associated callback.
+ */
+void
+network_connect_cancel(void * cookie)
+{
+	struct connect_cookie * C = cookie;
+
+	/* We should have either an immediate callback or a socket. */
+	assert((C->cookie_immediate != NULL) || (C->s != -1));
+	assert((C->cookie_immediate == NULL) || (C->s == -1));
+
+	/* Cancel any timer. */
+	if (C->cookie_timeo != NULL)
+		events_timer_cancel(C->cookie_timeo);
+
+	/* Cancel any immediate callback. */
+	if (C->cookie_immediate != NULL)
+		events_immediate_cancel(C->cookie_immediate);
+
+	/* Close any socket. */
+	if (C->s != -1) {
+		events_network_cancel(C->s, EVENTS_NETWORK_OP_WRITE);
+		close(C->s);
+	}
+
+	/* Free the cookie. */
+	free(C);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/asprintf.c tarsnap-autoconf-1.0.34/libcperciva/util/asprintf.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/asprintf.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/asprintf.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,49 @@
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "asprintf.h"
+
+/**
+ * asprintf(ret, format, ...):
+ * Do asprintf(3) like GNU and BSD do.
+ */
+int
+asprintf(char **ret, const char *format, ...)
+{
+	va_list ap;
+	int len;
+	size_t buflen;
+
+	/* Figure out how long the string needs to be. */
+	va_start(ap, format);
+	len = vsnprintf(NULL, 0, format, ap);
+	va_end(ap);
+
+	/* Did we fail? */
+	if (len < 0)
+		goto err0;
+	buflen = (size_t)(len) + 1;
+
+	/* Allocate memory. */
+	if ((*ret = malloc(buflen)) == NULL)
+		goto err0;
+
+	/* Actually generate the string. */
+	va_start(ap, format);
+	len = vsnprintf(*ret, buflen, format, ap);
+	va_end(ap);
+
+	/* Did we fail? */
+	if (len < 0)
+		goto err1;
+
+	/* Success! */
+	return (len);
+
+err1:
+	free(*ret);
+err0:
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/asprintf.h tarsnap-autoconf-1.0.34/libcperciva/util/asprintf.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/asprintf.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/asprintf.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,16 @@
+#ifndef _ASPRINTF_H_
+#define _ASPRINTF_H_
+
+/* Avoid namespace collisions with BSD/GNU asprintf. */
+#ifdef asprintf
+#undef asprintf
+#endif
+#define asprintf libcperciva_asprintf
+
+/**
+ * asprintf(ret, format, ...):
+ * Do asprintf(3) like GNU and BSD do.
+ */
+int asprintf(char **, const char *, ...);
+
+#endif /* !_ASPRINTF_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/b64encode.c tarsnap-autoconf-1.0.34/libcperciva/util/b64encode.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/b64encode.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/b64encode.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,120 @@
+#include <stdint.h>
+#include <string.h>
+
+#include "b64encode.h"
+
+static char b64chars[] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+/**
+ * b64encode(in, out, len):
+ * Convert ${len} bytes from ${in} into RFC 1421 base-64 encoding, writing
+ * the resulting ((len + 2) / 3) * 4 bytes to ${out}; and append a NUL byte.
+ */
+void
+b64encode(const uint8_t * in, char * out, size_t len)
+{
+	uint32_t t;
+	size_t j;
+
+	/* Repeat {read up to 3 bytes; write 4 bytes} until we're done. */
+	while (len) {
+		/* Read up to 3 bytes. */
+		for (t = j = 0; j < 3; j++) {
+			t <<= 8;
+			if (j < len)
+				t += *in++;
+		}
+
+		/* Write 4 bytes. */
+		for (j = 0; j < 4; j++) {
+			if (j <= len)
+				*out++ = b64chars[(t >> 18) & 0x3f];
+			else
+				*out++ = '=';
+			t <<= 6;
+		}
+
+		/* Adjust the remaining length. */
+		if (len < 3)
+			len = 0;
+		else
+			len -= 3;
+	}
+
+	/* NUL terminate. */
+	*out++ = '\0';
+}
+
+/**
+ * b64decode(in, inlen, out, outlen):
+ * Convert ${inlen} bytes of RFC 1421 base-64 encoding from ${in}, writing
+ * the resulting bytes to ${out}; and pass the number of bytes output back
+ * via ${outlen}.  The buffer ${out} must contain at least (inlen/4)*3 bytes
+ * of space; but ${outlen} might be less than this.  Return non-zero if the
+ * input ${in} is not valid base-64 encoded text.
+ */
+int
+b64decode(const char * in, size_t inlen, uint8_t * out, size_t * outlen)
+{
+	uint32_t t;
+	size_t deadbytes = 0;
+	size_t i;
+
+	/* We must have a multiple of 4 input bytes. */
+	if (inlen % 4 != 0)
+		goto bad;
+
+	/* Check that we have valid input and count trailing '='s. */
+	for (i = 0; i < inlen; i++) {
+		/* Must be characters from our b64 character set. */
+		if ((in[i] == '\0') || (strchr(b64chars, in[i]) == NULL))
+			goto bad;
+
+		/* Is this a '=' character? */
+		if (in[i] == '=')
+			deadbytes += 1;
+
+		/* No non-'=' bytes after a '=' byte. */
+		if ((in[i] != '=') && (deadbytes > 0))
+			goto bad;
+	}
+
+	/* Can't have more than 2 trailing '=' bytes. */
+	if (deadbytes > 2)
+		goto bad;
+
+	/* We have no output yet. */
+	*outlen = 0;
+
+	/* Loop until we run out of data. */
+	while (inlen) {
+		/* Parse 4 bytes. */
+		for (t = 0, i = 0; i < 4; i++) {
+			t <<= 6;
+			t += (strchr(b64chars, in[i]) - b64chars) & 0x3f;
+		}
+
+		/* Output 3 bytes. */
+		for (i = 0; i < 3; i++) {
+			out[i] = t >> 16;
+			t <<= 8;
+		}
+
+		/* Adjust pointers and lengths for the completed block. */
+		in += 4;
+		inlen -= 4;
+		out += 3;
+		*outlen += 3;
+	}
+
+	/* Ignore dead bytes. */
+	*outlen -= deadbytes;
+
+	/* Success! */
+	return (0);
+
+bad:
+	/* The input is not valid base-64 encoded text. */
+	return (1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/b64encode.h tarsnap-autoconf-1.0.34/libcperciva/util/b64encode.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/b64encode.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/b64encode.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,24 @@
+#ifndef _B64ENCODE_H_
+#define _B64ENCODE_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * b64encode(in, out, len):
+ * Convert ${len} bytes from ${in} into RFC 1421 base-64 encoding, writing
+ * the resulting ((len + 2) / 3) * 4 bytes to ${out}; and append a NUL byte.
+ */
+void b64encode(const uint8_t *, char *, size_t);
+
+/**
+ * b64decode(in, inlen, out, outlen):
+ * Convert ${inlen} bytes of RFC 1421 base-64 encoding from ${in}, writing
+ * the resulting bytes to ${out}; and pass the number of bytes output back
+ * via ${outlen}.  The buffer ${out} must contain at least (inlen/4)*3 bytes
+ * of space; but ${outlen} might be less than this.  Return non-zero if the
+ * input ${in} is not valid base-64 encoded text.
+ */
+int b64decode(const char *, size_t, uint8_t *, size_t *);
+
+#endif /* !_B64ENCODE_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/ctassert.h tarsnap-autoconf-1.0.34/libcperciva/util/ctassert.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/ctassert.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/ctassert.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,19 @@
+#ifndef _CTASSERT_H_
+#define _CTASSERT_H_
+
+/*
+ * CTASSERT(foo) will produce a compile-time error if "foo" is not a constant
+ * expression which evaluates to a non-zero value.
+ */
+
+/* Kill any existing definition, just in case it's different. */
+#ifdef CTASSERT
+#undef CTASSERT
+#endif
+
+/* Define using libcperciva namespace to avoid collisions. */
+#define CTASSERT(x)			libcperciva_CTASSERT(x, __LINE__)
+#define libcperciva_CTASSERT(x, y)	libcperciva__CTASSERT(x, y)
+#define libcperciva__CTASSERT(x, y)	typedef char libcperciva__assert ## y[(x) ? 1 : -1]
+
+#endif /* !_CTASSERT_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/entropy.c tarsnap-autoconf-1.0.34/libcperciva/util/entropy.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/entropy.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/entropy.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,76 @@
+#include <fcntl.h>
+#include <limits.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include "warnp.h"
+
+#include "entropy.h"
+
+/**
+ * XXX Portability
+ * XXX We obtain random bytes from the operating system by opening
+ * XXX /dev/urandom and reading them from that device; this works on
+ * XXX modern UNIX-like operating systems but not on systems like
+ * XXX win32 where there is no concept of /dev/urandom.
+ */
+
+/**
+ * entropy_read(buf, buflen):
+ * Fill the given buffer with random bytes provided by the operating system.
+ */
+int
+entropy_read(uint8_t * buf, size_t buflen)
+{
+	int fd;
+	ssize_t lenread;
+
+	/* Sanity-check the buffer size. */
+	if (buflen > SSIZE_MAX) {
+		warn0("Programmer error: "
+		    "Trying to read insane amount of random data: %zu",
+		    buflen);
+		goto err0;
+	}
+
+	/* Open /dev/urandom. */
+	if ((fd = open("/dev/urandom", O_RDONLY)) == -1) {
+		warnp("open(/dev/urandom)");
+		goto err0;
+	}
+
+	/* Read bytes until we have filled the buffer. */
+	while (buflen > 0) {
+		if ((lenread = read(fd, buf, buflen)) == -1) {
+			warnp("read(/dev/urandom)");
+			goto err1;
+		}
+
+		/* The random device should never EOF. */
+		if (lenread == 0) {
+			warn0("EOF on /dev/urandom?");
+			goto err1;
+		}
+
+		/* We're partly done. */
+		buf += lenread;
+		buflen -= lenread;
+	}
+
+	/* Close the device. */
+	while (close(fd) == -1) {
+		if (errno != EINTR) {
+			warnp("close(/dev/urandom)");
+			goto err0;
+		}
+	}
+
+	/* Success! */
+	return (0);
+
+err1:
+	close(fd);
+err0:
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/entropy.h tarsnap-autoconf-1.0.34/libcperciva/util/entropy.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/entropy.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/entropy.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,13 @@
+#ifndef _ENTROPY_H_
+#define _ENTROPY_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * entropy_read(buf, buflen):
+ * Fill the given buffer with random bytes provided by the operating system.
+ */
+int entropy_read(uint8_t *, size_t);
+
+#endif /* !_ENTROPY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/hexify.c tarsnap-autoconf-1.0.34/libcperciva/util/hexify.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/hexify.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/hexify.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,55 @@
+#include <stdint.h>
+#include <string.h>
+
+#include "hexify.h"
+
+static char hexchars[] ="0123456789abcdef0123456789ABCDEF";
+
+/**
+ * hexify(in, out, len):
+ * Convert ${len} bytes from ${in} into hexadecimal, writing the resulting
+ * 2 * ${len} bytes to ${out}; and append a NUL byte.
+ */
+void
+hexify(const uint8_t * in, char * out, size_t len)
+{
+	char * p = out;
+	size_t i;
+
+	for (i = 0; i < len; i++) {
+		*p++ = hexchars[in[i] >> 4];
+		*p++ = hexchars[in[i] & 0x0f];
+	}
+	*p = '\0';
+}
+
+/**
+ * unhexify(in, out, len):
+ * Convert 2 * ${len} hexadecimal characters from ${in} to ${len} bytes
+ * and write them to ${out}.  This function will only fail if the input is
+ * not a sequence of hexadecimal characters.
+ */
+int
+unhexify(const char * in, uint8_t * out, size_t len)
+{
+	size_t i;
+
+	/* Make sure we have at least 2 * ${len} hex characters. */
+	for (i = 0; i < 2 * len; i++) {
+		if ((in[i] == '\0') || (strchr(hexchars, in[i]) == NULL))
+			goto err0;
+	}
+
+	for (i = 0; i < len; i++) {
+		out[i] = (strchr(hexchars, in[2 * i]) - hexchars) & 0x0f;
+		out[i] <<= 4;
+		out[i] += (strchr(hexchars, in[2 * i + 1]) - hexchars) & 0x0f;
+	}
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Bad input string. */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/hexify.h tarsnap-autoconf-1.0.34/libcperciva/util/hexify.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/hexify.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/hexify.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,22 @@
+#ifndef _HEXIFY_H_
+#define _HEXIFY_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/**
+ * hexify(in, out, len):
+ * Convert ${len} bytes from ${in} into hexadecimal, writing the resulting
+ * 2 * ${len} bytes to ${out}; and append a NUL byte.
+ */
+void hexify(const uint8_t *, char *, size_t);
+
+/**
+ * unhexify(in, out, len):
+ * Convert 2 * ${len} hexadecimal characters from ${in} to ${len} bytes
+ * and write them to ${out}.  This function will only fail if the input is
+ * not a sequence of hexadecimal characters.
+ */
+int unhexify(const char *, uint8_t *, size_t);
+
+#endif /* !_HEXIFY_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/humansize.c tarsnap-autoconf-1.0.34/libcperciva/util/humansize.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/humansize.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/humansize.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,165 @@
+#include <stdio.h>
+
+#include "asprintf.h"
+#include "warnp.h"
+
+#include "humansize.h"
+
+/**
+ * humansize(size):
+ * Given a size in bytes, allocate and return a string of the form "<N> B"
+ * for 0 <= N <= 999 or "<X> <prefix>B" where either 10 <= X <= 999 or
+ * 1.0 <= X <= 9.9 and <prefix> is "k", "M", "G", "T", "P", or "E"; and where
+ * the value returned is the largest valid value <= the provided size.
+ */
+char *
+humansize(uint64_t size)
+{
+	char * s;
+	char prefix;
+	int shiftcnt;
+	int rc;
+
+	/* Special-case for size < 1000. */
+	if (size < 1000) {
+		rc = asprintf(&s, "%d B", (int)size);
+	} else {
+		/* Keep 10 * size / 1000^(3n) in size. */
+		for (size /= 100, shiftcnt = 1; size >= 10000; shiftcnt++)
+			size /= 1000;
+
+		/*
+		 * Figure out what prefix to use.  Since 1 EB = 10^18 B and
+		 * the maximum value of a uint64_t is 2^64 which is roughly
+		 * 18.4 * 10^18, this cannot reference beyond the end of the
+		 * string.
+		 */
+		prefix = " kMGTPE"[shiftcnt];
+
+		/* Construct the string. */
+		if (size < 100)
+			rc = asprintf(&s, "%d.%d %cB", (int)size / 10,
+			    (int)size % 10, prefix);
+		else
+			rc = asprintf(&s, "%d %cB", (int)size / 10, prefix);
+	}
+
+	if (rc == -1) {
+		warnp("asprintf");
+		goto err0;
+	}
+
+	/* Success! */
+	return (s);
+
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * humansize_parse(s, size):
+ * Parse a string matching /[0-9]+ ?[kMGTPE]?B?/ as a size in bytes.
+ */
+int
+humansize_parse(const char * s, uint64_t * size)
+{
+	int state = 0;
+	uint64_t multiplier = 1;
+
+	while (*s != '\0') {
+		switch (state) {
+		case -1:
+			/* Error state. */
+			break;
+		case 0:
+			/* Initial state. */
+			*size = 0;
+
+			/* We must start with at least one digit. */
+			if ((*s < '0') || (*s > '9')) {
+				state = -1;
+				break;
+			}
+
+			/* FALLTHROUGH */
+		case 1:
+			/* We're now processing digits. */
+			state = 1;
+
+			/* Digit-parsing state. */
+			if (('0' <= *s) && (*s <= '9')) {
+				if (*size > UINT64_MAX / 10)
+					state = -1;
+				else
+					*size *= 10;
+				if (*size > UINT64_MAX - (*s - '0'))
+					state = -1;
+				else
+					*size += *s - '0';
+				break;
+			}
+
+			/* FALLTHROUGH */
+		case 2:
+			/* We move into state 3 after an optional ' '. */
+			state = 3;
+			if (*s == ' ')
+				break;
+
+			/* FALLTHROUGH */
+		case 3:
+			/* We may have one SI prefix. */
+			switch (*s) {
+			case 'E':
+				multiplier *= 1000;
+				/* FALLTHROUGH */
+			case 'P':
+				multiplier *= 1000;
+				/* FALLTHROUGH */
+			case 'T':
+				multiplier *= 1000;
+				/* FALLTHROUGH */
+			case 'G':
+				multiplier *= 1000;
+				/* FALLTHROUGH */
+			case 'M':
+				multiplier *= 1000;
+				/* FALLTHROUGH */
+			case 'k':
+				multiplier *= 1000;
+				break;
+			}
+
+			/* We move into state 4 after the optional prefix. */
+			state = 4;
+			if (multiplier != 1)
+				break;
+
+			/* FALLTHROUGH */
+		case 4:
+			/* We move into state 5 after an optional 'B'. */
+			state = 5;
+			if (*s == 'B')
+				break;
+
+			/* FALLTHROUGH */
+		case 5:
+			/* We have trailing garbage. */
+			state = -1;
+			break;
+		}
+
+		/* Move on to the next character. */
+		s++;
+	}
+
+	/* Multiply by multiplier. */
+	if (*size > UINT64_MAX / multiplier)
+		state = -1;
+	else
+		*size *= multiplier;
+
+	/* Anything other than state -1 is success. */
+	return ((state == -1) ? -1 : 0);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/humansize.h tarsnap-autoconf-1.0.34/libcperciva/util/humansize.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/humansize.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/humansize.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,21 @@
+#ifndef _HUMANSIZE_H_
+#define _HUMANSIZE_H_
+
+#include <stdint.h>
+
+/**
+ * humansize(size):
+ * Given a size in bytes, allocate and return a string of the form "<N> B"
+ * for 0 <= N <= 999 or "<X> <prefix>B" where either 10 <= X <= 999 or
+ * 1.0 <= X <= 9.9 and <prefix> is "k", "M", "G", "T", "P", or "E"; and where
+ * the value returned is the largest valid value <= the provided size.
+ */
+char * humansize(uint64_t);
+
+/**
+ * humansize_parse(s, size):
+ * Parse a string matching /[0-9]+ ?[kMGTPE]?B?/ as a size in bytes.
+ */
+int humansize_parse(const char *, uint64_t *);
+
+#endif /* !_HUMANSIZE_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/imalloc.h tarsnap-autoconf-1.0.34/libcperciva/util/imalloc.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/imalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/imalloc.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,33 @@
+#ifndef _IMALLOC_H_
+#define _IMALLOC_H_
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/**
+ * imalloc(nrec, reclen):
+ * Allocate ${nrec} records of length ${reclen}.  Check for size_t overflow.
+ */
+static inline void *
+imalloc(size_t nrec, size_t reclen)
+{
+
+	if (nrec > SIZE_MAX / reclen) {
+		errno = ENOMEM;
+		return (NULL);
+	} else {
+		return (malloc(nrec * reclen));
+	}
+}
+
+/**
+ * IMALLOC(p, nrec, type):
+ * Allocate ${nrec} records of type ${type} and store the pointer in ${p}.
+ * Return non-zero on failure.
+ */
+#define IMALLOC(p, nrec, type)						\
+	((((p) = (type *)imalloc((nrec), sizeof(type))) == NULL) &&	\
+	    ((nrec) > 0))
+
+#endif /* !_IMALLOC_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/monoclock.c tarsnap-autoconf-1.0.34/libcperciva/util/monoclock.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/monoclock.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/monoclock.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,41 @@
+#include <sys/time.h>
+
+#include <time.h>
+
+#include "warnp.h"
+
+#include "monoclock.h"
+
+/**
+ * monoclock_get(tv):
+ * Store the current time in ${tv}.  If CLOCK_MONOTONIC is available, use
+ * that clock; otherwise, use gettimeofday(2).
+ */
+int
+monoclock_get(struct timeval * tv)
+{
+#ifdef CLOCK_MONOTONIC
+	struct timespec tp;
+#endif
+
+#ifdef CLOCK_MONOTONIC
+	if (clock_gettime(CLOCK_MONOTONIC, &tp)) {
+		warnp("clock_gettime(CLOCK_MONOTONIC)");
+		goto err0;
+	}
+	tv->tv_sec = tp.tv_sec;
+	tv->tv_usec = tp.tv_nsec / 1000;
+#else
+	if (gettimeofday(tv, NULL)) {
+		warnp("gettimeofday");
+		goto err0;
+	}
+#endif
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/monoclock.h tarsnap-autoconf-1.0.34/libcperciva/util/monoclock.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/monoclock.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/monoclock.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,13 @@
+#ifndef _MONOCLOCK_H_
+#define _MONOCLOCK_H_
+
+#include <sys/time.h>
+
+/**
+ * monoclock_get(tv):
+ * Store the current time in ${tv}.  If CLOCK_MONOTONIC is available, use
+ * that clock; otherwise, use gettimeofday(2).
+ */
+int monoclock_get(struct timeval *);
+
+#endif /* !_MONOCLOCK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/readpass.c tarsnap-autoconf-1.0.34/libcperciva/util/readpass.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/readpass.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/readpass.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,181 @@
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include "warnp.h"
+
+#include "readpass.h"
+
+#define MAXPASSLEN 2048
+
+/* Signals we need to block. */
+int badsigs[] = {
+	SIGALRM, SIGHUP, SIGINT,
+	SIGPIPE, SIGQUIT, SIGTERM,
+	SIGTSTP, SIGTTIN, SIGTTOU
+};
+#define NSIGS sizeof(badsigs)/sizeof(badsigs[0])
+
+/* Has a signal of this type been received? */
+static volatile sig_atomic_t gotsig[NSIGS];
+
+/* Signal handler. */
+static void
+handle(int sig)
+{
+	size_t i;
+
+	for (i = 0; i < NSIGS; i++) {
+		if (sig == badsigs[i])
+			gotsig[i] = 1;
+	}
+}
+
+/**
+ * readpass(passwd, prompt, confirmprompt, devtty)
+ * If ${devtty} is non-zero, read a password from /dev/tty if possible; if
+ * not, read from stdin.  If reading from a tty (either /dev/tty or stdin),
+ * disable echo and prompt the user by printing ${prompt} to stderr.  If
+ * ${confirmprompt} is non-NULL, read a second password (prompting if a
+ * terminal is being used) and repeat until the user enters the same password
+ * twice.  Return the password as a malloced NUL-terminated string via
+ * ${passwd}.
+ */
+int
+readpass(char ** passwd, const char * prompt,
+    const char * confirmprompt, int devtty)
+{
+	FILE * readfrom;
+	char passbuf[MAXPASSLEN];
+	char confpassbuf[MAXPASSLEN];
+	struct sigaction sa, savedsa[NSIGS];
+	struct termios term, term_old;
+	size_t i;
+	int usingtty;
+
+	/*
+	 * If devtty != 0, try to open /dev/tty; if that fails, or if devtty
+	 * is zero, we'll read the password from stdin instead.
+	 */
+	if ((devtty == 0) || ((readfrom = fopen("/dev/tty", "r")) == NULL))
+		readfrom = stdin;
+
+	/* We have not received any signals yet. */
+	for (i = 0; i < NSIGS; i++)
+		gotsig[i] = 0;
+
+	/*
+	 * If we receive a signal while we're reading the password, we might
+	 * end up with echo disabled; to prevent this, we catch the signals
+	 * here, and we'll re-send them to ourselves later after we re-enable
+	 * terminal echo.
+	 */
+	sa.sa_handler = handle;
+	sa.sa_flags = 0;
+	sigemptyset(&sa.sa_mask);
+	for (i = 0; i < NSIGS; i++)
+		sigaction(badsigs[i], &sa, &savedsa[i]);
+
+	/* If we're reading from a terminal, try to disable echo. */
+	if ((usingtty = isatty(fileno(readfrom))) != 0) {
+		if (tcgetattr(fileno(readfrom), &term_old)) {
+			warnp("Cannot read terminal settings");
+			goto err2;
+		}
+		memcpy(&term, &term_old, sizeof(struct termios));
+		term.c_lflag = (term.c_lflag & ~ECHO) | ECHONL;
+		if (tcsetattr(fileno(readfrom), TCSANOW, &term)) {
+			warnp("Cannot set terminal settings");
+			goto err2;
+		}
+	}
+
+retry:
+	/* If we have a terminal, prompt the user to enter the password. */
+	if (usingtty)
+		fprintf(stderr, "%s: ", prompt);
+
+	/* Read the password. */
+	if (fgets(passbuf, MAXPASSLEN, readfrom) == NULL) {
+		warnp("Cannot read password");
+		goto err3;
+	}
+
+	/* Confirm the password if necessary. */
+	if (confirmprompt != NULL) {
+		if (usingtty)
+			fprintf(stderr, "%s: ", confirmprompt);
+		if (fgets(confpassbuf, MAXPASSLEN, readfrom) == NULL) {
+			warnp("Cannot read password");
+			goto err3;
+		}
+		if (strcmp(passbuf, confpassbuf)) {
+			fprintf(stderr,
+			    "Passwords mismatch, please try again\n");
+			goto retry;
+		}
+	}
+
+	/* Terminate the string at the first "\r" or "\n" (if any). */
+	passbuf[strcspn(passbuf, "\r\n")] = '\0';
+
+	/* If we changed terminal settings, reset them. */
+	if (usingtty)
+		tcsetattr(fileno(readfrom), TCSANOW, &term_old);
+
+	/* Restore old signals. */
+	for (i = 0; i < NSIGS; i++)
+		sigaction(badsigs[i], &savedsa[i], NULL);
+
+	/* If we intercepted a signal, re-issue it. */
+	for (i = 0; i < NSIGS; i++) {
+		if (gotsig[i])
+			raise(badsigs[i]);
+	}
+
+	/* Close /dev/tty if we opened it. */
+	if (readfrom != stdin)
+		fclose(readfrom);
+
+	/* Copy the password out. */
+	if ((*passwd = strdup(passbuf)) == NULL) {
+		warnp("Cannot allocate memory");
+		goto err1;
+	}
+
+	/*
+	 * Zero any stored passwords.  This is not guaranteed to work, since a
+	 * "sufficiently intelligent" compiler can optimize these out due to
+	 * the values not being accessed again; some people try to avoid this
+	 * problem by zeroing buffers via a volatile-casted pointed, but this
+	 * is not sufficient -- it guarantees that *a* buffer is zeroed but
+	 * not that it is the only buffer containing the data in question.
+	 * Unfortunately the C standard does not provide any way to mark data
+	 * as "sensitive" in order to prevent extra copies being sprinkled
+	 * around the implementation address space.
+	 */
+	memset(passbuf, 0, MAXPASSLEN);
+	memset(confpassbuf, 0, MAXPASSLEN);
+
+	/* Success! */
+	return (0);
+
+err3:
+	/* Reset terminal settings if necessary. */
+	if (usingtty)
+		tcsetattr(fileno(readfrom), TCSAFLUSH, &term_old);
+err2:
+	/* Close /dev/tty if we opened it. */
+	if (readfrom != stdin)
+		fclose(readfrom);
+err1:
+	/* Zero any stored passwords. */
+	memset(passbuf, 0, MAXPASSLEN);
+	memset(confpassbuf, 0, MAXPASSLEN);
+
+	/* Failure! */
+	return (-1);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/readpass.h tarsnap-autoconf-1.0.34/libcperciva/util/readpass.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/readpass.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/readpass.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,22 @@
+#ifndef _READPASS_H_
+#define _READPASS_H_
+
+/* Avoid namespace collisions with other "readpass" functions. */
+#ifdef readpass
+#undef readpass
+#endif
+#define readpass libcperciva_readpass
+
+/**
+ * readpass(passwd, prompt, confirmprompt, devtty)
+ * If ${devtty} is non-zero, read a password from /dev/tty if possible; if
+ * not, read from stdin.  If reading from a tty (either /dev/tty or stdin),
+ * disable echo and prompt the user by printing ${prompt} to stderr.  If
+ * ${confirmprompt} is non-NULL, read a second password (prompting if a
+ * terminal is being used) and repeat until the user enters the same password
+ * twice.  Return the password as a malloced NUL-terminated string via
+ * ${passwd}.
+ */
+int readpass(char **, const char *, const char *, int);
+
+#endif /* !_READPASS_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sock.c tarsnap-autoconf-1.0.34/libcperciva/util/sock.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/sock.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sock.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,477 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <netdb.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "imalloc.h"
+#include "warnp.h"
+
+#include "sock.h"
+#include "sock_internal.h"
+
+/* Convert a path into a socket address. */
+static struct sock_addr **
+sock_resolve_unix(const char * addr)
+{
+	struct sock_addr ** sas;
+	struct sock_addr * sa;
+	struct sockaddr_un * sa_un;
+
+	/* Allocate and populate a sockaddr_un structure. */
+	if ((sa_un = malloc(sizeof(struct sockaddr_un))) == NULL)
+		goto err0;
+	memset(sa_un, 0, sizeof(struct sockaddr_un));
+	sa_un->sun_family = AF_UNIX;
+	if (strlen(addr) >= sizeof(sa_un->sun_path)) {
+		warn0("socket path too long: %s", addr);
+		goto err1;
+	}
+	strcpy(sa_un->sun_path, addr);
+
+	/* Allocate and populate our wrapper. */
+	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
+		goto err1;
+	sa->ai_family = AF_UNIX;
+	sa->ai_socktype = SOCK_STREAM;
+	sa->name = (struct sockaddr *)sa_un;
+	sa->namelen = sizeof(struct sockaddr_un);
+
+	/* Allocate and populate an array of pointers. */
+	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
+		goto err2;
+	sas[0] = sa;
+	sas[1] = NULL;
+
+	/* Success! */
+	return (sas);
+
+err2:
+	free(sa);
+err1:
+	free(sa_un);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/* Resolve a host into a list of socket addresses. */
+static struct sock_addr **
+sock_resolve_host(const char * addr, const char * ports)
+{
+	struct addrinfo hints;
+	struct addrinfo * res;
+	struct addrinfo * r;
+	struct sock_addr ** sas;
+	size_t n;
+	int error;
+
+	/* Create hints structure. */
+	memset(&hints, 0, sizeof(hints));
+	hints.ai_family = AF_UNSPEC;
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_protocol = IPPROTO_TCP;
+
+	/* Perform DNS lookup. */
+	if ((error = getaddrinfo(addr, ports, &hints, &res)) != 0) {
+		warn0("Error looking up %s: %s", addr, gai_strerror(error));
+		goto err0;
+	}
+
+	/* Count addresses returned. */
+	for (n = 0, r = res; r != NULL; r = r->ai_next)
+		n++;
+
+	/* Allocate our response array. */
+	if (IMALLOC(sas, n + 1, struct sock_addr *))
+		goto err1;
+
+	/* Create address structures. */
+	for (n = 0, r = res; r != NULL; n++, r = r->ai_next) {
+		/* Allocate a structure. */
+		if ((sas[n] = malloc(sizeof(struct sock_addr))) == NULL)
+			goto err2;
+
+		/* Copy in the address metadata. */
+		sas[n]->ai_family = r->ai_family;
+		sas[n]->ai_socktype = r->ai_socktype;
+		sas[n]->namelen = r->ai_addrlen;
+
+		/* Duplicate the address. */
+		if ((sas[n]->name = malloc(sas[n]->namelen)) == NULL)
+			goto err3;
+		memcpy(sas[n]->name, r->ai_addr, sas[n]->namelen);
+	}
+
+	/* Terminate array with a NULL. */
+	sas[n] = NULL;
+
+	/* Free the linked list of addresses returned by getaddrinfo. */
+	freeaddrinfo(res);
+
+	/* Success! */
+	return (sas);
+
+err3:
+	free(sas[n]);
+err2:
+	for (; n > 0; n--) {
+		free(sas[n - 1]->name);
+		free(sas[n - 1]);
+	}
+	free(sas);
+err1:
+	freeaddrinfo(res);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/* Parse an IPv6 address into a socket address. */
+static struct sock_addr **
+sock_resolve_ipv6(const char * addr, in_port_t p)
+{
+	struct sock_addr ** sas;
+	struct sock_addr * sa;
+	struct sockaddr_in6 * sin6;
+
+	/* Allocate and populate a sockaddr_in6 structure. */
+	if ((sin6 = malloc(sizeof(struct sockaddr_in6))) == NULL)
+		goto err0;
+	memset(sin6, 0, sizeof(struct sockaddr_in6));
+	sin6->sin6_family = AF_INET6;
+	sin6->sin6_port = htons(p);
+	if (inet_pton(AF_INET6, addr, &sin6->sin6_addr) != 1) {
+		warn0("Error parsing IP address: %s", addr);
+		goto err1;
+	}
+
+	/* Allocate and populate our wrapper. */
+	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
+		goto err1;
+	sa->ai_family = AF_INET6;
+	sa->ai_socktype = SOCK_STREAM;
+	sa->name = (struct sockaddr *)sin6;
+	sa->namelen = sizeof(struct sockaddr_in6);
+
+	/* Allocate and populate an array of pointers. */
+	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
+		goto err2;
+	sas[0] = sa;
+	sas[1] = NULL;
+
+	/* Success! */
+	return (sas);
+
+err2:
+	free(sa);
+err1:
+	free(sin6);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/* Parse an IPv4 address into a socket address. */
+static struct sock_addr **
+sock_resolve_ipv4(const char * addr, in_port_t p)
+{
+	struct sock_addr ** sas;
+	struct sock_addr * sa;
+	struct sockaddr_in * sin;
+
+	/* Allocate and populate a sockaddr_in structure. */
+	if ((sin = malloc(sizeof(struct sockaddr_in))) == NULL)
+		goto err0;
+	memset(sin, 0, sizeof(struct sockaddr_in));
+	sin->sin_family = AF_INET;
+	sin->sin_port = htons(p);
+	if (inet_pton(AF_INET, addr, &sin->sin_addr) != 1) {
+		warn0("Error parsing IP address: %s", addr);
+		goto err1;
+	}
+
+	/* Allocate and populate our wrapper. */
+	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
+		goto err1;
+	sa->ai_family = AF_INET;
+	sa->ai_socktype = SOCK_STREAM;
+	sa->name = (struct sockaddr *)sin;
+	sa->namelen = sizeof(struct sockaddr_in);
+
+	/* Allocate and populate an array of pointers. */
+	if ((sas = malloc(2 * sizeof(struct sock_addr *))) == NULL)
+		goto err2;
+	sas[0] = sa;
+	sas[1] = NULL;
+
+	/* Success! */
+	return (sas);
+
+err2:
+	free(sa);
+err1:
+	free(sin);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * sock_resolve(addr):
+ * Return a NULL-terminated array of pointers to sock_addr structures.
+ */
+struct sock_addr **
+sock_resolve(const char * addr)
+{
+	struct sock_addr ** res;
+	char * s;
+	char * ports;
+	char * ips;
+	long p;
+
+	/* If the address starts with '/', it's a unix socket. */
+	if (addr[0] == '/') {
+		res = sock_resolve_unix(addr);
+		goto done;
+	}
+
+	/* Copy the address so that we can mangle it. */
+	if ((s = strdup(addr)) == NULL)
+		goto err0;
+
+	/* The address should end with :port.  Look for the last ':'. */
+	if ((ports = strrchr(s, ':')) == NULL) {
+		warn0("Address must contain port number: %s", s);
+		goto err1;
+	}
+	*ports++ = '\0';
+
+	/* If the address doesn't start with '[', it's a host name. */
+	if (s[0] != '[') {
+		res = sock_resolve_host(s, ports);
+		goto done1;
+	}
+
+	/* The address (sans :port) should end with ']'. */
+	if (s[strlen(s) - 1] != ']') {
+		warn0("Invalid [IP address]: %s", s);
+		goto err1;
+	}
+
+	/* Extract the IP address string. */
+	ips = &s[1];
+	ips[strlen(ips) - 1] = '\0';
+
+	/*
+	 * Parse the port number.  If strtol fails to parse the port number,
+	 * it will return 0; but that's fine since port 0 is invalid anyway.
+	 */
+	p = strtol(ports, NULL, 10);
+	if ((p <= 0) || (p >= 65536)) {
+		warn0("Invalid port number: %s", ports);
+		goto err1;
+	}
+
+	/* If the IP address contains ':', it's IPv6; otherwise, IPv4. */
+	if (strrchr(ips, ':') != NULL)
+		res = sock_resolve_ipv6(ips, p);
+	else
+		res = sock_resolve_ipv4(ips, p);
+
+done1:
+	/* Free string allocated by strdup. */
+	free(s);
+done:
+	/* Return result from sock_resolve_foo. */
+	return (res);
+
+err1:
+	free(s);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * sock_listener(sa):
+ * Create a socket, set SO_REUSEADDR, bind it to the socket address ${sa},
+ * mark it for listening, and mark it as non-blocking.
+ */
+int
+sock_listener(const struct sock_addr * sa)
+{
+	int s;
+	int val = 1;
+
+	/* Create a socket. */
+	if ((s = socket(sa->ai_family, sa->ai_socktype, 0)) == -1) {
+		warnp("socket(%d, %d)", sa->ai_family, sa->ai_socktype);
+		goto err0;
+	}
+
+	/* Set SO_REUSEADDR. */
+	if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val))) {
+		warnp("setsockopt(SO_REUSEADDR)");
+		goto err1;
+	}
+
+	/* Bind the socket. */
+	if (bind(s, sa->name, sa->namelen)) {
+		warnp("error binding socket");
+		goto err1;
+	}
+
+	/* Mark the socket as listening. */
+	if (listen(s, 10)) {
+		warnp("error marking socket as listening");
+		goto err1;
+	}
+
+	/* Make the socket as non-blocking. */
+	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
+		warnp("error marking socket as non-blocking");
+		goto err1;
+	}
+
+	/* Success! */
+	return (s);
+
+err1:
+	close(s);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * sock_connect(sas):
+ * Iterate through the addresses in ${sas}, attempting to create a socket and
+ * connect (blockingly).  Once connected, stop iterating, mark the socket as
+ * non-blocking, and return it.
+ */
+int
+sock_connect(struct sock_addr * const * sas)
+{
+	int s = -1;
+
+	/* Iterate through the addresses provided. */
+	for (; sas[0] != NULL; sas++) {
+		/* Create a socket. */
+		if ((s = socket(sas[0]->ai_family,
+		    sas[0]->ai_socktype, 0)) == -1)
+			continue;
+
+		/* Attempt to connect. */
+		if (connect(s, sas[0]->name, sas[0]->namelen) == 0)
+			break;
+
+		/* Close the socket; this address didn't work. */
+		close(s);
+	}
+
+	/* Did we manage to connect? */
+	if (sas[0] == NULL) {
+		warn0("Could not connect");
+		goto err0;
+	}
+
+	/* Mark the socket as non-blocking. */
+	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
+		warnp("Cannot make connection non-blocking");
+		goto err1;
+	}
+
+	/* Success! */
+	return (s);
+
+err1:
+	close(s);
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * sock_connect_nb(sa):
+ * Create a socket, mark it as non-blocking, and attempt to connect to the
+ * address ${sa}.  Return the socket (connected or in the process of
+ * connecting) or -1 on error.
+ */
+int
+sock_connect_nb(const struct sock_addr * sa)
+{
+	int s;
+
+	/* Create a socket. */
+	if ((s = socket(sa->ai_family, sa->ai_socktype, 0)) == -1)
+		goto err0;
+
+	/* Mark the socket as non-blocking. */
+	if (fcntl(s, F_SETFL, O_NONBLOCK) == -1) {
+		warnp("Cannot make socket non-blocking");
+		goto err1;
+	}
+
+	/* Attempt to connect. */
+	if ((connect(s, sa->name, sa->namelen) == -1) &&
+	    (errno != EINPROGRESS) &&
+	    (errno == EINTR))
+		goto err1;
+
+	/* We have a connect(ed|ing) socket. */
+	return (s);
+
+err1:
+	close(s);
+err0:
+	/* We failed to connect to this address. */
+	return (-1);
+}
+
+/**
+ * sock_addr_free(sa):
+ * Free the provided sock_addr structure.
+ */
+void
+sock_addr_free(struct sock_addr * sa)
+{
+
+	/* Compatibility with free(NULL). */
+	if (sa == NULL)
+		return;
+
+	/* Free the protocol-specific address structure and our struct. */
+	free(sa->name);
+	free(sa);
+}
+
+/**
+ * sock_addr_freelist(sas):
+ * Free the provided NULL-terminated array of sock_addr structures.
+ */
+void
+sock_addr_freelist(struct sock_addr ** sas)
+{
+	struct sock_addr ** p;
+
+	/* Compatibility with free(NULL). */
+	if (sas == NULL)
+		return;
+
+	/* Free structures until we hit NULL. */
+	for (p = sas; *p != NULL; p++)
+		sock_addr_free(*p);
+
+	/* Free the list. */
+	free(sas);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sock.h tarsnap-autoconf-1.0.34/libcperciva/util/sock.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/sock.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sock.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,56 @@
+#ifndef _SOCK_H_
+#define _SOCK_H_
+
+/**
+ * Address strings are of the following forms:
+ * /path/to/unix/socket
+ * [ip.v4.ad.dr]:port
+ * [ipv6:add::ress]:port
+ * host.name:port
+ */
+
+/* Opaque address structure. */
+struct sock_addr;
+
+/**
+ * sock_resolve(addr):
+ * Return a NULL-terminated array of pointers to sock_addr structures.
+ */
+struct sock_addr ** sock_resolve(const char *);
+
+/**
+ * sock_listener(sa):
+ * Create a socket, set SO_REUSEADDR, bind it to the socket address ${sa},
+ * mark it for listening, and mark it as non-blocking.
+ */
+int sock_listener(const struct sock_addr *);
+
+/**
+ * sock_connect(sas):
+ * Iterate through the addresses in ${sas}, attempting to create a socket and
+ * connect (blockingly).  Once connected, stop iterating, mark the socket as
+ * non-blocking, and return it.
+ */
+int sock_connect(struct sock_addr * const *);
+
+/**
+ * sock_connect_nb(sa):
+ * Create a socket, mark it as non-blocking, and attempt to connect to the
+ * address ${sa}.  Return the socket (connected or in the process of
+ * connecting) or -1 on error.
+ */
+int sock_connect_nb(const struct sock_addr *);
+
+/**
+ * sock_addr_free(sa):
+ * Free the provided sock_addr structure.
+ */
+void sock_addr_free(struct sock_addr *);
+
+/**
+ * sock_addr_freelist(sas):
+ * Free the provided NULL-terminated array of sock_addr structures.
+ */
+void sock_addr_freelist(struct sock_addr **);
+
+#endif /* !_SOCK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sock_internal.h tarsnap-autoconf-1.0.34/libcperciva/util/sock_internal.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/sock_internal.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sock_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,14 @@
+#ifndef _SOCK_INTERNAL_H_
+#define _SOCK_INTERNAL_H_
+
+#include <sys/socket.h>
+
+/* Socket address structure. */
+struct sock_addr {
+	int ai_family;
+	int ai_socktype;
+	struct sockaddr * name;
+	socklen_t namelen;
+};
+
+#endif /* !_SOCK_INTERNAL_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sock_util.c tarsnap-autoconf-1.0.34/libcperciva/util/sock_util.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/sock_util.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sock_util.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,258 @@
+#include <sys/socket.h>
+#include <sys/un.h>
+
+#include <netinet/in.h>
+
+#include <arpa/inet.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "asprintf.h"
+#include "sock.h"
+
+#include "sock_util.h"
+#include "sock_internal.h"
+
+/**
+ * sock_addr_cmp(sa1, sa2):
+ * Return non-zero iff the socket addresses ${sa1} and ${sa2} are different.
+ */
+int
+sock_addr_cmp(const struct sock_addr * sa1, const struct sock_addr * sa2)
+{
+
+	/* Family, socket type, and name length must match. */
+	if ((sa1->ai_family != sa2->ai_family) ||
+	    (sa1->ai_socktype != sa2->ai_socktype) ||
+	    (sa1->namelen != sa2->namelen))
+		return (1);
+
+	/* The required length of the sockaddr must match. */
+	if (memcmp(sa1->name, sa2->name, sa1->namelen) != 0)
+		return (1);
+
+	/* Everything matched. */
+	return (0);
+}
+
+/**
+ * sock_addr_dup(sa):
+ * Duplicate the provided socket address.
+ */
+struct sock_addr *
+sock_addr_dup(const struct sock_addr * sa)
+{
+	struct sock_addr * sa2;
+
+	/* Allocate a struct sock_addr and copy fields. */
+	if ((sa2 = malloc(sizeof(struct sock_addr))) == NULL)
+		goto err0;
+	sa2->ai_family = sa->ai_family;
+	sa2->ai_socktype = sa->ai_socktype;
+	sa2->namelen = sa->namelen;
+
+	/* Allocate and copy the sockaddr. */
+	if ((sa2->name = malloc(sa2->namelen)) == NULL)
+		goto err1;
+	memcpy(sa2->name, sa->name, sa2->namelen);
+
+	/* Success! */
+	return (sa2);
+
+err1:
+	free(sa2);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * sock_addr_duplist(sas):
+ * Duplicate the provided list of socket addresses.
+ */
+struct sock_addr **
+sock_addr_duplist(struct sock_addr * const * sas)
+{
+	struct sock_addr ** sas2;
+	size_t i;
+
+	/* Count socket addresses. */
+	for (i = 0; sas[i] != NULL; i++)
+		continue;
+
+	/* Allocate the list to hold addresses plus a NULL terminator. */
+	if ((sas2 = malloc((i + 1) * sizeof(struct sock_addr *))) == NULL)
+		goto err0;
+
+	/* Fill the list with NULLs to make error-path cleanup simpler. */
+	for (i = 0; sas[i] != NULL; i++)
+		sas2[i] = NULL;
+	sas2[i] = NULL;
+
+	/* Duplicate addresses. */
+	for (i = 0; sas[i] != NULL; i++) {
+		if ((sas2[i] = sock_addr_dup(sas[i])) == NULL)
+			goto err1;
+	}
+
+	/* Success! */
+	return (sas2);
+
+err1:
+	/*
+	 * Regardless of how many addresses we managed to duplicate before
+	 * failing and being sent here, we have a valid socket address list,
+	 * so we can free it and its constituent addresses easily.
+	 */
+	sock_addr_freelist(sas2);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/**
+ * sock_addr_serialize(sa, buf, buflen):
+ * Allocate a buffer and serialize the socket address ${sa} into it.  Return
+ * the buffer via ${buf} and its length via ${buflen}.  The serialization is
+ * machine and operating system dependent.
+ */
+int
+sock_addr_serialize(const struct sock_addr * sa,
+    uint8_t ** buf, size_t * buflen)
+{
+	uint8_t * p;
+
+	/* Compute buffer length and allocate buffer. */
+	*buflen = 2 * sizeof(int) + sizeof(socklen_t) + sa->namelen;
+	if ((p = *buf = malloc(*buflen)) == NULL)
+		goto err0;
+
+	/* Copy in data. */
+	memcpy(p, &sa->ai_family, sizeof(int));
+	p += sizeof(int);
+	memcpy(p, &sa->ai_socktype, sizeof(int));
+	p += sizeof(int);
+	memcpy(p, &sa->namelen, sizeof(socklen_t));
+	p += sizeof(socklen_t);
+	memcpy(p, sa->name, sa->namelen);
+
+	/* Success! */
+	return (0);
+
+err0:
+	/* Failure! */
+	return (-1);
+}
+
+/**
+ * sock_addr_deserialize(buf, buflen):
+ * Deserialize the ${buflen}-byte serialized socket address from ${buf}.
+ */
+struct sock_addr *
+sock_addr_deserialize(const uint8_t * buf, size_t buflen)
+{
+	struct sock_addr * sa;
+
+	/* Sanity check. */
+	if (buflen < 2 * sizeof(int) + sizeof(socklen_t))
+		goto err0;
+
+	/* Allocate a structure and copy in fields. */
+	if ((sa = malloc(sizeof(struct sock_addr))) == NULL)
+		goto err0;
+	memcpy(&sa->ai_family, buf, sizeof(int));
+	buf += sizeof(int);
+	memcpy(&sa->ai_socktype, buf, sizeof(int));
+	buf += sizeof(int);
+	memcpy(&sa->namelen, buf, sizeof(socklen_t));
+	buf += sizeof(socklen_t);
+
+	/* Allocate and copy the sockaddr. */
+	if (buflen != 2 * sizeof(int) + sizeof(socklen_t) + sa->namelen)
+		goto err1;
+	if ((sa->name = malloc(sa->namelen)) == NULL)
+		goto err1;
+	memcpy(sa->name, buf, sa->namelen);
+
+	/* Success! */
+	return (sa);
+
+err1:
+	free(sa);
+err0:
+	/* Failure! */
+	return (NULL);
+}
+
+/* Prettyprint an IPv4 address. */
+static char *
+prettyprint_ipv4(struct sockaddr_in * name)
+{
+	char addr[INET_ADDRSTRLEN];
+	char * s;
+
+	/* Convert IP address to string. */
+	if (inet_ntop(AF_INET, &name->sin_addr, addr, sizeof(addr)) == NULL)
+		return (NULL);
+
+	/* Construct address string. */
+	if (asprintf(&s, "[%s]:%d", addr, ntohs(name->sin_port)) == -1)
+		return (NULL);
+
+	/* Success! */
+	return (s);
+}
+
+/* Prettyprint an IPv6 address. */
+static char *
+prettyprint_ipv6(struct sockaddr_in6 * name)
+{
+	char addr[INET6_ADDRSTRLEN];
+	char * s;
+
+	/* Convert IPv6 address to string. */
+	if (inet_ntop(AF_INET6, &name->sin6_addr, addr, sizeof(addr)) == NULL)
+		return (NULL);
+
+	/* Construct address string. */
+	if (asprintf(&s, "[%s]:%d", addr, ntohs(name->sin6_port)) == -1)
+		return (NULL);
+
+	/* Success! */
+	return (s);
+}
+
+/* Prettyprint a UNIX address. */
+static char *
+prettyprint_unix(struct sockaddr_un * name)
+{
+
+	/* Just strdup the path. */
+	return (strdup(name->sun_path));
+}
+
+/**
+ * sock_addr_prettyprint(sa):
+ * Allocate and return a string in one of the forms
+ * /path/to/unix/socket
+ * [ip.v4.ad.dr]:port
+ * [ipv6:add::ress]:port
+ * representing the provided socket address.
+ */
+char *
+sock_addr_prettyprint(const struct sock_addr * sa)
+{
+
+	/* Handle different types of addresses differently. */
+	switch (sa->ai_family) {
+	case AF_INET:
+		return (prettyprint_ipv4((struct sockaddr_in *)(sa->name)));
+	case AF_INET6:
+		return (prettyprint_ipv6((struct sockaddr_in6 *)(sa->name)));
+	case AF_UNIX:
+		return (prettyprint_unix((struct sockaddr_un *)(sa->name)));
+	default:
+		return (strdup("Unknown address"));
+	}
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sock_util.h tarsnap-autoconf-1.0.34/libcperciva/util/sock_util.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/sock_util.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sock_util.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,51 @@
+#ifndef _SOCK_UTIL_H_
+#define _SOCK_UTIL_H_
+
+#include <stdint.h>
+
+/* Opaque address structure. */
+struct sock_addr;
+
+/**
+ * sock_addr_cmp(sa1, sa2):
+ * Return non-zero iff the socket addresses ${sa1} and ${sa2} are different.
+ */
+int sock_addr_cmp(const struct sock_addr *, const struct sock_addr *);
+
+/**
+ * sock_addr_dup(sa):
+ * Duplicate the provided socket address.
+ */
+struct sock_addr * sock_addr_dup(const struct sock_addr *);
+
+/**
+ * sock_addr_duplist(sas):
+ * Duplicate the provided list of socket addresses.
+ */
+struct sock_addr ** sock_addr_duplist(struct sock_addr * const *);
+
+/**
+ * sock_addr_serialize(sa, buf, buflen):
+ * Allocate a buffer and serialize the socket address ${sa} into it.  Return
+ * the buffer via ${buf} and its length via ${buflen}.  The serialization is
+ * machine and operating system dependent.
+ */
+int sock_addr_serialize(const struct sock_addr *, uint8_t **, size_t *);
+
+/**
+ * sock_addr_deserialize(buf, buflen):
+ * Deserialize the ${buflen}-byte serialized socket address from ${buf}.
+ */
+struct sock_addr * sock_addr_deserialize(const uint8_t *, size_t);
+
+/**
+ * sock_addr_prettyprint(sa):
+ * Allocate and return a string in one of the forms
+ * /path/to/unix/socket
+ * [ip.v4.ad.dr]:port
+ * [ipv6:add::ress]:port
+ * representing the provided socket address.
+ */
+char * sock_addr_prettyprint(const struct sock_addr *);
+
+#endif /* !_SOCK_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/sysendian.h tarsnap-autoconf-1.0.34/libcperciva/util/sysendian.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/sysendian.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/sysendian.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,146 @@
+#ifndef _SYSENDIAN_H_
+#define _SYSENDIAN_H_
+
+#include <stdint.h>
+
+/* Avoid namespace collisions with BSD <sys/endian.h>. */
+#define be16dec libcperciva_be16dec
+#define be16enc libcperciva_be16enc
+#define be32dec libcperciva_be32dec
+#define be32enc libcperciva_be32enc
+#define be64dec libcperciva_be64dec
+#define be64enc libcperciva_be64enc
+#define le16dec libcperciva_le16dec
+#define le16enc libcperciva_le16enc
+#define le32dec libcperciva_le32dec
+#define le32enc libcperciva_le32enc
+#define le64dec libcperciva_le64dec
+#define le64enc libcperciva_le64enc
+
+static inline uint16_t
+be16dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint16_t)(p[1]) + ((uint16_t)(p[0]) << 8));
+}
+
+static inline void
+be16enc(void *pp, uint16_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[1] = x & 0xff;
+	p[0] = (x >> 8) & 0xff;
+}
+
+static inline uint32_t
+be32dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
+	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
+}
+
+static inline void
+be32enc(void *pp, uint32_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[3] = x & 0xff;
+	p[2] = (x >> 8) & 0xff;
+	p[1] = (x >> 16) & 0xff;
+	p[0] = (x >> 24) & 0xff;
+}
+
+static inline uint64_t
+be64dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint64_t)(p[7]) + ((uint64_t)(p[6]) << 8) +
+	    ((uint64_t)(p[5]) << 16) + ((uint64_t)(p[4]) << 24) +
+	    ((uint64_t)(p[3]) << 32) + ((uint64_t)(p[2]) << 40) +
+	    ((uint64_t)(p[1]) << 48) + ((uint64_t)(p[0]) << 56));
+}
+
+static inline void
+be64enc(void *pp, uint64_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[7] = x & 0xff;
+	p[6] = (x >> 8) & 0xff;
+	p[5] = (x >> 16) & 0xff;
+	p[4] = (x >> 24) & 0xff;
+	p[3] = (x >> 32) & 0xff;
+	p[2] = (x >> 40) & 0xff;
+	p[1] = (x >> 48) & 0xff;
+	p[0] = (x >> 56) & 0xff;
+}
+
+static inline uint16_t
+le16dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint16_t)(p[0]) + ((uint16_t)(p[1]) << 8));
+}
+
+static inline void
+le16enc(void *pp, uint16_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[0] = x & 0xff;
+	p[1] = (x >> 8) & 0xff;
+}
+
+static inline uint32_t
+le32dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
+	    ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
+}
+
+static inline void
+le32enc(void *pp, uint32_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[0] = x & 0xff;
+	p[1] = (x >> 8) & 0xff;
+	p[2] = (x >> 16) & 0xff;
+	p[3] = (x >> 24) & 0xff;
+}
+
+static inline uint64_t
+le64dec(const void *pp)
+{
+	const uint8_t *p = (uint8_t const *)pp;
+
+	return ((uint64_t)(p[0]) + ((uint64_t)(p[1]) << 8) +
+	    ((uint64_t)(p[2]) << 16) + ((uint64_t)(p[3]) << 24) +
+	    ((uint64_t)(p[4]) << 32) + ((uint64_t)(p[5]) << 40) +
+	    ((uint64_t)(p[6]) << 48) + ((uint64_t)(p[7]) << 56));
+}
+
+static inline void
+le64enc(void *pp, uint64_t x)
+{
+	uint8_t * p = (uint8_t *)pp;
+
+	p[0] = x & 0xff;
+	p[1] = (x >> 8) & 0xff;
+	p[2] = (x >> 16) & 0xff;
+	p[3] = (x >> 24) & 0xff;
+	p[4] = (x >> 32) & 0xff;
+	p[5] = (x >> 40) & 0xff;
+	p[6] = (x >> 48) & 0xff;
+	p[7] = (x >> 56) & 0xff;
+}
+
+#endif /* !_SYSENDIAN_H_ */
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/warnp.c tarsnap-autoconf-1.0.34/libcperciva/util/warnp.c
--- tarsnap-autoconf-1.0.33/libcperciva/util/warnp.c	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/warnp.c	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,76 @@
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "warnp.h"
+
+static int initialized = 0;
+static char * name = NULL;
+
+/* Free the name string. */
+static void
+done(void)
+{
+
+	free(name);
+	name = NULL;
+}
+
+/**
+ * warnp_setprogname(progname):
+ * Set the program name to be used by warn() and warnx() to ${progname}.
+ */
+void
+warnp_setprogname(const char * progname)
+{
+	const char * p;
+
+	/* Free the name if we already have one. */
+	free(name);
+
+	/* Find the last segment of the program name. */
+	for (p = progname; progname[0] != '\0'; progname++)
+		if (progname[0] == '/')
+			p = progname + 1;
+
+	/* Copy the name string. */
+	name = strdup(p);
+
+	/* If we haven't already done so, register our exit handler. */
+	if (initialized == 0) {
+		atexit(done);
+		initialized = 1;
+	}
+}
+
+void
+warn(const char * fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	fprintf(stderr, "%s", (name != NULL) ? name : "(unknown)");
+	if (fmt != NULL) {
+		fprintf(stderr, ": ");
+		vfprintf(stderr, fmt, ap);
+	}
+	fprintf(stderr, ": %s\n", strerror(errno));
+	va_end(ap);
+}
+
+void
+warnx(const char * fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	fprintf(stderr, "%s", (name != NULL) ? name : "(unknown)");
+	if (fmt != NULL) {
+		fprintf(stderr, ": ");
+		vfprintf(stderr, fmt, ap);
+	}
+	fprintf(stderr, "\n");
+	va_end(ap);
+}
diff -ruN tarsnap-autoconf-1.0.33/libcperciva/util/warnp.h tarsnap-autoconf-1.0.34/libcperciva/util/warnp.h
--- tarsnap-autoconf-1.0.33/libcperciva/util/warnp.h	1969-12-31 16:00:00.000000000 -0800
+++ tarsnap-autoconf-1.0.34/libcperciva/util/warnp.h	2013-07-06 14:38:21.000000000 -0700
@@ -0,0 +1,59 @@
+#ifndef _WARNP_H_
+#define _WARNP_H_
+
+#include <errno.h>
+
+/* Avoid namespace collisions with BSD <err.h>. */
+#define warn libcperciva_warn
+#define warnx libcperciva_warnx
+
+/**
+ * warnp_setprogname(progname):
+ * Set the program name to be used by warn() and warnx() to ${progname}.
+ */
+void warnp_setprogname(const char *);
+#define WARNP_INIT	do {		\
+	if (argv[0] != NULL)		\
+		warnp_setprogname(argv[0]);	\
+} while (0)
+
+/* As in BSD <err.h>. */
+void warn(const char *, ...);
+void warnx(const char *, ...);
+
+/*
+ * If compiled with DEBUG defined, print __FILE__ and __LINE__.
+ */
+#ifdef DEBUG
+#define warnline	do {				\
+	warnx("%s, %d", __FILE__, __LINE__);	\
+} while (0)
+#else
+#define warnline
+#endif
+
+/*
+ * Call warn(3) or warnx(3) depending upon whether errno == 0; and clear
+ * errno (so that the standard error message isn't repeated later).
+ */
+#define	warnp(...) do {					\
+	warnline;					\
+	if (errno != 0) {				\
+		warn(__VA_ARGS__);		\
+		errno = 0;				\
+	} else						\
+		warnx(__VA_ARGS__);		\
+} while (0)
+
+/*
+ * Call warnx(3) and set errno == 0.  Unlike warnp, this should be used
+ * in cases where we're reporting a problem which we discover ourselves
+ * rather than one which is reported to us from a library or the kernel.
+ */
+#define warn0(...) do {					\
+	warnline;					\
+	warnx(__VA_ARGS__);			\
+	errno = 0;					\
+} while (0)
+
+#endif /* !_WARNP_H_ */
diff -ruN tarsnap-autoconf-1.0.33/pkg/debian/changelog tarsnap-autoconf-1.0.34/pkg/debian/changelog
--- tarsnap-autoconf-1.0.33/pkg/debian/changelog	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/pkg/debian/changelog	2013-07-06 14:38:21.000000000 -0700
@@ -1,3 +1,16 @@
+tarsnap (1.0.34) unstable; urgency=low
+
+  * New version of tarsnap brings IPv6 support; support for platforms with
+    mandatory struct alignment (e.g., ARM OABI); and greater resilience
+    against network glitches when tarsnap first contacts the server.
+  * A bug causing tarsnap to crash when reading certain corrupt key files
+    on 64-bit platforms is fixed.
+  * Terminal settings are now restored if tarsnap is killed with ^C while
+    reading an account password or a keyfile passphrase.
+  * A large amount of library code has been restructured into an open
+    source "libcperciva" library.
+
+ -- Colin Percival <cperciva@tarsnap.com>  Say, 6 Jul 2013 21:33:46 +0000
 tarsnap (1.0.33) unstable; urgency=low
 
   * New version of tarsnap brings reduced memory usage on systems with a
@@ -5,7 +18,7 @@
     deleting or printing statistics for multiple archives; and corrects
     a bug in the handling of the --newerXXX option.
 
- -- Colin Percival <cperciva@tarsnap.com>  Wed, 1 Aug 2002 23:52:10 +0000
+ -- Colin Percival <cperciva@tarsnap.com>  Wed, 1 Aug 2012 23:52:10 +0000
 tarsnap (1.0.32) unstable; urgency=low
 
   * New version of tarsnap fixes a bug which made the --nodump option
diff -ruN tarsnap-autoconf-1.0.33/pkg/debian/copyright tarsnap-autoconf-1.0.34/pkg/debian/copyright
--- tarsnap-autoconf-1.0.33/pkg/debian/copyright	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/pkg/debian/copyright	2013-07-06 14:38:21.000000000 -0700
@@ -11,7 +11,7 @@
 Unless specified otherwise in individual files, the contents of this
 package is covered by the following copyright, license, and disclaimer:
 
-Copyright 2006, 2007, 2008, 2009, 2010, 2011 Colin Percival
+Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Colin Percival
 All rights reserved.
 
 Redistribution and use in source and binary forms, without modification,
diff -ruN tarsnap-autoconf-1.0.33/pkg/debian/rules tarsnap-autoconf-1.0.34/pkg/debian/rules
--- tarsnap-autoconf-1.0.33/pkg/debian/rules	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/pkg/debian/rules	2013-07-06 14:38:21.000000000 -0700
@@ -29,7 +29,7 @@
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp 
+	rm -f build-stamp
 
 	-$(MAKE) clean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
@@ -39,12 +39,12 @@
 	cp -f /usr/share/misc/config.guess config.guess
 endif
 
-	dh_clean 
+	dh_clean
 
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k 
+	dh_clean -k
 	dh_installdirs
 	
 	$(MAKE) prefix=$(CURDIR)/debian/tarsnap/usr sysconfdir=$(CURDIR)/debian/tarsnap/etc install
@@ -60,7 +60,7 @@
 binary-arch: build install
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs 
+	dh_installchangelogs
 	dh_installdocs
 	dh_installexamples
 	dh_install
@@ -77,4 +77,4 @@
 	dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+.PHONY: build clean binary-indep binary-arch binary install
diff -ruN tarsnap-autoconf-1.0.33/recrypt/recrypt.c tarsnap-autoconf-1.0.34/recrypt/recrypt.c
--- tarsnap-autoconf-1.0.33/recrypt/recrypt.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/recrypt/recrypt.c	2013-07-06 14:38:21.000000000 -0700
@@ -11,7 +11,7 @@
 #include "keyfile.h"
 #include "multitape_internal.h"
 #include "storage.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "tarsnap_opt.h"
 #include "warnp.h"
 
@@ -428,29 +428,17 @@
 	char *odirpath, *ndirpath;
 	FILE *odir, *ndir;
 
-#ifdef NEED_WARN_PROGNAME
-	warn_progname = "tarsnap-recrypt";
-#endif
+	WARNP_INIT;
 
 	/* Attempt to avoid buffering stdout since we print progress msgs. */
 	setvbuf(stdout, NULL, _IONBF, 0);
 
-	/* Initialize entropy subsystem. */
-	if (crypto_entropy_init()) {
-		warnp("Entropy subsystem initialization failed");
-		exit(1);
-	}
-
 	/* Initialize key cache. */
 	if (crypto_keys_init()) {
 		warnp("Key cache initialization failed");
 		exit(1);
 	}
 
-	/* Initialize network layer. */
-	if (network_init())
-		exit(1);
-
 	/* No options yet. */
 	ocachedir = ncachedir = NULL;
 	okeyfile = nkeyfile = NULL;
diff -ruN tarsnap-autoconf-1.0.33/tar/bsdtar.c tarsnap-autoconf-1.0.34/tar/bsdtar.c
--- tarsnap-autoconf-1.0.33/tar/bsdtar.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/bsdtar.c	2013-07-06 14:38:21.000000000 -0700
@@ -79,7 +79,7 @@
 #include "crypto.h"
 #include "keyfile.h"
 #include "humansize.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "tarsnap_opt.h"
 #include "warnp.h"
 
@@ -136,6 +136,8 @@
 	time_t			 now;
 	size_t 			 i;
 
+	WARNP_INIT;
+
 	/*
 	 * Use a pointer for consistency, but stack-allocated storage
 	 * for ease of cleanup.
@@ -163,9 +165,6 @@
 		else
 			bsdtar->progname = *argv;
 	}
-#ifdef NEED_WARN_PROGNAME
-	warn_progname = bsdtar->progname;
-#endif
 
 	/* We don't have a machine # yet. */
 	bsdtar->machinenum = (uint64_t)(-1);
@@ -189,18 +188,10 @@
 #endif
 	possible_help_request = 0;
 
-	/* Initialize entropy subsystem. */
-	if (crypto_entropy_init())
-		exit(1);
-
 	/* Initialize key cache.  We don't have any keys yet. */
 	if (crypto_keys_init())
 		exit(1);
 
-	/* Initialize network layer. */
-	if (network_init())
-		exit(1);
-
 	/*
 	 * Make stdout line-buffered (if possible) so that operations such as
 	 * "tarsnap --list-archives | more" will run more smoothly.  The only
@@ -554,7 +545,7 @@
 			add_substitution(bsdtar, bsdtar->optarg);
 #else
 			bsdtar_warnc(bsdtar, 0,
-			    "-s is not supported by this version of bsdtar");
+			    "-s is not supported by this version of tarsnap");
 			usage(bsdtar);
 #endif
 			break;
@@ -732,7 +723,10 @@
 	    (bsdtar->mode != OPTION_PRINT_STATS))
 		only_mode(bsdtar, "-f", "cxtdr");
 
-	/* These options don't make sense for "delete" and "convert to tar" */
+	/*
+	 * These options don't make sense for the "delete" and "convert to
+	 * tar" modes.
+	 */
 	if (bsdtar->pending_chdir)
 		only_mode(bsdtar, "-C", "cxt");
 	if (bsdtar->names_from_file)
@@ -1024,8 +1018,8 @@
 
 	fflush(stderr);
 
-	p = (strcmp(prog,"tarsnap") != 0) ? "(tarsnap)" : "";
-	printf("%s%s: efficiently manipulate multiple archives\n", prog, p);
+	p = (strcmp(prog, "tarsnap") != 0) ? "(tarsnap)" : "";
+	printf("%s%s: create and manipulate archives on the Tarsnap backup service\n", prog, p);
 
 	for (p = long_help_msg; *p != '\0'; p++) {
 		if (*p == '%') {
diff -ruN tarsnap-autoconf-1.0.33/tar/ccache/ccache_entry.c tarsnap-autoconf-1.0.34/tar/ccache/ccache_entry.c
--- tarsnap-autoconf-1.0.33/tar/ccache/ccache_entry.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/ccache/ccache_entry.c	2013-07-06 14:38:21.000000000 -0700
@@ -12,7 +12,7 @@
 #include "crypto.h"
 #include "multitape.h"
 #include "multitape_internal.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "patricia.h"
 #include "sysendian.h"
 #include "warnp.h"
@@ -24,12 +24,12 @@
 	struct ccache_internal * cci;	/* Cache data structure. */
 	struct ccache_record * ccr;	/* Actual cache entry. */
 	struct ccache_record ** ccrp;	/* Pointer to pointer in tree. */
-	int	hittrailer;		/* Non-zero if the multitape layer */
+	int hittrailer;			/* Non-zero if the multitape layer */
 					/* has told us about a trailer. */
-	uint8_t *	trailer;	/* Uncompressed trailer. */
-	ino_t	ino_new;		/* New inode number. */
-	off_t	size_new;		/* New file size. */
-	time_t	mtime_new;		/* New modification time. */
+	uint8_t * trailer;		/* Uncompressed trailer. */
+	ino_t ino_new;			/* New inode number. */
+	off_t size_new;			/* New file size. */
+	time_t mtime_new;		/* New modification time. */
 };
 
 static int callback_addchunk(void *, struct chunkheader *);
diff -ruN tarsnap-autoconf-1.0.33/tar/ccache/ccache_write.c tarsnap-autoconf-1.0.34/tar/ccache/ccache_write.c
--- tarsnap-autoconf-1.0.33/tar/ccache/ccache_write.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/ccache/ccache_write.c	2013-07-06 14:38:21.000000000 -0700
@@ -263,4 +263,3 @@
 	/* Failure! */
 	return (-1);
 }
-
diff -ruN tarsnap-autoconf-1.0.33/tar/config_freebsd.h tarsnap-autoconf-1.0.34/tar/config_freebsd.h
--- tarsnap-autoconf-1.0.33/tar/config_freebsd.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/config_freebsd.h	2013-07-06 14:38:21.000000000 -0700
@@ -56,7 +56,6 @@
 #define	HAVE_FNMATCH_H 1
 #define	HAVE_FNM_LEADING_DIR 1
 #define	HAVE_FTRUNCATE 1
-#define	HAVE_GETADDRINFO 1
 #undef	HAVE_GETXATTR
 #define	HAVE_GRP_H 1
 #define	HAVE_INTTYPES_H 1
diff -ruN tarsnap-autoconf-1.0.33/tar/glue/archive_multitape.c tarsnap-autoconf-1.0.34/tar/glue/archive_multitape.c
--- tarsnap-autoconf-1.0.33/tar/glue/archive_multitape.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/glue/archive_multitape.c	2013-07-06 14:38:21.000000000 -0700
@@ -4,7 +4,7 @@
 
 #include "archive.h"
 #include "multitape.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "warnp.h"
 
 #include "archive_multitape.h"
diff -ruN tarsnap-autoconf-1.0.33/tar/multitape/chunkify.c tarsnap-autoconf-1.0.34/tar/multitape/chunkify.c
--- tarsnap-autoconf-1.0.33/tar/multitape/chunkify.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/multitape/chunkify.c	2013-07-06 14:38:21.000000000 -0700
@@ -339,7 +339,7 @@
 		c->yka -= c->p & (((c->yka - c->p) >> 31) - 1);
 
 		/* a^k := a^k * alpha mod p */
-		/* akr <= p * 2^32 / (2^32 - p)) */
+		/* akr <= p * 2^32 / (2^32 - p) */
 		c->akr = mmul(c->akr, c->ar, c->p, c->pp);
 
 		/*
diff -ruN tarsnap-autoconf-1.0.33/tar/multitape/multitape_internal.h tarsnap-autoconf-1.0.34/tar/multitape/multitape_internal.h
--- tarsnap-autoconf-1.0.33/tar/multitape/multitape_internal.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/multitape/multitape_internal.h	2013-07-06 14:38:21.000000000 -0700
@@ -4,6 +4,7 @@
 #include <stdint.h>
 
 #include "chunks.h"
+#include "ctassert.h"
 #include "storage.h"
 
 /* On-disk chunk header structure.  Integers are little-endian. */
@@ -12,6 +13,7 @@
 	uint8_t len[4];
 	uint8_t zlen[4];
 };
+CTASSERT(sizeof(struct chunkheader) == 40);
 
 /* On-disk entry header structure. */
 struct entryheader {
@@ -19,6 +21,7 @@
 	uint8_t clen[8];
 	uint8_t tlen[4];
 };
+CTASSERT(sizeof(struct entryheader) == 16);
 
 /* Archive metadata structure. */
 struct tapemetadata {
diff -ruN tarsnap-autoconf-1.0.33/tar/multitape/multitape_metadata.c tarsnap-autoconf-1.0.34/tar/multitape/multitape_metadata.c
--- tarsnap-autoconf-1.0.33/tar/multitape/multitape_metadata.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/multitape/multitape_metadata.c	2013-07-06 14:38:21.000000000 -0700
@@ -7,6 +7,7 @@
 #include <string.h>
 
 #include "crypto.h"
+#include "crypto_verify_bytes.h"
 #include "storage.h"
 #include "sysendian.h"
 #include "warnp.h"
diff -ruN tarsnap-autoconf-1.0.33/tar/multitape/multitape_metaindex.c tarsnap-autoconf-1.0.34/tar/multitape/multitape_metaindex.c
--- tarsnap-autoconf-1.0.33/tar/multitape/multitape_metaindex.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/multitape/multitape_metaindex.c	2013-07-06 14:38:21.000000000 -0700
@@ -6,6 +6,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "crypto.h"
+#include "crypto_verify_bytes.h"
 #include "sysendian.h"
 #include "warnp.h"
 
diff -ruN tarsnap-autoconf-1.0.33/tar/multitape/multitape_transaction.c tarsnap-autoconf-1.0.34/tar/multitape/multitape_transaction.c
--- tarsnap-autoconf-1.0.33/tar/multitape/multitape_transaction.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/multitape/multitape_transaction.c	2013-07-06 14:38:21.000000000 -0700
@@ -12,7 +12,7 @@
 #include <unistd.h>
 
 #include "chunks.h"
-#include "crypto.h"
+#include "crypto_entropy.h"
 #include "dirutil.h"
 #include "hexify.h"
 #include "hexlink.h"
diff -ruN tarsnap-autoconf-1.0.33/tar/storage/storage.h tarsnap-autoconf-1.0.34/tar/storage/storage.h
--- tarsnap-autoconf-1.0.33/tar/storage/storage.h	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/storage/storage.h	2013-07-06 14:38:21.000000000 -0700
@@ -58,7 +58,7 @@
  * storage_read_file_callback(S, buf, buflen, class, name, callback, cookie):
  * Read the file ${name} from class ${class} using the read cookie ${S}
  * returned from storage_read_init.  If ${buf} is non-NULL, then read the
- * file (which should be ${buflen} bytes in length} into ${buf}; otherwise
+ * file (which should be ${buflen} bytes in length) into ${buf}; otherwise
  * malloc a buffer.  Invoke ${callback}(${cookie}, status, b, blen) when
  * complete, where ${status} is 0, 1, 2, or -1 as per storage_read_file,
  * ${b} is the buffer into which the data was read (which will be ${buf} if
diff -ruN tarsnap-autoconf-1.0.33/tar/storage/storage_directory.c tarsnap-autoconf-1.0.34/tar/storage/storage_directory.c
--- tarsnap-autoconf-1.0.33/tar/storage/storage_directory.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/storage/storage_directory.c	2013-07-06 14:38:21.000000000 -0700
@@ -5,6 +5,7 @@
 #include <string.h>
 
 #include "crypto.h"
+#include "crypto_entropy.h"
 #include "netpacket.h"
 #include "netproto.h"
 #include "storage_internal.h"
diff -ruN tarsnap-autoconf-1.0.33/tar/storage/storage_read.c tarsnap-autoconf-1.0.34/tar/storage/storage_read.c
--- tarsnap-autoconf-1.0.33/tar/storage/storage_read.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/storage/storage_read.c	2013-07-06 14:38:21.000000000 -0700
@@ -391,7 +391,7 @@
  * storage_read_file_callback(S, buf, buflen, class, name, callback, cookie):
  * Read the file ${name} from class ${class} using the read cookie ${S}
  * returned from storage_read_init.  If ${buf} is non-NULL, then read the
- * file (which should be ${buflen} bytes in length} into ${buf}; otherwise
+ * file (which should be ${buflen} bytes in length) into ${buf}; otherwise
  * malloc a buffer.  Invoke ${callback}(${cookie}, status, b, blen) when
  * complete, where ${status} is 0, 1, 2, or -1 as per storage_read_file,
  * ${b} is the buffer into which the data was read (which will be ${buf} if
diff -ruN tarsnap-autoconf-1.0.33/tar/storage/storage_transaction.c tarsnap-autoconf-1.0.34/tar/storage/storage_transaction.c
--- tarsnap-autoconf-1.0.33/tar/storage/storage_transaction.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/storage/storage_transaction.c	2013-07-06 14:38:21.000000000 -0700
@@ -6,6 +6,7 @@
 #include <unistd.h>
 
 #include "crypto.h"
+#include "crypto_entropy.h"
 #include "netpacket.h"
 #include "netproto.h"
 #include "warnp.h"
diff -ruN tarsnap-autoconf-1.0.33/tar/tarsnap.1-man.in tarsnap-autoconf-1.0.34/tar/tarsnap.1-man.in
--- tarsnap-autoconf-1.0.33/tar/tarsnap.1-man.in	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/tarsnap.1-man.in	2013-07-06 14:38:21.000000000 -0700
@@ -1078,7 +1078,7 @@
 utility and
 \fBlibarchive\fP(3)
 library in
-FreeBSD 5.3 .
+FreeBSD 5.3.
 .PP
 \fB\%tarsnap\fP
 is built around
diff -ruN tarsnap-autoconf-1.0.33/tar/tarsnap.1-mdoc.in tarsnap-autoconf-1.0.34/tar/tarsnap.1-mdoc.in
--- tarsnap-autoconf-1.0.33/tar/tarsnap.1-mdoc.in	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/tarsnap.1-mdoc.in	2013-07-06 14:38:21.000000000 -0700
@@ -968,7 +968,7 @@
 utility and
 .Xr libarchive 3
 library in
-FreeBSD 5.3 .
+FreeBSD 5.3.
 .Pp
 .Nm
 is built around
diff -ruN tarsnap-autoconf-1.0.33/tar/write.c tarsnap-autoconf-1.0.34/tar/write.c
--- tarsnap-autoconf-1.0.33/tar/write.c	2012-08-10 00:05:23.000000000 -0700
+++ tarsnap-autoconf-1.0.34/tar/write.c	2013-07-06 14:38:21.000000000 -0700
@@ -97,7 +97,7 @@
 #include "archive_multitape.h"
 #include "ccache.h"
 #include "getfstype.h"
-#include "network.h"
+#include "tsnetwork.h"
 #include "sigquit.h"
 
 /* Size of buffer for holding file data prior to writing. */
