You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by wh...@apache.org on 2015/07/07 23:32:09 UTC

[22/50] [abbrv] hadoop git commit: HDFS-8724. Import third_party libraries into the repository.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/io_service.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/io_service.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/io_service.hpp
new file mode 100644
index 0000000..28f2434
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/io_service.hpp
@@ -0,0 +1,770 @@
+//
+// io_service.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IO_SERVICE_HPP
+#define ASIO_IO_SERVICE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <cstddef>
+#include <stdexcept>
+#include <typeinfo>
+#include "asio/async_result.hpp"
+#include "asio/detail/noncopyable.hpp"
+#include "asio/detail/wrapped_handler.hpp"
+#include "asio/error_code.hpp"
+
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+# include "asio/detail/winsock_init.hpp"
+#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
+  || defined(__osf__)
+# include "asio/detail/signal_init.hpp"
+#endif
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+
+class io_service;
+template <typename Service> Service& use_service(io_service& ios);
+template <typename Service> void add_service(io_service& ios, Service* svc);
+template <typename Service> bool has_service(io_service& ios);
+
+namespace detail {
+#if defined(ASIO_HAS_IOCP)
+  typedef class win_iocp_io_service io_service_impl;
+  class win_iocp_overlapped_ptr;
+#else
+  typedef class task_io_service io_service_impl;
+#endif
+  class service_registry;
+} // namespace detail
+
+/// Provides core I/O functionality.
+/**
+ * The io_service class provides the core I/O functionality for users of the
+ * asynchronous I/O objects, including:
+ *
+ * @li asio::ip::tcp::socket
+ * @li asio::ip::tcp::acceptor
+ * @li asio::ip::udp::socket
+ * @li asio::deadline_timer.
+ *
+ * The io_service class also includes facilities intended for developers of
+ * custom asynchronous services.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Safe, with the specific exceptions of the reset() and
+ * notify_fork() functions. Calling reset() while there are unfinished run(),
+ * run_one(), poll() or poll_one() calls results in undefined behaviour. The
+ * notify_fork() function should not be called while any io_service function,
+ * or any function on an I/O object that is associated with the io_service, is
+ * being called in another thread.
+ *
+ * @par Concepts:
+ * Dispatcher.
+ *
+ * @par Synchronous and asynchronous operations
+ *
+ * Synchronous operations on I/O objects implicitly run the io_service object
+ * for an individual operation. The io_service functions run(), run_one(),
+ * poll() or poll_one() must be called for the io_service to perform
+ * asynchronous operations on behalf of a C++ program. Notification that an
+ * asynchronous operation has completed is delivered by invocation of the
+ * associated handler. Handlers are invoked only by a thread that is currently
+ * calling any overload of run(), run_one(), poll() or poll_one() for the
+ * io_service.
+ *
+ * @par Effect of exceptions thrown from handlers
+ *
+ * If an exception is thrown from a handler, the exception is allowed to
+ * propagate through the throwing thread's invocation of run(), run_one(),
+ * poll() or poll_one(). No other threads that are calling any of these
+ * functions are affected. It is then the responsibility of the application to
+ * catch the exception.
+ *
+ * After the exception has been caught, the run(), run_one(), poll() or
+ * poll_one() call may be restarted @em without the need for an intervening
+ * call to reset(). This allows the thread to rejoin the io_service object's
+ * thread pool without impacting any other threads in the pool.
+ *
+ * For example:
+ *
+ * @code
+ * asio::io_service io_service;
+ * ...
+ * for (;;)
+ * {
+ *   try
+ *   {
+ *     io_service.run();
+ *     break; // run() exited normally
+ *   }
+ *   catch (my_exception& e)
+ *   {
+ *     // Deal with exception as appropriate.
+ *   }
+ * }
+ * @endcode
+ *
+ * @par Stopping the io_service from running out of work
+ *
+ * Some applications may need to prevent an io_service object's run() call from
+ * returning when there is no more work to do. For example, the io_service may
+ * be being run in a background thread that is launched prior to the
+ * application's asynchronous operations. The run() call may be kept running by
+ * creating an object of type asio::io_service::work:
+ *
+ * @code asio::io_service io_service;
+ * asio::io_service::work work(io_service);
+ * ... @endcode
+ *
+ * To effect a shutdown, the application will then need to call the io_service
+ * object's stop() member function. This will cause the io_service run() call
+ * to return as soon as possible, abandoning unfinished operations and without
+ * permitting ready handlers to be dispatched.
+ *
+ * Alternatively, if the application requires that all operations and handlers
+ * be allowed to finish normally, the work object may be explicitly destroyed.
+ *
+ * @code asio::io_service io_service;
+ * auto_ptr<asio::io_service::work> work(
+ *     new asio::io_service::work(io_service));
+ * ...
+ * work.reset(); // Allow run() to exit. @endcode
+ *
+ * @par The io_service class and I/O services
+ *
+ * Class io_service implements an extensible, type-safe, polymorphic set of I/O
+ * services, indexed by service type. An object of class io_service must be
+ * initialised before I/O objects such as sockets, resolvers and timers can be
+ * used. These I/O objects are distinguished by having constructors that accept
+ * an @c io_service& parameter.
+ *
+ * I/O services exist to manage the logical interface to the operating system on
+ * behalf of the I/O objects. In particular, there are resources that are shared
+ * across a class of I/O objects. For example, timers may be implemented in
+ * terms of a single timer queue. The I/O services manage these shared
+ * resources.
+ *
+ * Access to the services of an io_service is via three function templates,
+ * use_service(), add_service() and has_service().
+ *
+ * In a call to @c use_service<Service>(), the type argument chooses a service,
+ * making available all members of the named type. If @c Service is not present
+ * in an io_service, an object of type @c Service is created and added to the
+ * io_service. A C++ program can check if an io_service implements a
+ * particular service with the function template @c has_service<Service>().
+ *
+ * Service objects may be explicitly added to an io_service using the function
+ * template @c add_service<Service>(). If the @c Service is already present, the
+ * service_already_exists exception is thrown. If the owner of the service is
+ * not the same object as the io_service parameter, the invalid_service_owner
+ * exception is thrown.
+ *
+ * Once a service reference is obtained from an io_service object by calling
+ * use_service(), that reference remains usable as long as the owning io_service
+ * object exists.
+ *
+ * All I/O service implementations have io_service::service as a public base
+ * class. Custom I/O services may be implemented by deriving from this class and
+ * then added to an io_service using the facilities described above.
+ */
+class io_service
+  : private noncopyable
+{
+private:
+  typedef detail::io_service_impl impl_type;
+#if defined(ASIO_HAS_IOCP)
+  friend class detail::win_iocp_overlapped_ptr;
+#endif
+
+public:
+  class work;
+  friend class work;
+
+  class id;
+
+  class service;
+
+  class strand;
+
+  /// Constructor.
+  ASIO_DECL io_service();
+
+  /// Constructor.
+  /**
+   * Construct with a hint about the required level of concurrency.
+   *
+   * @param concurrency_hint A suggestion to the implementation on how many
+   * threads it should allow to run simultaneously.
+   */
+  ASIO_DECL explicit io_service(std::size_t concurrency_hint);
+
+  /// Destructor.
+  /**
+   * On destruction, the io_service performs the following sequence of
+   * operations:
+   *
+   * @li For each service object @c svc in the io_service set, in reverse order
+   * of the beginning of service object lifetime, performs
+   * @c svc->shutdown_service().
+   *
+   * @li Uninvoked handler objects that were scheduled for deferred invocation
+   * on the io_service, or any associated strand, are destroyed.
+   *
+   * @li For each service object @c svc in the io_service set, in reverse order
+   * of the beginning of service object lifetime, performs
+   * <tt>delete static_cast<io_service::service*>(svc)</tt>.
+   *
+   * @note The destruction sequence described above permits programs to
+   * simplify their resource management by using @c shared_ptr<>. Where an
+   * object's lifetime is tied to the lifetime of a connection (or some other
+   * sequence of asynchronous operations), a @c shared_ptr to the object would
+   * be bound into the handlers for all asynchronous operations associated with
+   * it. This works as follows:
+   *
+   * @li When a single connection ends, all associated asynchronous operations
+   * complete. The corresponding handler objects are destroyed, and all
+   * @c shared_ptr references to the objects are destroyed.
+   *
+   * @li To shut down the whole program, the io_service function stop() is
+   * called to terminate any run() calls as soon as possible. The io_service
+   * destructor defined above destroys all handlers, causing all @c shared_ptr
+   * references to all connection objects to be destroyed.
+   */
+  ASIO_DECL ~io_service();
+
+  /// Run the io_service object's event processing loop.
+  /**
+   * The run() function blocks until all work has finished and there are no
+   * more handlers to be dispatched, or until the io_service has been stopped.
+   *
+   * Multiple threads may call the run() function to set up a pool of threads
+   * from which the io_service may execute handlers. All threads that are
+   * waiting in the pool are equivalent and the io_service may choose any one
+   * of them to invoke a handler.
+   *
+   * A normal exit from the run() function implies that the io_service object
+   * is stopped (the stopped() function returns @c true). Subsequent calls to
+   * run(), run_one(), poll() or poll_one() will return immediately unless there
+   * is a prior call to reset().
+   *
+   * @return The number of handlers that were executed.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note The run() function must not be called from a thread that is currently
+   * calling one of run(), run_one(), poll() or poll_one() on the same
+   * io_service object.
+   *
+   * The poll() function may also be used to dispatch ready handlers, but
+   * without blocking.
+   */
+  ASIO_DECL std::size_t run();
+
+  /// Run the io_service object's event processing loop.
+  /**
+   * The run() function blocks until all work has finished and there are no
+   * more handlers to be dispatched, or until the io_service has been stopped.
+   *
+   * Multiple threads may call the run() function to set up a pool of threads
+   * from which the io_service may execute handlers. All threads that are
+   * waiting in the pool are equivalent and the io_service may choose any one
+   * of them to invoke a handler.
+   *
+   * A normal exit from the run() function implies that the io_service object
+   * is stopped (the stopped() function returns @c true). Subsequent calls to
+   * run(), run_one(), poll() or poll_one() will return immediately unless there
+   * is a prior call to reset().
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @return The number of handlers that were executed.
+   *
+   * @note The run() function must not be called from a thread that is currently
+   * calling one of run(), run_one(), poll() or poll_one() on the same
+   * io_service object.
+   *
+   * The poll() function may also be used to dispatch ready handlers, but
+   * without blocking.
+   */
+  ASIO_DECL std::size_t run(asio::error_code& ec);
+
+  /// Run the io_service object's event processing loop to execute at most one
+  /// handler.
+  /**
+   * The run_one() function blocks until one handler has been dispatched, or
+   * until the io_service has been stopped.
+   *
+   * @return The number of handlers that were executed. A zero return value
+   * implies that the io_service object is stopped (the stopped() function
+   * returns @c true). Subsequent calls to run(), run_one(), poll() or
+   * poll_one() will return immediately unless there is a prior call to
+   * reset().
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  ASIO_DECL std::size_t run_one();
+
+  /// Run the io_service object's event processing loop to execute at most one
+  /// handler.
+  /**
+   * The run_one() function blocks until one handler has been dispatched, or
+   * until the io_service has been stopped.
+   *
+   * @return The number of handlers that were executed. A zero return value
+   * implies that the io_service object is stopped (the stopped() function
+   * returns @c true). Subsequent calls to run(), run_one(), poll() or
+   * poll_one() will return immediately unless there is a prior call to
+   * reset().
+   *
+   * @return The number of handlers that were executed.
+   */
+  ASIO_DECL std::size_t run_one(asio::error_code& ec);
+
+  /// Run the io_service object's event processing loop to execute ready
+  /// handlers.
+  /**
+   * The poll() function runs handlers that are ready to run, without blocking,
+   * until the io_service has been stopped or there are no more ready handlers.
+   *
+   * @return The number of handlers that were executed.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  ASIO_DECL std::size_t poll();
+
+  /// Run the io_service object's event processing loop to execute ready
+  /// handlers.
+  /**
+   * The poll() function runs handlers that are ready to run, without blocking,
+   * until the io_service has been stopped or there are no more ready handlers.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @return The number of handlers that were executed.
+   */
+  ASIO_DECL std::size_t poll(asio::error_code& ec);
+
+  /// Run the io_service object's event processing loop to execute one ready
+  /// handler.
+  /**
+   * The poll_one() function runs at most one handler that is ready to run,
+   * without blocking.
+   *
+   * @return The number of handlers that were executed.
+   *
+   * @throws asio::system_error Thrown on failure.
+   */
+  ASIO_DECL std::size_t poll_one();
+
+  /// Run the io_service object's event processing loop to execute one ready
+  /// handler.
+  /**
+   * The poll_one() function runs at most one handler that is ready to run,
+   * without blocking.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @return The number of handlers that were executed.
+   */
+  ASIO_DECL std::size_t poll_one(asio::error_code& ec);
+
+  /// Stop the io_service object's event processing loop.
+  /**
+   * This function does not block, but instead simply signals the io_service to
+   * stop. All invocations of its run() or run_one() member functions should
+   * return as soon as possible. Subsequent calls to run(), run_one(), poll()
+   * or poll_one() will return immediately until reset() is called.
+   */
+  ASIO_DECL void stop();
+
+  /// Determine whether the io_service object has been stopped.
+  /**
+   * This function is used to determine whether an io_service object has been
+   * stopped, either through an explicit call to stop(), or due to running out
+   * of work. When an io_service object is stopped, calls to run(), run_one(),
+   * poll() or poll_one() will return immediately without invoking any
+   * handlers.
+   *
+   * @return @c true if the io_service object is stopped, otherwise @c false.
+   */
+  ASIO_DECL bool stopped() const;
+
+  /// Reset the io_service in preparation for a subsequent run() invocation.
+  /**
+   * This function must be called prior to any second or later set of
+   * invocations of the run(), run_one(), poll() or poll_one() functions when a
+   * previous invocation of these functions returned due to the io_service
+   * being stopped or running out of work. After a call to reset(), the
+   * io_service object's stopped() function will return @c false.
+   *
+   * This function must not be called while there are any unfinished calls to
+   * the run(), run_one(), poll() or poll_one() functions.
+   */
+  ASIO_DECL void reset();
+
+  /// Request the io_service to invoke the given handler.
+  /**
+   * This function is used to ask the io_service to execute the given handler.
+   *
+   * The io_service guarantees that the handler will only be called in a thread
+   * in which the run(), run_one(), poll() or poll_one() member functions is
+   * currently being invoked. The handler may be executed inside this function
+   * if the guarantee can be met.
+   *
+   * @param handler The handler to be called. The io_service will make
+   * a copy of the handler object as required. The function signature of the
+   * handler must be: @code void handler(); @endcode
+   *
+   * @note This function throws an exception only if:
+   *
+   * @li the handler's @c asio_handler_allocate function; or
+   *
+   * @li the handler's copy constructor
+   *
+   * throws an exception.
+   */
+  template <typename CompletionHandler>
+  ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
+  dispatch(ASIO_MOVE_ARG(CompletionHandler) handler);
+
+  /// Request the io_service to invoke the given handler and return immediately.
+  /**
+   * This function is used to ask the io_service to execute the given handler,
+   * but without allowing the io_service to call the handler from inside this
+   * function.
+   *
+   * The io_service guarantees that the handler will only be called in a thread
+   * in which the run(), run_one(), poll() or poll_one() member functions is
+   * currently being invoked.
+   *
+   * @param handler The handler to be called. The io_service will make
+   * a copy of the handler object as required. The function signature of the
+   * handler must be: @code void handler(); @endcode
+   *
+   * @note This function throws an exception only if:
+   *
+   * @li the handler's @c asio_handler_allocate function; or
+   *
+   * @li the handler's copy constructor
+   *
+   * throws an exception.
+   */
+  template <typename CompletionHandler>
+  ASIO_INITFN_RESULT_TYPE(CompletionHandler, void ())
+  post(ASIO_MOVE_ARG(CompletionHandler) handler);
+
+  /// Create a new handler that automatically dispatches the wrapped handler
+  /// on the io_service.
+  /**
+   * This function is used to create a new handler function object that, when
+   * invoked, will automatically pass the wrapped handler to the io_service
+   * object's dispatch function.
+   *
+   * @param handler The handler to be wrapped. The io_service will make a copy
+   * of the handler object as required. The function signature of the handler
+   * must be: @code void handler(A1 a1, ... An an); @endcode
+   *
+   * @return A function object that, when invoked, passes the wrapped handler to
+   * the io_service object's dispatch function. Given a function object with the
+   * signature:
+   * @code R f(A1 a1, ... An an); @endcode
+   * If this function object is passed to the wrap function like so:
+   * @code io_service.wrap(f); @endcode
+   * then the return value is a function object with the signature
+   * @code void g(A1 a1, ... An an); @endcode
+   * that, when invoked, executes code equivalent to:
+   * @code io_service.dispatch(boost::bind(f, a1, ... an)); @endcode
+   */
+  template <typename Handler>
+#if defined(GENERATING_DOCUMENTATION)
+  unspecified
+#else
+  detail::wrapped_handler<io_service&, Handler>
+#endif
+  wrap(Handler handler);
+
+  /// Fork-related event notifications.
+  enum fork_event
+  {
+    /// Notify the io_service that the process is about to fork.
+    fork_prepare,
+
+    /// Notify the io_service that the process has forked and is the parent.
+    fork_parent,
+
+    /// Notify the io_service that the process has forked and is the child.
+    fork_child
+  };
+
+  /// Notify the io_service of a fork-related event.
+  /**
+   * This function is used to inform the io_service that the process is about
+   * to fork, or has just forked. This allows the io_service, and the services
+   * it contains, to perform any necessary housekeeping to ensure correct
+   * operation following a fork.
+   *
+   * This function must not be called while any other io_service function, or
+   * any function on an I/O object associated with the io_service, is being
+   * called in another thread. It is, however, safe to call this function from
+   * within a completion handler, provided no other thread is accessing the
+   * io_service.
+   *
+   * @param event A fork-related event.
+   *
+   * @throws asio::system_error Thrown on failure. If the notification
+   * fails the io_service object should no longer be used and should be
+   * destroyed.
+   *
+   * @par Example
+   * The following code illustrates how to incorporate the notify_fork()
+   * function:
+   * @code my_io_service.notify_fork(asio::io_service::fork_prepare);
+   * if (fork() == 0)
+   * {
+   *   // This is the child process.
+   *   my_io_service.notify_fork(asio::io_service::fork_child);
+   * }
+   * else
+   * {
+   *   // This is the parent process.
+   *   my_io_service.notify_fork(asio::io_service::fork_parent);
+   * } @endcode
+   *
+   * @note For each service object @c svc in the io_service set, performs
+   * <tt>svc->fork_service();</tt>. When processing the fork_prepare event,
+   * services are visited in reverse order of the beginning of service object
+   * lifetime. Otherwise, services are visited in order of the beginning of
+   * service object lifetime.
+   */
+  ASIO_DECL void notify_fork(asio::io_service::fork_event event);
+
+  /// Obtain the service object corresponding to the given type.
+  /**
+   * This function is used to locate a service object that corresponds to
+   * the given service type. If there is no existing implementation of the
+   * service, then the io_service will create a new instance of the service.
+   *
+   * @param ios The io_service object that owns the service.
+   *
+   * @return The service interface implementing the specified service type.
+   * Ownership of the service interface is not transferred to the caller.
+   */
+  template <typename Service>
+  friend Service& use_service(io_service& ios);
+
+  /// Add a service object to the io_service.
+  /**
+   * This function is used to add a service to the io_service.
+   *
+   * @param ios The io_service object that owns the service.
+   *
+   * @param svc The service object. On success, ownership of the service object
+   * is transferred to the io_service. When the io_service object is destroyed,
+   * it will destroy the service object by performing:
+   * @code delete static_cast<io_service::service*>(svc) @endcode
+   *
+   * @throws asio::service_already_exists Thrown if a service of the
+   * given type is already present in the io_service.
+   *
+   * @throws asio::invalid_service_owner Thrown if the service's owning
+   * io_service is not the io_service object specified by the ios parameter.
+   */
+  template <typename Service>
+  friend void add_service(io_service& ios, Service* svc);
+
+  /// Determine if an io_service contains a specified service type.
+  /**
+   * This function is used to determine whether the io_service contains a
+   * service object corresponding to the given service type.
+   *
+   * @param ios The io_service object that owns the service.
+   *
+   * @return A boolean indicating whether the io_service contains the service.
+   */
+  template <typename Service>
+  friend bool has_service(io_service& ios);
+
+private:
+#if defined(ASIO_WINDOWS) || defined(__CYGWIN__)
+  detail::winsock_init<> init_;
+#elif defined(__sun) || defined(__QNX__) || defined(__hpux) || defined(_AIX) \
+  || defined(__osf__)
+  detail::signal_init<> init_;
+#endif
+
+  // The service registry.
+  asio::detail::service_registry* service_registry_;
+
+  // The implementation.
+  impl_type& impl_;
+};
+
+/// Class to inform the io_service when it has work to do.
+/**
+ * The work class is used to inform the io_service when work starts and
+ * finishes. This ensures that the io_service object's run() function will not
+ * exit while work is underway, and that it does exit when there is no
+ * unfinished work remaining.
+ *
+ * The work class is copy-constructible so that it may be used as a data member
+ * in a handler class. It is not assignable.
+ */
+class io_service::work
+{
+public:
+  /// Constructor notifies the io_service that work is starting.
+  /**
+   * The constructor is used to inform the io_service that some work has begun.
+   * This ensures that the io_service object's run() function will not exit
+   * while the work is underway.
+   */
+  explicit work(asio::io_service& io_service);
+
+  /// Copy constructor notifies the io_service that work is starting.
+  /**
+   * The constructor is used to inform the io_service that some work has begun.
+   * This ensures that the io_service object's run() function will not exit
+   * while the work is underway.
+   */
+  work(const work& other);
+
+  /// Destructor notifies the io_service that the work is complete.
+  /**
+   * The destructor is used to inform the io_service that some work has
+   * finished. Once the count of unfinished work reaches zero, the io_service
+   * object's run() function is permitted to exit.
+   */
+  ~work();
+
+  /// Get the io_service associated with the work.
+  asio::io_service& get_io_service();
+
+private:
+  // Prevent assignment.
+  void operator=(const work& other);
+
+  // The io_service implementation.
+  detail::io_service_impl& io_service_impl_;
+};
+
+/// Class used to uniquely identify a service.
+class io_service::id
+  : private noncopyable
+{
+public:
+  /// Constructor.
+  id() {}
+};
+
+/// Base class for all io_service services.
+class io_service::service
+  : private noncopyable
+{
+public:
+  /// Get the io_service object that owns the service.
+  asio::io_service& get_io_service();
+
+protected:
+  /// Constructor.
+  /**
+   * @param owner The io_service object that owns the service.
+   */
+  ASIO_DECL service(asio::io_service& owner);
+
+  /// Destructor.
+  ASIO_DECL virtual ~service();
+
+private:
+  /// Destroy all user-defined handler objects owned by the service.
+  virtual void shutdown_service() = 0;
+
+  /// Handle notification of a fork-related event to perform any necessary
+  /// housekeeping.
+  /**
+   * This function is not a pure virtual so that services only have to
+   * implement it if necessary. The default implementation does nothing.
+   */
+  ASIO_DECL virtual void fork_service(
+      asio::io_service::fork_event event);
+
+  friend class asio::detail::service_registry;
+  struct key
+  {
+    key() : type_info_(0), id_(0) {}
+    const std::type_info* type_info_;
+    const asio::io_service::id* id_;
+  } key_;
+
+  asio::io_service& owner_;
+  service* next_;
+};
+
+/// Exception thrown when trying to add a duplicate service to an io_service.
+class service_already_exists
+  : public std::logic_error
+{
+public:
+  ASIO_DECL service_already_exists();
+};
+
+/// Exception thrown when trying to add a service object to an io_service where
+/// the service has a different owner.
+class invalid_service_owner
+  : public std::logic_error
+{
+public:
+  ASIO_DECL invalid_service_owner();
+};
+
+namespace detail {
+
+// Special derived service id type to keep classes header-file only.
+template <typename Type>
+class service_id
+  : public asio::io_service::id
+{
+};
+
+// Special service base class to keep classes header-file only.
+template <typename Type>
+class service_base
+  : public asio::io_service::service
+{
+public:
+  static asio::detail::service_id<Type> id;
+
+  // Constructor.
+  service_base(asio::io_service& io_service)
+    : asio::io_service::service(io_service)
+  {
+  }
+};
+
+template <typename Type>
+asio::detail::service_id<Type> service_base<Type>::id;
+
+} // namespace detail
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/impl/io_service.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/impl/io_service.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_IO_SERVICE_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address.hpp
new file mode 100644
index 0000000..952a954
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address.hpp
@@ -0,0 +1,200 @@
+//
+// ip/address.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_ADDRESS_HPP
+#define ASIO_IP_ADDRESS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <string>
+#include "asio/error_code.hpp"
+#include "asio/ip/address_v4.hpp"
+#include "asio/ip/address_v6.hpp"
+
+#if !defined(ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// Implements version-independent IP addresses.
+/**
+ * The asio::ip::address class provides the ability to use either IP
+ * version 4 or version 6 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address
+{
+public:
+  /// Default constructor.
+  ASIO_DECL address();
+
+  /// Construct an address from an IPv4 address.
+  ASIO_DECL address(const asio::ip::address_v4& ipv4_address);
+
+  /// Construct an address from an IPv6 address.
+  ASIO_DECL address(const asio::ip::address_v6& ipv6_address);
+
+  /// Copy constructor.
+  ASIO_DECL address(const address& other);
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move constructor.
+  ASIO_DECL address(address&& other);
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Assign from another address.
+  ASIO_DECL address& operator=(const address& other);
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move-assign from another address.
+  ASIO_DECL address& operator=(address&& other);
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Assign from an IPv4 address.
+  ASIO_DECL address& operator=(
+      const asio::ip::address_v4& ipv4_address);
+
+  /// Assign from an IPv6 address.
+  ASIO_DECL address& operator=(
+      const asio::ip::address_v6& ipv6_address);
+
+  /// Get whether the address is an IP version 4 address.
+  bool is_v4() const
+  {
+    return type_ == ipv4;
+  }
+
+  /// Get whether the address is an IP version 6 address.
+  bool is_v6() const
+  {
+    return type_ == ipv6;
+  }
+
+  /// Get the address as an IP version 4 address.
+  ASIO_DECL asio::ip::address_v4 to_v4() const;
+
+  /// Get the address as an IP version 6 address.
+  ASIO_DECL asio::ip::address_v6 to_v6() const;
+
+  /// Get the address as a string in dotted decimal format.
+  ASIO_DECL std::string to_string() const;
+
+  /// Get the address as a string in dotted decimal format.
+  ASIO_DECL std::string to_string(asio::error_code& ec) const;
+
+  /// Create an address from an IPv4 address string in dotted decimal form,
+  /// or from an IPv6 address in hexadecimal notation.
+  ASIO_DECL static address from_string(const char* str);
+
+  /// Create an address from an IPv4 address string in dotted decimal form,
+  /// or from an IPv6 address in hexadecimal notation.
+  ASIO_DECL static address from_string(
+      const char* str, asio::error_code& ec);
+
+  /// Create an address from an IPv4 address string in dotted decimal form,
+  /// or from an IPv6 address in hexadecimal notation.
+  ASIO_DECL static address from_string(const std::string& str);
+
+  /// Create an address from an IPv4 address string in dotted decimal form,
+  /// or from an IPv6 address in hexadecimal notation.
+  ASIO_DECL static address from_string(
+      const std::string& str, asio::error_code& ec);
+
+  /// Determine whether the address is a loopback address.
+  ASIO_DECL bool is_loopback() const;
+
+  /// Determine whether the address is unspecified.
+  ASIO_DECL bool is_unspecified() const;
+
+  /// Determine whether the address is a multicast address.
+  ASIO_DECL bool is_multicast() const;
+
+  /// Compare two addresses for equality.
+  ASIO_DECL friend bool operator==(const address& a1, const address& a2);
+
+  /// Compare two addresses for inequality.
+  friend bool operator!=(const address& a1, const address& a2)
+  {
+    return !(a1 == a2);
+  }
+
+  /// Compare addresses for ordering.
+  ASIO_DECL friend bool operator<(const address& a1, const address& a2);
+
+  /// Compare addresses for ordering.
+  friend bool operator>(const address& a1, const address& a2)
+  {
+    return a2 < a1;
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator<=(const address& a1, const address& a2)
+  {
+    return !(a2 < a1);
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator>=(const address& a1, const address& a2)
+  {
+    return !(a1 < a2);
+  }
+
+private:
+  // The type of the address.
+  enum { ipv4, ipv6 } type_;
+
+  // The underlying IPv4 address.
+  asio::ip::address_v4 ipv4_address_;
+
+  // The underlying IPv6 address.
+  asio::ip::address_v6 ipv6_address_;
+};
+
+#if !defined(ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates asio::ip::address
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+    std::basic_ostream<Elem, Traits>& os, const address& addr);
+
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/ip/impl/address.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/ip/impl/address.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_IP_ADDRESS_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v4.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v4.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v4.hpp
new file mode 100644
index 0000000..d6c81af
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v4.hpp
@@ -0,0 +1,241 @@
+//
+// ip/address_v4.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_ADDRESS_V4_HPP
+#define ASIO_IP_ADDRESS_V4_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <string>
+#include "asio/detail/array.hpp"
+#include "asio/detail/socket_types.hpp"
+#include "asio/detail/winsock_init.hpp"
+#include "asio/error_code.hpp"
+
+#if !defined(ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// Implements IP version 4 style addresses.
+/**
+ * The asio::ip::address_v4 class provides the ability to use and
+ * manipulate IP version 4 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address_v4
+{
+public:
+  /// The type used to represent an address as an array of bytes.
+  /**
+   * @note This type is defined in terms of the C++0x template @c std::array
+   * when it is available. Otherwise, it uses @c boost:array.
+   */
+#if defined(GENERATING_DOCUMENTATION)
+  typedef array<unsigned char, 4> bytes_type;
+#else
+  typedef asio::detail::array<unsigned char, 4> bytes_type;
+#endif
+
+  /// Default constructor.
+  address_v4()
+  {
+    addr_.s_addr = 0;
+  }
+
+  /// Construct an address from raw bytes.
+  ASIO_DECL explicit address_v4(const bytes_type& bytes);
+
+  /// Construct an address from a unsigned long in host byte order.
+  ASIO_DECL explicit address_v4(unsigned long addr);
+
+  /// Copy constructor.
+  address_v4(const address_v4& other)
+    : addr_(other.addr_)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move constructor.
+  address_v4(address_v4&& other)
+    : addr_(other.addr_)
+  {
+  }
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Assign from another address.
+  address_v4& operator=(const address_v4& other)
+  {
+    addr_ = other.addr_;
+    return *this;
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move-assign from another address.
+  address_v4& operator=(address_v4&& other)
+  {
+    addr_ = other.addr_;
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Get the address in bytes, in network byte order.
+  ASIO_DECL bytes_type to_bytes() const;
+
+  /// Get the address as an unsigned long in host byte order
+  ASIO_DECL unsigned long to_ulong() const;
+
+  /// Get the address as a string in dotted decimal format.
+  ASIO_DECL std::string to_string() const;
+
+  /// Get the address as a string in dotted decimal format.
+  ASIO_DECL std::string to_string(asio::error_code& ec) const;
+
+  /// Create an address from an IP address string in dotted decimal form.
+  ASIO_DECL static address_v4 from_string(const char* str);
+
+  /// Create an address from an IP address string in dotted decimal form.
+  ASIO_DECL static address_v4 from_string(
+      const char* str, asio::error_code& ec);
+
+  /// Create an address from an IP address string in dotted decimal form.
+  ASIO_DECL static address_v4 from_string(const std::string& str);
+
+  /// Create an address from an IP address string in dotted decimal form.
+  ASIO_DECL static address_v4 from_string(
+      const std::string& str, asio::error_code& ec);
+
+  /// Determine whether the address is a loopback address.
+  ASIO_DECL bool is_loopback() const;
+
+  /// Determine whether the address is unspecified.
+  ASIO_DECL bool is_unspecified() const;
+
+  /// Determine whether the address is a class A address.
+  ASIO_DECL bool is_class_a() const;
+
+  /// Determine whether the address is a class B address.
+  ASIO_DECL bool is_class_b() const;
+
+  /// Determine whether the address is a class C address.
+  ASIO_DECL bool is_class_c() const;
+
+  /// Determine whether the address is a multicast address.
+  ASIO_DECL bool is_multicast() const;
+
+  /// Compare two addresses for equality.
+  friend bool operator==(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.addr_.s_addr == a2.addr_.s_addr;
+  }
+
+  /// Compare two addresses for inequality.
+  friend bool operator!=(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.addr_.s_addr != a2.addr_.s_addr;
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator<(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.to_ulong() < a2.to_ulong();
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator>(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.to_ulong() > a2.to_ulong();
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator<=(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.to_ulong() <= a2.to_ulong();
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator>=(const address_v4& a1, const address_v4& a2)
+  {
+    return a1.to_ulong() >= a2.to_ulong();
+  }
+
+  /// Obtain an address object that represents any address.
+  static address_v4 any()
+  {
+    return address_v4();
+  }
+
+  /// Obtain an address object that represents the loopback address.
+  static address_v4 loopback()
+  {
+    return address_v4(0x7F000001);
+  }
+
+  /// Obtain an address object that represents the broadcast address.
+  static address_v4 broadcast()
+  {
+    return address_v4(0xFFFFFFFF);
+  }
+
+  /// Obtain an address object that represents the broadcast address that
+  /// corresponds to the specified address and netmask.
+  ASIO_DECL static address_v4 broadcast(
+      const address_v4& addr, const address_v4& mask);
+
+  /// Obtain the netmask that corresponds to the address, based on its address
+  /// class.
+  ASIO_DECL static address_v4 netmask(const address_v4& addr);
+
+private:
+  // The underlying IPv4 address.
+  asio::detail::in4_addr_type addr_;
+};
+
+#if !defined(ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates asio::ip::address_v4
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+    std::basic_ostream<Elem, Traits>& os, const address_v4& addr);
+
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/ip/impl/address_v4.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/ip/impl/address_v4.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_IP_ADDRESS_V4_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v6.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v6.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v6.hpp
new file mode 100644
index 0000000..712386a
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/address_v6.hpp
@@ -0,0 +1,246 @@
+//
+// ip/address_v6.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_ADDRESS_V6_HPP
+#define ASIO_IP_ADDRESS_V6_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <string>
+#include "asio/detail/array.hpp"
+#include "asio/detail/socket_types.hpp"
+#include "asio/detail/winsock_init.hpp"
+#include "asio/error_code.hpp"
+#include "asio/ip/address_v4.hpp"
+
+#if !defined(ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// Implements IP version 6 style addresses.
+/**
+ * The asio::ip::address_v6 class provides the ability to use and
+ * manipulate IP version 6 addresses.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+class address_v6
+{
+public:
+  /// The type used to represent an address as an array of bytes.
+  /**
+   * @note This type is defined in terms of the C++0x template @c std::array
+   * when it is available. Otherwise, it uses @c boost:array.
+   */
+#if defined(GENERATING_DOCUMENTATION)
+  typedef array<unsigned char, 16> bytes_type;
+#else
+  typedef asio::detail::array<unsigned char, 16> bytes_type;
+#endif
+
+  /// Default constructor.
+  ASIO_DECL address_v6();
+
+  /// Construct an address from raw bytes and scope ID.
+  ASIO_DECL explicit address_v6(const bytes_type& bytes,
+      unsigned long scope_id = 0);
+
+  /// Copy constructor.
+  ASIO_DECL address_v6(const address_v6& other);
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move constructor.
+  ASIO_DECL address_v6(address_v6&& other);
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Assign from another address.
+  ASIO_DECL address_v6& operator=(const address_v6& other);
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move-assign from another address.
+  ASIO_DECL address_v6& operator=(address_v6&& other);
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// The scope ID of the address.
+  /**
+   * Returns the scope ID associated with the IPv6 address.
+   */
+  unsigned long scope_id() const
+  {
+    return scope_id_;
+  }
+
+  /// The scope ID of the address.
+  /**
+   * Modifies the scope ID associated with the IPv6 address.
+   */
+  void scope_id(unsigned long id)
+  {
+    scope_id_ = id;
+  }
+
+  /// Get the address in bytes, in network byte order.
+  ASIO_DECL bytes_type to_bytes() const;
+
+  /// Get the address as a string.
+  ASIO_DECL std::string to_string() const;
+
+  /// Get the address as a string.
+  ASIO_DECL std::string to_string(asio::error_code& ec) const;
+
+  /// Create an address from an IP address string.
+  ASIO_DECL static address_v6 from_string(const char* str);
+
+  /// Create an address from an IP address string.
+  ASIO_DECL static address_v6 from_string(
+      const char* str, asio::error_code& ec);
+
+  /// Create an address from an IP address string.
+  ASIO_DECL static address_v6 from_string(const std::string& str);
+
+  /// Create an address from an IP address string.
+  ASIO_DECL static address_v6 from_string(
+      const std::string& str, asio::error_code& ec);
+
+  /// Converts an IPv4-mapped or IPv4-compatible address to an IPv4 address.
+  ASIO_DECL address_v4 to_v4() const;
+
+  /// Determine whether the address is a loopback address.
+  ASIO_DECL bool is_loopback() const;
+
+  /// Determine whether the address is unspecified.
+  ASIO_DECL bool is_unspecified() const;
+
+  /// Determine whether the address is link local.
+  ASIO_DECL bool is_link_local() const;
+
+  /// Determine whether the address is site local.
+  ASIO_DECL bool is_site_local() const;
+
+  /// Determine whether the address is a mapped IPv4 address.
+  ASIO_DECL bool is_v4_mapped() const;
+
+  /// Determine whether the address is an IPv4-compatible address.
+  ASIO_DECL bool is_v4_compatible() const;
+
+  /// Determine whether the address is a multicast address.
+  ASIO_DECL bool is_multicast() const;
+
+  /// Determine whether the address is a global multicast address.
+  ASIO_DECL bool is_multicast_global() const;
+
+  /// Determine whether the address is a link-local multicast address.
+  ASIO_DECL bool is_multicast_link_local() const;
+
+  /// Determine whether the address is a node-local multicast address.
+  ASIO_DECL bool is_multicast_node_local() const;
+
+  /// Determine whether the address is a org-local multicast address.
+  ASIO_DECL bool is_multicast_org_local() const;
+
+  /// Determine whether the address is a site-local multicast address.
+  ASIO_DECL bool is_multicast_site_local() const;
+
+  /// Compare two addresses for equality.
+  ASIO_DECL friend bool operator==(
+      const address_v6& a1, const address_v6& a2);
+
+  /// Compare two addresses for inequality.
+  friend bool operator!=(const address_v6& a1, const address_v6& a2)
+  {
+    return !(a1 == a2);
+  }
+
+  /// Compare addresses for ordering.
+  ASIO_DECL friend bool operator<(
+      const address_v6& a1, const address_v6& a2);
+
+  /// Compare addresses for ordering.
+  friend bool operator>(const address_v6& a1, const address_v6& a2)
+  {
+    return a2 < a1;
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator<=(const address_v6& a1, const address_v6& a2)
+  {
+    return !(a2 < a1);
+  }
+
+  /// Compare addresses for ordering.
+  friend bool operator>=(const address_v6& a1, const address_v6& a2)
+  {
+    return !(a1 < a2);
+  }
+
+  /// Obtain an address object that represents any address.
+  static address_v6 any()
+  {
+    return address_v6();
+  }
+
+  /// Obtain an address object that represents the loopback address.
+  ASIO_DECL static address_v6 loopback();
+
+  /// Create an IPv4-mapped IPv6 address.
+  ASIO_DECL static address_v6 v4_mapped(const address_v4& addr);
+
+  /// Create an IPv4-compatible IPv6 address.
+  ASIO_DECL static address_v6 v4_compatible(const address_v4& addr);
+
+private:
+  // The underlying IPv6 address.
+  asio::detail::in6_addr_type addr_;
+
+  // The scope ID associated with the address.
+  unsigned long scope_id_;
+};
+
+#if !defined(ASIO_NO_IOSTREAM)
+
+/// Output an address as a string.
+/**
+ * Used to output a human-readable string for a specified address.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param addr The address to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates asio::ip::address_v6
+ */
+template <typename Elem, typename Traits>
+std::basic_ostream<Elem, Traits>& operator<<(
+    std::basic_ostream<Elem, Traits>& os, const address_v6& addr);
+
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/ip/impl/address_v6.hpp"
+#if defined(ASIO_HEADER_ONLY)
+# include "asio/ip/impl/address_v6.ipp"
+#endif // defined(ASIO_HEADER_ONLY)
+
+#endif // ASIO_IP_ADDRESS_V6_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_endpoint.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_endpoint.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_endpoint.hpp
new file mode 100644
index 0000000..60dcbfa
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_endpoint.hpp
@@ -0,0 +1,263 @@
+//
+// ip/basic_endpoint.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_BASIC_ENDPOINT_HPP
+#define ASIO_IP_BASIC_ENDPOINT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/ip/address.hpp"
+#include "asio/ip/detail/endpoint.hpp"
+
+#if !defined(ASIO_NO_IOSTREAM)
+# include <iosfwd>
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// Describes an endpoint for a version-independent IP socket.
+/**
+ * The asio::ip::basic_endpoint class template describes an endpoint that
+ * may be associated with a particular socket.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ *
+ * @par Concepts:
+ * Endpoint.
+ */
+template <typename InternetProtocol>
+class basic_endpoint
+{
+public:
+  /// The protocol type associated with the endpoint.
+  typedef InternetProtocol protocol_type;
+
+  /// The type of the endpoint structure. This type is dependent on the
+  /// underlying implementation of the socket layer.
+#if defined(GENERATING_DOCUMENTATION)
+  typedef implementation_defined data_type;
+#else
+  typedef asio::detail::socket_addr_type data_type;
+#endif
+
+  /// Default constructor.
+  basic_endpoint()
+    : impl_()
+  {
+  }
+
+  /// Construct an endpoint using a port number, specified in the host's byte
+  /// order. The IP address will be the any address (i.e. INADDR_ANY or
+  /// in6addr_any). This constructor would typically be used for accepting new
+  /// connections.
+  /**
+   * @par Examples
+   * To initialise an IPv4 TCP endpoint for port 1234, use:
+   * @code
+   * asio::ip::tcp::endpoint ep(asio::ip::tcp::v4(), 1234);
+   * @endcode
+   *
+   * To specify an IPv6 UDP endpoint for port 9876, use:
+   * @code
+   * asio::ip::udp::endpoint ep(asio::ip::udp::v6(), 9876);
+   * @endcode
+   */
+  basic_endpoint(const InternetProtocol& internet_protocol,
+      unsigned short port_num)
+    : impl_(internet_protocol.family(), port_num)
+  {
+  }
+
+  /// Construct an endpoint using a port number and an IP address. This
+  /// constructor may be used for accepting connections on a specific interface
+  /// or for making a connection to a remote endpoint.
+  basic_endpoint(const asio::ip::address& addr, unsigned short port_num)
+    : impl_(addr, port_num)
+  {
+  }
+
+  /// Copy constructor.
+  basic_endpoint(const basic_endpoint& other)
+    : impl_(other.impl_)
+  {
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move constructor.
+  basic_endpoint(basic_endpoint&& other)
+    : impl_(other.impl_)
+  {
+  }
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// Assign from another endpoint.
+  basic_endpoint& operator=(const basic_endpoint& other)
+  {
+    impl_ = other.impl_;
+    return *this;
+  }
+
+#if defined(ASIO_HAS_MOVE)
+  /// Move-assign from another endpoint.
+  basic_endpoint& operator=(basic_endpoint&& other)
+  {
+    impl_ = other.impl_;
+    return *this;
+  }
+#endif // defined(ASIO_HAS_MOVE)
+
+  /// The protocol associated with the endpoint.
+  protocol_type protocol() const
+  {
+    if (impl_.is_v4())
+      return InternetProtocol::v4();
+    return InternetProtocol::v6();
+  }
+
+  /// Get the underlying endpoint in the native type.
+  data_type* data()
+  {
+    return impl_.data();
+  }
+
+  /// Get the underlying endpoint in the native type.
+  const data_type* data() const
+  {
+    return impl_.data();
+  }
+
+  /// Get the underlying size of the endpoint in the native type.
+  std::size_t size() const
+  {
+    return impl_.size();
+  }
+
+  /// Set the underlying size of the endpoint in the native type.
+  void resize(std::size_t new_size)
+  {
+    impl_.resize(new_size);
+  }
+
+  /// Get the capacity of the endpoint in the native type.
+  std::size_t capacity() const
+  {
+    return impl_.capacity();
+  }
+
+  /// Get the port associated with the endpoint. The port number is always in
+  /// the host's byte order.
+  unsigned short port() const
+  {
+    return impl_.port();
+  }
+
+  /// Set the port associated with the endpoint. The port number is always in
+  /// the host's byte order.
+  void port(unsigned short port_num)
+  {
+    impl_.port(port_num);
+  }
+
+  /// Get the IP address associated with the endpoint.
+  asio::ip::address address() const
+  {
+    return impl_.address();
+  }
+
+  /// Set the IP address associated with the endpoint.
+  void address(const asio::ip::address& addr)
+  {
+    impl_.address(addr);
+  }
+
+  /// Compare two endpoints for equality.
+  friend bool operator==(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return e1.impl_ == e2.impl_;
+  }
+
+  /// Compare two endpoints for inequality.
+  friend bool operator!=(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return !(e1 == e2);
+  }
+
+  /// Compare endpoints for ordering.
+  friend bool operator<(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return e1.impl_ < e2.impl_;
+  }
+
+  /// Compare endpoints for ordering.
+  friend bool operator>(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return e2.impl_ < e1.impl_;
+  }
+
+  /// Compare endpoints for ordering.
+  friend bool operator<=(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return !(e2 < e1);
+  }
+
+  /// Compare endpoints for ordering.
+  friend bool operator>=(const basic_endpoint<InternetProtocol>& e1,
+      const basic_endpoint<InternetProtocol>& e2)
+  {
+    return !(e1 < e2);
+  }
+
+private:
+  // The underlying IP endpoint.
+  asio::ip::detail::endpoint impl_;
+};
+
+#if !defined(ASIO_NO_IOSTREAM)
+
+/// Output an endpoint as a string.
+/**
+ * Used to output a human-readable string for a specified endpoint.
+ *
+ * @param os The output stream to which the string will be written.
+ *
+ * @param endpoint The endpoint to be written.
+ *
+ * @return The output stream.
+ *
+ * @relates asio::ip::basic_endpoint
+ */
+template <typename Elem, typename Traits, typename InternetProtocol>
+std::basic_ostream<Elem, Traits>& operator<<(
+    std::basic_ostream<Elem, Traits>& os,
+    const basic_endpoint<InternetProtocol>& endpoint);
+
+#endif // !defined(ASIO_NO_IOSTREAM)
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#include "asio/ip/impl/basic_endpoint.hpp"
+
+#endif // ASIO_IP_BASIC_ENDPOINT_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver.hpp
new file mode 100644
index 0000000..7d75d58
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver.hpp
@@ -0,0 +1,268 @@
+//
+// ip/basic_resolver.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_BASIC_RESOLVER_HPP
+#define ASIO_IP_BASIC_RESOLVER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include "asio/basic_io_object.hpp"
+#include "asio/detail/handler_type_requirements.hpp"
+#include "asio/detail/throw_error.hpp"
+#include "asio/error.hpp"
+#include "asio/ip/basic_resolver_iterator.hpp"
+#include "asio/ip/basic_resolver_query.hpp"
+#include "asio/ip/resolver_service.hpp"
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// Provides endpoint resolution functionality.
+/**
+ * The basic_resolver class template provides the ability to resolve a query
+ * to a list of endpoints.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol,
+    typename ResolverService = resolver_service<InternetProtocol> >
+class basic_resolver
+  : public basic_io_object<ResolverService>
+{
+public:
+  /// The protocol type.
+  typedef InternetProtocol protocol_type;
+
+  /// The endpoint type.
+  typedef typename InternetProtocol::endpoint endpoint_type;
+
+  /// The query type.
+  typedef basic_resolver_query<InternetProtocol> query;
+
+  /// The iterator type.
+  typedef basic_resolver_iterator<InternetProtocol> iterator;
+
+  /// Constructor.
+  /**
+   * This constructor creates a basic_resolver.
+   *
+   * @param io_service The io_service object that the resolver will use to
+   * dispatch handlers for any asynchronous operations performed on the timer.
+   */
+  explicit basic_resolver(asio::io_service& io_service)
+    : basic_io_object<ResolverService>(io_service)
+  {
+  }
+
+  /// Cancel any asynchronous operations that are waiting on the resolver.
+  /**
+   * This function forces the completion of any pending asynchronous
+   * operations on the host resolver. The handler for each cancelled operation
+   * will be invoked with the asio::error::operation_aborted error code.
+   */
+  void cancel()
+  {
+    return this->service.cancel(this->implementation);
+  }
+
+  /// Perform forward resolution of a query to a list of entries.
+  /**
+   * This function is used to resolve a query into a list of endpoint entries.
+   *
+   * @param q A query object that determines what endpoints will be returned.
+   *
+   * @returns A forward-only iterator that can be used to traverse the list
+   * of endpoint entries.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful call to this function is guaranteed to return at least one
+   * entry.
+   */
+  iterator resolve(const query& q)
+  {
+    asio::error_code ec;
+    iterator i = this->service.resolve(this->implementation, q, ec);
+    asio::detail::throw_error(ec, "resolve");
+    return i;
+  }
+
+  /// Perform forward resolution of a query to a list of entries.
+  /**
+   * This function is used to resolve a query into a list of endpoint entries.
+   *
+   * @param q A query object that determines what endpoints will be returned.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns A forward-only iterator that can be used to traverse the list
+   * of endpoint entries. Returns a default constructed iterator if an error
+   * occurs.
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful call to this function is guaranteed to return at least one
+   * entry.
+   */
+  iterator resolve(const query& q, asio::error_code& ec)
+  {
+    return this->service.resolve(this->implementation, q, ec);
+  }
+
+  /// Asynchronously perform forward resolution of a query to a list of entries.
+  /**
+   * This function is used to asynchronously resolve a query into a list of
+   * endpoint entries.
+   *
+   * @param q A query object that determines what endpoints will be returned.
+   *
+   * @param handler The handler to be called when the resolve operation
+   * completes. Copies will be made of the handler as required. The function
+   * signature of the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   resolver::iterator iterator             // Forward-only iterator that can
+   *                                           // be used to traverse the list
+   *                                           // of endpoint entries.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_service::post().
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful resolve operation is guaranteed to pass at least one entry to
+   * the handler.
+   */
+  template <typename ResolveHandler>
+  ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+      void (asio::error_code, iterator))
+  async_resolve(const query& q,
+      ASIO_MOVE_ARG(ResolveHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ResolveHandler.
+    ASIO_RESOLVE_HANDLER_CHECK(
+        ResolveHandler, handler, iterator) type_check;
+
+    return this->service.async_resolve(this->implementation, q,
+        ASIO_MOVE_CAST(ResolveHandler)(handler));
+  }
+
+  /// Perform reverse resolution of an endpoint to a list of entries.
+  /**
+   * This function is used to resolve an endpoint into a list of endpoint
+   * entries.
+   *
+   * @param e An endpoint object that determines what endpoints will be
+   * returned.
+   *
+   * @returns A forward-only iterator that can be used to traverse the list
+   * of endpoint entries.
+   *
+   * @throws asio::system_error Thrown on failure.
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful call to this function is guaranteed to return at least one
+   * entry.
+   */
+  iterator resolve(const endpoint_type& e)
+  {
+    asio::error_code ec;
+    iterator i = this->service.resolve(this->implementation, e, ec);
+    asio::detail::throw_error(ec, "resolve");
+    return i;
+  }
+
+  /// Perform reverse resolution of an endpoint to a list of entries.
+  /**
+   * This function is used to resolve an endpoint into a list of endpoint
+   * entries.
+   *
+   * @param e An endpoint object that determines what endpoints will be
+   * returned.
+   *
+   * @param ec Set to indicate what error occurred, if any.
+   *
+   * @returns A forward-only iterator that can be used to traverse the list
+   * of endpoint entries. Returns a default constructed iterator if an error
+   * occurs.
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful call to this function is guaranteed to return at least one
+   * entry.
+   */
+  iterator resolve(const endpoint_type& e, asio::error_code& ec)
+  {
+    return this->service.resolve(this->implementation, e, ec);
+  }
+
+  /// Asynchronously perform reverse resolution of an endpoint to a list of
+  /// entries.
+  /**
+   * This function is used to asynchronously resolve an endpoint into a list of
+   * endpoint entries.
+   *
+   * @param e An endpoint object that determines what endpoints will be
+   * returned.
+   *
+   * @param handler The handler to be called when the resolve operation
+   * completes. Copies will be made of the handler as required. The function
+   * signature of the handler must be:
+   * @code void handler(
+   *   const asio::error_code& error, // Result of operation.
+   *   resolver::iterator iterator             // Forward-only iterator that can
+   *                                           // be used to traverse the list
+   *                                           // of endpoint entries.
+   * ); @endcode
+   * Regardless of whether the asynchronous operation completes immediately or
+   * not, the handler will not be invoked from within this function. Invocation
+   * of the handler will be performed in a manner equivalent to using
+   * asio::io_service::post().
+   *
+   * @note A default constructed iterator represents the end of the list.
+   *
+   * A successful resolve operation is guaranteed to pass at least one entry to
+   * the handler.
+   */
+  template <typename ResolveHandler>
+  ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+      void (asio::error_code, iterator))
+  async_resolve(const endpoint_type& e,
+      ASIO_MOVE_ARG(ResolveHandler) handler)
+  {
+    // If you get an error on the following line it means that your handler does
+    // not meet the documented type requirements for a ResolveHandler.
+    ASIO_RESOLVE_HANDLER_CHECK(
+        ResolveHandler, handler, iterator) type_check;
+
+    return this->service.async_resolve(this->implementation, e,
+        ASIO_MOVE_CAST(ResolveHandler)(handler));
+  }
+};
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IP_BASIC_RESOLVER_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_entry.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_entry.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_entry.hpp
new file mode 100644
index 0000000..13644f3
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_entry.hpp
@@ -0,0 +1,94 @@
+//
+// ip/basic_resolver_entry.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
+#define ASIO_IP_BASIC_RESOLVER_ENTRY_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <string>
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// An entry produced by a resolver.
+/**
+ * The asio::ip::basic_resolver_entry class template describes an entry
+ * as returned by a resolver.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_entry
+{
+public:
+  /// The protocol type associated with the endpoint entry.
+  typedef InternetProtocol protocol_type;
+
+  /// The endpoint type associated with the endpoint entry.
+  typedef typename InternetProtocol::endpoint endpoint_type;
+
+  /// Default constructor.
+  basic_resolver_entry()
+  {
+  }
+
+  /// Construct with specified endpoint, host name and service name.
+  basic_resolver_entry(const endpoint_type& ep,
+      const std::string& host, const std::string& service)
+    : endpoint_(ep),
+      host_name_(host),
+      service_name_(service)
+  {
+  }
+
+  /// Get the endpoint associated with the entry.
+  endpoint_type endpoint() const
+  {
+    return endpoint_;
+  }
+
+  /// Convert to the endpoint associated with the entry.
+  operator endpoint_type() const
+  {
+    return endpoint_;
+  }
+
+  /// Get the host name associated with the entry.
+  std::string host_name() const
+  {
+    return host_name_;
+  }
+
+  /// Get the service name associated with the entry.
+  std::string service_name() const
+  {
+    return service_name_;
+  }
+
+private:
+  endpoint_type endpoint_;
+  std::string host_name_;
+  std::string service_name_;
+};
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IP_BASIC_RESOLVER_ENTRY_HPP

http://git-wip-us.apache.org/repos/asf/hadoop/blob/5b1aba70/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_iterator.hpp
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_iterator.hpp b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_iterator.hpp
new file mode 100644
index 0000000..4c8b0d9
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/native/libhdfspp/third_party/asio-1.10.2/include/asio/ip/basic_resolver_iterator.hpp
@@ -0,0 +1,260 @@
+//
+// ip/basic_resolver_iterator.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// 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)
+//
+
+#ifndef ASIO_IP_BASIC_RESOLVER_ITERATOR_HPP
+#define ASIO_IP_BASIC_RESOLVER_ITERATOR_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include "asio/detail/config.hpp"
+#include <cstddef>
+#include <cstring>
+#include <iterator>
+#include <string>
+#include <vector>
+#include "asio/detail/shared_ptr.hpp"
+#include "asio/detail/socket_ops.hpp"
+#include "asio/detail/socket_types.hpp"
+#include "asio/ip/basic_resolver_entry.hpp"
+
+#if defined(ASIO_WINDOWS_RUNTIME)
+# include "asio/detail/winrt_utils.hpp"
+#endif // defined(ASIO_WINDOWS_RUNTIME)
+
+#include "asio/detail/push_options.hpp"
+
+namespace asio {
+namespace ip {
+
+/// An iterator over the entries produced by a resolver.
+/**
+ * The asio::ip::basic_resolver_iterator class template is used to define
+ * iterators over the results returned by a resolver.
+ *
+ * The iterator's value_type, obtained when the iterator is dereferenced, is:
+ * @code const basic_resolver_entry<InternetProtocol> @endcode
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_iterator
+{
+public:
+  /// The type used for the distance between two iterators.
+  typedef std::ptrdiff_t difference_type;
+
+  /// The type of the value pointed to by the iterator.
+  typedef basic_resolver_entry<InternetProtocol> value_type;
+
+  /// The type of the result of applying operator->() to the iterator.
+  typedef const basic_resolver_entry<InternetProtocol>* pointer;
+
+  /// The type of the result of applying operator*() to the iterator.
+  typedef const basic_resolver_entry<InternetProtocol>& reference;
+
+  /// The iterator category.
+  typedef std::forward_iterator_tag iterator_category;
+
+  /// Default constructor creates an end iterator.
+  basic_resolver_iterator()
+    : index_(0)
+  {
+  }
+
+  /// Create an iterator from an addrinfo list returned by getaddrinfo.
+  static basic_resolver_iterator create(
+      asio::detail::addrinfo_type* address_info,
+      const std::string& host_name, const std::string& service_name)
+  {
+    basic_resolver_iterator iter;
+    if (!address_info)
+      return iter;
+
+    std::string actual_host_name = host_name;
+    if (address_info->ai_canonname)
+      actual_host_name = address_info->ai_canonname;
+
+    iter.values_.reset(new values_type);
+
+    while (address_info)
+    {
+      if (address_info->ai_family == ASIO_OS_DEF(AF_INET)
+          || address_info->ai_family == ASIO_OS_DEF(AF_INET6))
+      {
+        using namespace std; // For memcpy.
+        typename InternetProtocol::endpoint endpoint;
+        endpoint.resize(static_cast<std::size_t>(address_info->ai_addrlen));
+        memcpy(endpoint.data(), address_info->ai_addr,
+            address_info->ai_addrlen);
+        iter.values_->push_back(
+            basic_resolver_entry<InternetProtocol>(endpoint,
+              actual_host_name, service_name));
+      }
+      address_info = address_info->ai_next;
+    }
+
+    return iter;
+  }
+
+  /// Create an iterator from an endpoint, host name and service name.
+  static basic_resolver_iterator create(
+      const typename InternetProtocol::endpoint& endpoint,
+      const std::string& host_name, const std::string& service_name)
+  {
+    basic_resolver_iterator iter;
+    iter.values_.reset(new values_type);
+    iter.values_->push_back(
+        basic_resolver_entry<InternetProtocol>(
+          endpoint, host_name, service_name));
+    return iter;
+  }
+
+  /// Create an iterator from a sequence of endpoints, host and service name.
+  template <typename EndpointIterator>
+  static basic_resolver_iterator create(
+      EndpointIterator begin, EndpointIterator end,
+      const std::string& host_name, const std::string& service_name)
+  {
+    basic_resolver_iterator iter;
+    if (begin != end)
+    {
+      iter.values_.reset(new values_type);
+      for (EndpointIterator ep_iter = begin; ep_iter != end; ++ep_iter)
+      {
+        iter.values_->push_back(
+            basic_resolver_entry<InternetProtocol>(
+              *ep_iter, host_name, service_name));
+      }
+    }
+    return iter;
+  }
+
+#if defined(ASIO_WINDOWS_RUNTIME)
+  /// Create an iterator from a Windows Runtime list of EndpointPair objects.
+  static basic_resolver_iterator create(
+      Windows::Foundation::Collections::IVectorView<
+        Windows::Networking::EndpointPair^>^ endpoints,
+      const asio::detail::addrinfo_type& hints,
+      const std::string& host_name, const std::string& service_name)
+  {
+    basic_resolver_iterator iter;
+    if (endpoints->Size)
+    {
+      iter.values_.reset(new values_type);
+      for (unsigned int i = 0; i < endpoints->Size; ++i)
+      {
+        auto pair = endpoints->GetAt(i);
+
+        if (hints.ai_family == ASIO_OS_DEF(AF_INET)
+            && pair->RemoteHostName->Type
+              != Windows::Networking::HostNameType::Ipv4)
+          continue;
+
+        if (hints.ai_family == ASIO_OS_DEF(AF_INET6)
+            && pair->RemoteHostName->Type
+              != Windows::Networking::HostNameType::Ipv6)
+          continue;
+
+        iter.values_->push_back(
+            basic_resolver_entry<InternetProtocol>(
+              typename InternetProtocol::endpoint(
+                ip::address::from_string(
+                  asio::detail::winrt_utils::string(
+                    pair->RemoteHostName->CanonicalName)),
+                asio::detail::winrt_utils::integer(
+                  pair->RemoteServiceName)),
+              host_name, service_name));
+      }
+    }
+    return iter;
+  }
+#endif // defined(ASIO_WINDOWS_RUNTIME)
+
+  /// Dereference an iterator.
+  const basic_resolver_entry<InternetProtocol>& operator*() const
+  {
+    return dereference();
+  }
+
+  /// Dereference an iterator.
+  const basic_resolver_entry<InternetProtocol>* operator->() const
+  {
+    return &dereference();
+  }
+
+  /// Increment operator (prefix).
+  basic_resolver_iterator& operator++()
+  {
+    increment();
+    return *this;
+  }
+
+  /// Increment operator (postfix).
+  basic_resolver_iterator operator++(int)
+  {
+    basic_resolver_iterator tmp(*this);
+    ++*this;
+    return tmp;
+  }
+
+  /// Test two iterators for equality.
+  friend bool operator==(const basic_resolver_iterator& a,
+      const basic_resolver_iterator& b)
+  {
+    return a.equal(b);
+  }
+
+  /// Test two iterators for inequality.
+  friend bool operator!=(const basic_resolver_iterator& a,
+      const basic_resolver_iterator& b)
+  {
+    return !a.equal(b);
+  }
+
+private:
+  void increment()
+  {
+    if (++index_ == values_->size())
+    {
+      // Reset state to match a default constructed end iterator.
+      values_.reset();
+      index_ = 0;
+    }
+  }
+
+  bool equal(const basic_resolver_iterator& other) const
+  {
+    if (!values_ && !other.values_)
+      return true;
+    if (values_ != other.values_)
+      return false;
+    return index_ == other.index_;
+  }
+
+  const basic_resolver_entry<InternetProtocol>& dereference() const
+  {
+    return (*values_)[index_];
+  }
+
+  typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+  asio::detail::shared_ptr<values_type> values_;
+  std::size_t index_;
+};
+
+} // namespace ip
+} // namespace asio
+
+#include "asio/detail/pop_options.hpp"
+
+#endif // ASIO_IP_BASIC_RESOLVER_ITERATOR_HPP