Commit 398cfdd6 authored by Tomek Mrugalski's avatar Tomek Mrugalski

[#293,!45] Add coroutine.hpp back to the kea sources

parent 14b9c940
......@@ -600,3 +600,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
limitations under the License.
--- end of Apache 2.0 license -----------------------------------------------
The ext/coroutine code is externally maintained and distributed under
the Boost Software License, Version 1.0. (See its accompanying file
LICENSE_1_0.txt.)
......@@ -102,6 +102,7 @@ endif
if HAVE_BOTAN
botan/\* \
endif
ext/coroutine/\* \
gtest/\* \
include/\* \
lib/\eval/\* \
......@@ -149,6 +150,9 @@ install-exec-hook:
EXTRA_DIST = tools/path_replacer.sh
EXTRA_DIST += tools/mk_cfgrpt.sh
#### include external sources in the distributed tarball:
EXTRA_DIST += ext/coroutine/coroutine.hpp
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dns++.pc
......
......@@ -1290,6 +1290,10 @@ fi
#
# ASIO: we extensively use it as the C++ event management module.
#
# Use our 'coroutine' header from ext
# CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
#
# Doesn't seem to be required?
CPPFLAGS="$CPPFLAGS -DBOOST_ASIO_HEADER_ONLY"
......
SUBDIRS = .
SUBDIRS = coroutine
if HAVE_GTEST_SOURCE
SUBDIRS += gtest
......
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
EXTRA_DIST = LICENSE_1_0.txt
This diff is collapsed.
......@@ -74,9 +74,11 @@ if test "${boost_include_path}" ; then
BOOST_INCLUDES="-I${boost_include_path}"
CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
fi
AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync/interprocess_upgradable_mutex.hpp boost/date_time/posix_time/posix_time_types.hpp boost/bind.hpp boost/function.hpp boost/asio/coroutine.hpp boost/asio.hpp boost/asio/ip/address.hpp boost/system/error_code.hpp],,
AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync/interprocess_upgradable_mutex.hpp boost/date_time/posix_time/posix_time_types.hpp boost/bind.hpp boost/function.hpp boost/asio.hpp boost/asio/ip/address.hpp boost/system/error_code.hpp],,
AC_MSG_ERROR([Missing required header files.]))
AC_CHECK_HEADER(boost/asio/coroutine.hpp,,AC_MSG_RESULT(not found, using built-in header.))
# clang can cause false positives with -Werror without -Qunused-arguments.
# it can be triggered if used with ccache.
AC_CHECK_DECL([__clang__], [CLANG_CXXFLAGS="-Qunused-arguments"], [])
......
......@@ -7,11 +7,17 @@
#ifndef IO_FETCH_H
#define IO_FETCH_H 1
#include <config.h>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#ifdef HAVE_BOOST_ASIO_COROUTINE_HPP
#include <boost/asio/coroutine.hpp>
#else
#include <ext/coroutine/coroutine.hpp>
#endif
#include <boost/system/error_code.hpp>
#include <asiolink/io_address.h>
......
......@@ -10,6 +10,8 @@
// IMPORTANT NOTE: only very few ASIO headers files can be included in
// this file. In particular, asio.hpp should never be included here.
// See the description of the namespace below.
#include <config.h>
#include <unistd.h> // for some network system calls
#include <functional>
......@@ -22,7 +24,11 @@
#include <asiolink/io_error.h>
#include <asiolink/io_socket.h>
#ifndef HAVE_BOOST_ASIO_COROUTINE_HPP
#include <ext/coroutine/coroutine.hpp>
#else
#include <boost/asio/coroutine.hpp>
#endif
namespace isc {
namespace asiolink {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment