Skip to content

Commit a12abb5

Browse files
committed
Added config.hpp to project (similar to uri/config.hpp) for compiler portability.
1 parent 60ad281 commit a12abb5

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ endif()
127127

128128
if(CPP-NETLIB_BUILD_SINGLE_LIB)
129129
include_directories(
130+
${CMAKE_CURRENT_SOURCE_DIR}/config/src
130131
${CMAKE_CURRENT_SOURCE_DIR}/concurrency/src
131132
${CMAKE_CURRENT_SOURCE_DIR}/http/src
132133
${CMAKE_CURRENT_SOURCE_DIR}/logging/src

config/src/network/config.hpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) Glyn Matthews 2012, 2013.
2+
// Copyright 2012 Dean Michael Berris <dberris@google.com>
3+
// Copyright 2012 Google, Inc.
4+
// Distributed under the Boost Software License, Version 1.0.
5+
// (See accompanying file LICENSE_1_0.txt or copy at
6+
// http://www.boost.org/LICENSE_1_0.txt)
7+
8+
9+
#ifndef NETWORK_CONFIG_INC
10+
#define NETWORK_CONFIG_INC
11+
12+
#include <boost/config.hpp>
13+
#include <boost/detail/workaround.hpp>
14+
15+
#if defined(BOOST_ALL_DYN_LINK)
16+
#define NETWORK_DECL BOOST_SYMBOL_EXPORT
17+
#else
18+
#define NETWORK_DECL
19+
#endif // defined(BOOST_ALL_DYN_LINK)
20+
21+
#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
22+
#define NETWORK_DEFAULTED_FUNCTION {}
23+
#else
24+
#define NETWORK_DEFAULTED_FUNCTION = default
25+
#endif // defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
26+
27+
#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
28+
#define NETWORK_DELETED_FUNCTION {}
29+
#else
30+
#define NETWORK_DELETED_FUNCTION = delete
31+
#endif // defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
32+
33+
#if defined(BOOST_NO_CXX11_NOEXCEPT)
34+
#define NETWORK_NOEXCEPT throw()
35+
#else
36+
#define NETWORK_NOEXCEPT noexcept
37+
#endif // defined(BOOST_NO_CXX11_NOEXCEPT)
38+
39+
#if defined(BOOST_NO_CXX11_OVERRIDE)
40+
#define NETWORK_OVERRIDE
41+
#else
42+
#define NETWORK_OVERRIDE override
43+
#endif // defined(BOOST_NO_CXX11_OVERRIDE)
44+
45+
#endif // NETWORK_CONFIG_INC

0 commit comments

Comments
 (0)