ndnboost: Include boost::iostreams for internal use.
diff --git a/include/ndnboost/iostreams/detail/config/auto_link.hpp b/include/ndnboost/iostreams/detail/config/auto_link.hpp
new file mode 100644
index 0000000..da9f805
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/auto_link.hpp
@@ -0,0 +1,49 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from <ndnboost/config/auto_link.hpp> and from
+// http://www.boost.org/more/separate_compilation.html, by John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#if defined(NDNBOOST_EXTERNAL_LIB_NAME)
+# if defined(NDNBOOST_MSVC) \
+ || defined(__BORLANDC__) \
+ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
+ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ /**/
+# pragma comment(lib, NDNBOOST_EXTERNAL_LIB_NAME)
+# endif
+# undef NDNBOOST_EXTERNAL_LIB_NAME
+#endif
+
+//------------------Enable automatic library variant selection----------------//
+
+#if !defined(NDNBOOST_IOSTREAMS_SOURCE) && \
+ !defined(NDNBOOST_ALL_NO_LIB) && \
+ !defined(NDNBOOST_IOSTREAMS_NO_LIB) \
+ /**/
+
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it.
+# define NDNBOOST_LIB_NAME ndnboost_iostreams
+
+// If we're importing code from a dll, then tell auto_link.hpp about it.
+# if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_IOSTREAMS_DYN_LINK)
+# define NDNBOOST_DYN_LINK
+# endif
+
+// And include the header that does the work.
+# include <ndnboost/config/auto_link.hpp>
+#endif // auto-linking disabled
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_AUTO_LINK_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/bzip2.hpp b/include/ndnboost/iostreams/detail/config/bzip2.hpp
new file mode 100644
index 0000000..c62ca61
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/bzip2.hpp
@@ -0,0 +1,48 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from <ndnboost/config/auto_link.hpp> and from
+// http://www.boost.org/more/separate_compilation.html, by John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#if defined(NDNBOOST_BZIP2_BINARY)
+# if defined(NDNBOOST_MSVC) || \
+ defined(__BORLANDC__) || \
+ (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ /**/
+
+// Specify the name of the .lib file.
+# pragma comment(lib, NDNBOOST_STRINGIZE(NDNBOOST_BZIP2_BINARY))
+# endif
+#else
+# if !defined(NDNBOOST_IOSTREAMS_SOURCE) && \
+ !defined(NDNBOOST_ALL_NO_LIB) && \
+ !defined(NDNBOOST_IOSTREAMS_NO_LIB) \
+ /**/
+
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it.
+# define NDNBOOST_LIB_NAME ndnboost_bzip2
+
+// If we're importing code from a dll, then tell auto_link.hpp about it.
+# if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_IOSTREAMS_DYN_LINK)
+# define NDNBOOST_DYN_LINK
+# endif
+
+// And include the header that does the work.
+# include <ndnboost/config/auto_link.hpp>
+# endif
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BZIP2_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/codecvt.hpp b/include/ndnboost/iostreams/detail/config/codecvt.hpp
new file mode 100644
index 0000000..afa45b2
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/codecvt.hpp
@@ -0,0 +1,80 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/iostreams/detail/config/wide_streams.hpp>
+#include <cstddef>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//------------------Support for codecvt with user-defined state types---------//
+
+#if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \
+ NDNBOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) \
+ /**/
+# define NDNBOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION
+#endif
+
+#if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \
+ NDNBOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \
+ /**/
+# define NDNBOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION
+#endif
+
+//------------------Check for codecvt ctor taking a reference count-----------//
+
+#if NDNBOOST_WORKAROUND(__MWERKS__, NDNBOOST_TESTED_AT(0x3205)) || \
+ NDNBOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \
+ /**/
+# define NDNBOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T
+#endif
+
+//------------------Normalize codecvt::length---------------------------------//
+
+#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && \
+ (!defined(NDNBOOST_RWSTD_VER) || NDNBOOST_RWSTD_VER < 0x04010300) && \
+ (!defined(__MACH__) || !defined(__INTEL_COMPILER))
+ /**/
+# define NDNBOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const
+#else
+# define NDNBOOST_IOSTREAMS_CODECVT_CV_QUALIFIER
+#endif
+
+//------------------Check for codecvt::max_length-----------------------------//
+
+#if NDNBOOST_WORKAROUND(_STLPORT_VERSION, < 0x461)
+# define NDNBOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH
+#endif
+
+//------------------Put mbstate_t and codecvt in std--------------------------//
+
+#ifndef NDNBOOST_IOSTREAMS_NO_LOCALE
+# include <locale>
+#endif
+
+// From Robert Ramey's version of utf8_codecvt_facet.
+namespace std {
+
+#if defined(__LIBCOMO__)
+ using ::mbstate_t;
+#elif defined(NDNBOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__)
+ using ::mbstate_t;
+#elif defined(__SGI_STL_PORT)
+#elif defined(NDNBOOST_NO_STDC_NAMESPACE)
+ using ::codecvt;
+ using ::mbstate_t;
+#endif
+
+} // End namespace std.
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/disable_warnings.hpp b/include/ndnboost/iostreams/detail/config/disable_warnings.hpp
new file mode 100644
index 0000000..0f65f00
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/disable_warnings.hpp
@@ -0,0 +1,30 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#include <ndnboost/config.hpp> // NDNBOOST_MSVC.
+#include <ndnboost/detail/workaround.hpp> // NDNBOOST_WORKAROUND.
+
+#if defined(NDNBOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4127) // Conditional expression is constant.
+# pragma warning(disable:4130) // Logical operation on address of string constant.
+# pragma warning(disable:4224) // Parameter previously defined as type.
+# pragma warning(disable:4244) // Conversion: possible loss of data.
+# pragma warning(disable:4512) // Assignment operator could not be generated.
+# pragma warning(disable:4706) // Assignment within conditional expression.
+# if NDNBOOST_WORKAROUND(NDNBOOST_MSVC, >= 1400)
+# pragma warning(disable:6334) // sizeof applied to an expression with an operator.
+# endif
+#else
+# if NDNBOOST_WORKAROUND(__BORLANDC__, < 0x600)
+# pragma warn -8008 // Condition always true/false.
+# pragma warn -8066 // Unreachable code.
+# pragma warn -8071 // Conversion may lose significant digits.
+# pragma warn -8072 // Suspicious pointer arithmetic.
+# pragma warn -8080 // identifier declared but never used.
+# endif
+#endif
diff --git a/include/ndnboost/iostreams/detail/config/dyn_link.hpp b/include/ndnboost/iostreams/detail/config/dyn_link.hpp
new file mode 100644
index 0000000..e8d922f
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/dyn_link.hpp
@@ -0,0 +1,37 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from http://www.boost.org/more/separate_compilation.html, by
+// John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+
+//------------------Enable dynamic linking on windows-------------------------//
+
+#ifdef NDNBOOST_HAS_DECLSPEC
+# if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_IOSTREAMS_DYN_LINK)
+# ifdef NDNBOOST_IOSTREAMS_SOURCE
+# define NDNBOOST_IOSTREAMS_DECL __declspec(dllexport)
+# else
+# define NDNBOOST_IOSTREAMS_DECL __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef NDNBOOST_IOSTREAMS_DECL
+# define NDNBOOST_IOSTREAMS_DECL
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_DYN_LINK_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/enable_warnings.hpp b/include/ndnboost/iostreams/detail/config/enable_warnings.hpp
new file mode 100644
index 0000000..3043c5e
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/enable_warnings.hpp
@@ -0,0 +1,18 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#if defined(NDNBOOST_MSVC)
+# pragma warning(pop)
+#else
+# if NDNBOOST_WORKAROUND(__BORLANDC__, < 0x600)
+# pragma warn .8008 // Condition always true/false.
+# pragma warn .8066 // Unreachable code.
+# pragma warn .8071 // Conversion may lose significant digits.
+# pragma warn .8072 // Suspicious pointer arithmetic.
+# pragma warn .8080 // identifier declared but never used.
+# endif
+#endif
diff --git a/include/ndnboost/iostreams/detail/config/fpos.hpp b/include/ndnboost/iostreams/detail/config/fpos.hpp
new file mode 100644
index 0000000..ffb9656
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/fpos.hpp
@@ -0,0 +1,31 @@
+/*
+ * Distributed under the Boost Software License, Version 1.0.(See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ *
+ * See http://www.boost.org/libs/iostreams for documentation.
+
+ * File: ndnboost/iostreams/detail/execute.hpp
+ * Date: Thu Dec 06 13:21:54 MST 2007
+ * Copyright: 2007-2008 CodeRage, LLC
+ * Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
+ *
+ * Defines the preprocessor symbol NDNBOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for
+ * platforms that use the implementation of std::fpos from the Dinkumware
+ * Standard Library.
+ */
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
+ !defined(_STLPORT_VERSION) && !defined(__QNX__)
+ /**/
+# define NDNBOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
+# endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/gcc.hpp b/include/ndnboost/iostreams/detail/config/gcc.hpp
new file mode 100644
index 0000000..2685346
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/gcc.hpp
@@ -0,0 +1,27 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from <ndnboost/config/auto_link.hpp> and from
+// http://www.boost.org/more/separate_compilation.html, by John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp> // NDNBOOST_INTEL.
+
+#if defined(__GNUC__) && !defined(NDNBOOST_INTEL)
+# define NDNBOOST_IOSTREAMS_GCC (__GNUC__ * 100 + __GNUC_MINOR__)
+# define NDNBOOST_IOSTREAMS_GCC_WORKAROUND_GUARD 1
+#else
+# define NDNBOOST_IOSTREAMS_GCC_WORKAROUND_GUARD 0
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_GCC_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/limits.hpp b/include/ndnboost/iostreams/detail/config/limits.hpp
new file mode 100644
index 0000000..cc83aec
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/limits.hpp
@@ -0,0 +1,19 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED
+
+#ifndef NDNBOOST_IOSTREAMS_MAX_FORWARDING_ARITY
+# define NDNBOOST_IOSTREAMS_MAX_FORWARDING_ARITY 3
+#endif
+
+#ifndef NDNBOOST_IOSTREAMS_MAX_EXECUTE_ARITY
+# define NDNBOOST_IOSTREAMS_MAX_EXECUTE_ARITY 5
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_LIMITS_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/overload_resolution.hpp b/include/ndnboost/iostreams/detail/config/overload_resolution.hpp
new file mode 100644
index 0000000..2f35c41
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/overload_resolution.hpp
@@ -0,0 +1,32 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from <ndnboost/config/auto_link.hpp> and from
+// http://www.boost.org/more/separate_compilation.html, by John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp> // NDNBOOST_MSVC.
+#include <ndnboost/detail/workaround.hpp>
+#include <ndnboost/iostreams/detail/config/gcc.hpp>
+
+#if !defined(NDNBOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION)
+# if NDNBOOST_WORKAROUND(__MWERKS__, <= 0x3003) || \
+ NDNBOOST_WORKAROUND(__BORLANDC__, < 0x600) || \
+ NDNBOOST_WORKAROUND(NDNBOOST_MSVC, <= 1300) || \
+ NDNBOOST_WORKAROUND(NDNBOOST_IOSTREAMS_GCC, <= 295) \
+ /**/
+# define NDNBOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION
+# endif
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_BROKEN_OVERLOAD_RESOLUTION_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/rtl.hpp b/include/ndnboost/iostreams/detail/config/rtl.hpp
new file mode 100644
index 0000000..c39b814
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/rtl.hpp
@@ -0,0 +1,72 @@
+/*
+ * Distributed under the Boost Software License, Version 1.0.(See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ *
+ * See http://www.boost.org/libs/iostreams for documentation.
+ *
+ * Defines preprocessor symbols expanding to the names of functions in the
+ * C runtime library used to access file descriptors and to the type used
+ * to store file offsets for seeking.
+ *
+ * File: ndnboost/iostreams/detail/config/rtl.hpp
+ * Date: Wed Dec 26 11:58:11 MST 2007
+ *
+ * Copyright: 2007-2008 CodeRage, LLC
+ * Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
+ */
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/iostreams/detail/config/windows_posix.hpp>
+
+// Handle open, close, read, and write
+#ifdef __BORLANDC__
+# define NDNBOOST_IOSTREAMS_RTL(x) NDNBOOST_JOIN(_rtl_, x)
+#elif defined NDNBOOST_IOSTREAMS_WINDOWS
+# define NDNBOOST_IOSTREAMS_RTL(x) NDNBOOST_JOIN(_, x)
+#else
+# define NDNBOOST_IOSTREAMS_RTL(x) ::x // Distinguish from member function named x
+#endif
+#define NDNBOOST_IOSTREAMS_FD_OPEN NDNBOOST_IOSTREAMS_RTL(open)
+#define NDNBOOST_IOSTREAMS_FD_CLOSE NDNBOOST_IOSTREAMS_RTL(close)
+#define NDNBOOST_IOSTREAMS_FD_READ NDNBOOST_IOSTREAMS_RTL(read)
+#define NDNBOOST_IOSTREAMS_FD_WRITE NDNBOOST_IOSTREAMS_RTL(write)
+
+// Handle lseek, off_t, ftruncate, and stat
+#ifdef NDNBOOST_IOSTREAMS_WINDOWS
+# if defined(NDNBOOST_MSVC) || defined(__MSVCRT__) // MSVC, MinGW
+# define NDNBOOST_IOSTREAMS_FD_SEEK _lseeki64
+# define NDNBOOST_IOSTREAMS_FD_OFFSET __int64
+# else // Borland, Metrowerks, ...
+# define NDNBOOST_IOSTREAMS_FD_SEEK lseek
+# define NDNBOOST_IOSTREAMS_FD_OFFSET long
+# endif
+#else // Non-windows
+# if defined(_LARGEFILE64_SOURCE) && !defined(__APPLE__) && \
+ (!defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64) || \
+ defined(_AIX) && !defined(_LARGE_FILES) || \
+ defined(NDNBOOST_IOSTREAMS_HAS_LARGE_FILE_EXTENSIONS)
+ /**/
+
+ /* Systems with transitional extensions for large file support */
+
+# define NDNBOOST_IOSTREAMS_FD_SEEK lseek64
+# define NDNBOOST_IOSTREAMS_FD_TRUNCATE ftruncate64
+# define NDNBOOST_IOSTREAMS_FD_MMAP mmap64
+# define NDNBOOST_IOSTREAMS_FD_STAT stat64
+# define NDNBOOST_IOSTREAMS_FD_FSTAT fstat64
+# define NDNBOOST_IOSTREAMS_FD_OFFSET off64_t
+# else
+# define NDNBOOST_IOSTREAMS_FD_SEEK lseek
+# define NDNBOOST_IOSTREAMS_FD_TRUNCATE ftruncate
+# define NDNBOOST_IOSTREAMS_FD_MMAP mmap
+# define NDNBOOST_IOSTREAMS_FD_STAT stat
+# define NDNBOOST_IOSTREAMS_FD_FSTAT fstat
+# define NDNBOOST_IOSTREAMS_FD_OFFSET off_t
+# endif
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/unreachable_return.hpp b/include/ndnboost/iostreams/detail/config/unreachable_return.hpp
new file mode 100644
index 0000000..1de856a
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/unreachable_return.hpp
@@ -0,0 +1,25 @@
+// (C) Copyright 2010 Daniel James
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp>
+
+// If Boost.Exception has NDNBOOST_ATTRIBUTE_NORETURN
+#if defined(_MSC_VER) || defined(__GNUC__)
+#define NDNBOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
+ NDNBOOST_UNREACHABLE_RETURN(x)
+#else
+#define NDNBOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
+ return x;
+#endif
+
+#endif
diff --git a/include/ndnboost/iostreams/detail/config/wide_streams.hpp b/include/ndnboost/iostreams/detail/config/wide_streams.hpp
new file mode 100644
index 0000000..92ead3b
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/wide_streams.hpp
@@ -0,0 +1,55 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from http://www.boost.org/more/separate_compilation.html, by
+// John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
+
+#include <ndnboost/config.hpp>
+#include <ndnboost/detail/workaround.hpp>
+#include <cstddef>
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//------------------Templated stream support----------------------------------//
+
+// From ndnboost/dynamic_bitset.hpp; thanks to Matthias Troyer for cray patch.
+#ifndef NDNBOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+# if defined(__STL_CONFIG_H) && \
+ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
+ /**/
+# define NDNBOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+# endif
+#endif // #ifndef NDNBOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+
+//------------------Wide stream support---------------------------------------//
+
+#ifndef NDNBOOST_IOSTREAMS_NO_WIDE_STREAMS
+# if defined(NDNBOOST_IOSTREAMS_NO_STREAM_TEMPLATES) || \
+ defined (NDNBOOST_NO_STD_WSTREAMBUF) && \
+ ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
+ /**/
+# define NDNBOOST_IOSTREAMS_NO_WIDE_STREAMS
+# endif
+#endif // #ifndef NDNBOOST_IOSTREAMS_NO_WIDE_STREAMS
+
+//------------------Locale support--------------------------------------------//
+
+#ifndef NDNBOOST_IOSTREAMS_NO_LOCALE
+# if defined(NDNBOOST_NO_STD_LOCALE) || \
+ defined(__CYGWIN__) && \
+ ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
+ /**/
+# define NDNBOOST_IOSTREAMS_NO_LOCALE
+# endif
+#endif // #ifndef NDNBOOST_IOSTREAMS_NO_LOCALE
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/windows_posix.hpp b/include/ndnboost/iostreams/detail/config/windows_posix.hpp
new file mode 100644
index 0000000..9fd9c45
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/windows_posix.hpp
@@ -0,0 +1,25 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
+// (C) Copyright 2002, 2003 Beman Dawes Boost.Filesystem
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED
+
+//------------------From ndnboost/libs/filesystem/src/path_posix_windows.cpp-----//
+
+// NDNBOOST_IOSTREAMS_POSIX or NDNBOOST_IOSTREAMS_WINDOWS specify which API to use.
+#if !defined( NDNBOOST_IOSTREAMS_WINDOWS ) && !defined( NDNBOOST_IOSTREAMS_POSIX )
+# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && \
+ !defined(__CYGWIN__) \
+ /**/
+# define NDNBOOST_IOSTREAMS_WINDOWS
+# else
+# define NDNBOOST_IOSTREAMS_POSIX
+# endif
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_WINDOWS_POSIX_HPP_INCLUDED
diff --git a/include/ndnboost/iostreams/detail/config/zlib.hpp b/include/ndnboost/iostreams/detail/config/zlib.hpp
new file mode 100644
index 0000000..e3df50a
--- /dev/null
+++ b/include/ndnboost/iostreams/detail/config/zlib.hpp
@@ -0,0 +1,50 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from <ndnboost/config/auto_link.hpp> and from
+// http://www.boost.org/more/separate_compilation.html, by John Maddock.
+
+#ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
+#define NDNBOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <ndnboost/config.hpp> // NDNBOOST_STRINGIZE.
+
+#if defined(NDNBOOST_ZLIB_BINARY)
+# if defined(NDNBOOST_MSVC) || \
+ defined(__BORLANDC__) || \
+ (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) || \
+ (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) \
+ /**/
+
+// Specify the name of the .lib file.
+# pragma comment(lib, NDNBOOST_STRINGIZE(NDNBOOST_ZLIB_BINARY))
+# endif
+#else
+# if !defined(NDNBOOST_IOSTREAMS_SOURCE) && \
+ !defined(NDNBOOST_ALL_NO_LIB) && \
+ !defined(NDNBOOST_IOSTREAMS_NO_LIB) \
+ /**/
+
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it.
+# define NDNBOOST_LIB_NAME ndnboost_zlib
+
+// If we're importing code from a dll, then tell auto_link.hpp about it.
+# if defined(NDNBOOST_ALL_DYN_LINK) || defined(NDNBOOST_IOSTREAMS_DYN_LINK)
+# define NDNBOOST_DYN_LINK
+# endif
+
+// And include the header that does the work.
+# include <ndnboost/config/auto_link.hpp>
+# endif
+#endif
+
+#endif // #ifndef NDNBOOST_IOSTREAMS_DETAIL_CONFIG_ZLIB_HPP_INCLUDED