diff --git a/libtorrent/configure.ac b/libtorrent/configure.ac index e4b6334e..19f23b26 100644 --- a/libtorrent/configure.ac +++ b/libtorrent/configure.ac @@ -28,15 +28,14 @@ AC_C_BIGENDIAN( AC_MSG_ERROR([Could not determine endianness]) ) +AX_CXX_COMPILE_STDCXX(17, noext, mandatory) + RAK_CHECK_CFLAGS RAK_CHECK_CXXFLAGS RAK_ENABLE_DEBUG RAK_ENABLE_EXTRA_DEBUG RAK_ENABLE_WERROR -RAK_CHECK_CXX11 -RAK_CHECK_TR1_LIB - AC_SYS_LARGEFILE TORRENT_ENABLE_ALIGNED diff --git a/libtorrent/rak/priority_queue_default.h b/libtorrent/rak/priority_queue_default.h index aa712ce5..794b8116 100644 --- a/libtorrent/rak/priority_queue_default.h +++ b/libtorrent/rak/priority_queue_default.h @@ -37,7 +37,7 @@ #ifndef RAK_PRIORITY_QUEUE_DEFAULT_H #define RAK_PRIORITY_QUEUE_DEFAULT_H -#include lt_tr1_functional +#include #include #include #include diff --git a/libtorrent/scripts/rak_cxx.m4 b/libtorrent/scripts/rak_cxx.m4 deleted file mode 100644 index 3660f3a7..00000000 --- a/libtorrent/scripts/rak_cxx.m4 +++ /dev/null @@ -1,61 +0,0 @@ -AC_DEFUN([RAK_CHECK_CXX11], [ - AC_ARG_ENABLE([c++0x], - AC_HELP_STRING([--enable-c++0x], [compile with C++0x (unsupported)]), - [ - if test "$enableval" = "yes"; then - AX_CXX_COMPILE_STDCXX_0X - else - AX_CXX_COMPILE_STDCXX_11(noext) - fi - ],[ - AX_CXX_COMPILE_STDCXX_11(noext) - ] - ) -]) - -AC_DEFUN([RAK_CHECK_TR1_LIB], [ - AC_LANG_PUSH(C++) - AC_MSG_CHECKING(should use TR1 headers) - - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - class Foo; typedef std::unordered_map Bar; - Bar b1; - ]) - ], [ - AC_MSG_RESULT(no) - AC_DEFINE(USE_TR1_LIB, 0, Define to 1 if you need to use TR1 containers.) - - AC_DEFINE([lt_tr1_array], [], [TR1 array]) - AC_DEFINE([lt_tr1_functional], [], [TR1 functional]) - AC_DEFINE([lt_tr1_memory], [], [TR1 memory]) - AC_DEFINE([lt_tr1_unordered_map], [], [TR1 unordered_map]) - - ], [ - AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - class Foo; typedef std::tr1::unordered_map Bar; - Bar b1; - ]) - ], [ - AC_MSG_RESULT([yes]) - AC_DEFINE(USE_TR1_LIB, 1, Define to 1 if you need to use TR1 containers.) - - AC_DEFINE([lt_tr1_array], [], [TR1 array]) - AC_DEFINE([lt_tr1_functional], [], [TR1 functional]) - AC_DEFINE([lt_tr1_memory], [], [TR1 memory]) - AC_DEFINE([lt_tr1_unordered_map], [], [TR1 unordered_map]) - - ], [ - AC_MSG_ERROR([No support for C++11 standard library nor TR1 extensions found.]) - ]) - ]) - - AH_VERBATIM(lt_tr1_zzz, [ -#if USE_TR1_LIB == 1 -namespace std { namespace tr1 {} using namespace tr1; } -#endif -]) - - AC_LANG_POP(C++) -]) diff --git a/libtorrent/src/data/chunk_list.h b/libtorrent/src/data/chunk_list.h index b6ff4cdb..2c4363f3 100644 --- a/libtorrent/src/data/chunk_list.h +++ b/libtorrent/src/data/chunk_list.h @@ -39,8 +39,7 @@ #include #include -#include lt_tr1_functional - +#include #include "chunk.h" #include "chunk_handle.h" #include "chunk_list_node.h" diff --git a/libtorrent/src/data/hash_check_queue.h b/libtorrent/src/data/hash_check_queue.h index b933f137..1c3d18b7 100644 --- a/libtorrent/src/data/hash_check_queue.h +++ b/libtorrent/src/data/hash_check_queue.h @@ -39,7 +39,7 @@ #include #include -#include lt_tr1_functional +#include #include "rak/allocators.h" diff --git a/libtorrent/src/download/delegator.h b/libtorrent/src/download/delegator.h index ca5363c8..31b0bc2a 100644 --- a/libtorrent/src/download/delegator.h +++ b/libtorrent/src/download/delegator.h @@ -39,7 +39,7 @@ #include #include -#include lt_tr1_functional +#include #include "torrent/data/transfer_list.h" diff --git a/libtorrent/src/net/listen.h b/libtorrent/src/net/listen.h index b3c845aa..e2f2822b 100644 --- a/libtorrent/src/net/listen.h +++ b/libtorrent/src/net/listen.h @@ -38,7 +38,7 @@ #define LIBTORRENT_LISTEN_H #include -#include lt_tr1_functional +#include #include #include "socket_base.h" diff --git a/libtorrent/src/net/throttle_node.h b/libtorrent/src/net/throttle_node.h index 77cb6cc7..5af27a22 100644 --- a/libtorrent/src/net/throttle_node.h +++ b/libtorrent/src/net/throttle_node.h @@ -37,7 +37,7 @@ #ifndef LIBTORRENT_NET_THROTTLE_NODE_H #define LIBTORRENT_NET_THROTTLE_NODE_H -#include lt_tr1_functional +#include #include "torrent/rate.h" diff --git a/libtorrent/src/torrent/data/download_data.h b/libtorrent/src/torrent/data/download_data.h index 2b9c9412..fc212047 100644 --- a/libtorrent/src/torrent/data/download_data.h +++ b/libtorrent/src/torrent/data/download_data.h @@ -37,7 +37,7 @@ #ifndef LIBTORRENT_DATA_DOWNLOAD_DATA_H #define LIBTORRENT_DATA_DOWNLOAD_DATA_H -#include lt_tr1_functional +#include #include #include diff --git a/libtorrent/src/torrent/data/transfer_list.h b/libtorrent/src/torrent/data/transfer_list.h index 0a359b5e..c17bd33b 100644 --- a/libtorrent/src/torrent/data/transfer_list.h +++ b/libtorrent/src/torrent/data/transfer_list.h @@ -39,7 +39,7 @@ #include #include -#include lt_tr1_functional +#include namespace torrent { diff --git a/libtorrent/src/torrent/download/group_entry.h b/libtorrent/src/torrent/download/group_entry.h index 48becaff..c7a6e82b 100644 --- a/libtorrent/src/torrent/download/group_entry.h +++ b/libtorrent/src/torrent/download/group_entry.h @@ -39,7 +39,7 @@ #include #include -#include lt_tr1_functional +#include #include #include diff --git a/libtorrent/src/torrent/download_info.h b/libtorrent/src/torrent/download_info.h index 341e4c25..b80060f8 100644 --- a/libtorrent/src/torrent/download_info.h +++ b/libtorrent/src/torrent/download_info.h @@ -40,7 +40,7 @@ #include #include #include -#include lt_tr1_functional +#include #include #include diff --git a/libtorrent/src/torrent/poll.h b/libtorrent/src/torrent/poll.h index 882c4b3d..9e747959 100644 --- a/libtorrent/src/torrent/poll.h +++ b/libtorrent/src/torrent/poll.h @@ -37,7 +37,7 @@ #ifndef LIBTORRENT_TORRENT_POLL_H #define LIBTORRENT_TORRENT_POLL_H -#include lt_tr1_functional +#include #include diff --git a/libtorrent/src/torrent/tracker_controller.h b/libtorrent/src/torrent/tracker_controller.h index 70d1b43f..6167e7e6 100644 --- a/libtorrent/src/torrent/tracker_controller.h +++ b/libtorrent/src/torrent/tracker_controller.h @@ -38,7 +38,7 @@ #define LIBTORRENT_TRACKER_CONTROLLER_H #include -#include lt_tr1_functional +#include #include #include diff --git a/libtorrent/src/torrent/tracker_list.h b/libtorrent/src/torrent/tracker_list.h index c6817b3a..dd080833 100644 --- a/libtorrent/src/torrent/tracker_list.h +++ b/libtorrent/src/torrent/tracker_list.h @@ -41,7 +41,7 @@ #include #include #include -#include lt_tr1_functional +#include namespace torrent { diff --git a/libtorrent/src/torrent/utils/log.h b/libtorrent/src/torrent/utils/log.h index c843c095..5707093e 100644 --- a/libtorrent/src/torrent/utils/log.h +++ b/libtorrent/src/torrent/utils/log.h @@ -40,8 +40,8 @@ #include #include #include -#include lt_tr1_array -#include lt_tr1_functional +#include +#include #include namespace torrent { diff --git a/libtorrent/src/torrent/utils/log_buffer.h b/libtorrent/src/torrent/utils/log_buffer.h index befd780b..1ecc4704 100644 --- a/libtorrent/src/torrent/utils/log_buffer.h +++ b/libtorrent/src/torrent/utils/log_buffer.h @@ -40,7 +40,7 @@ #include #include #include -#include lt_tr1_functional +#include #include namespace torrent { diff --git a/libtorrent/src/torrent/utils/net.h b/libtorrent/src/torrent/utils/net.h index f5af7cc0..3147093e 100644 --- a/libtorrent/src/torrent/utils/net.h +++ b/libtorrent/src/torrent/utils/net.h @@ -38,7 +38,7 @@ #define LIBTORRENT_UTILS_NET_H #include -#include lt_tr1_functional +#include namespace torrent { diff --git a/libtorrent/src/torrent/utils/signal_bitfield.h b/libtorrent/src/torrent/utils/signal_bitfield.h index b9f57a60..52ec0bd2 100644 --- a/libtorrent/src/torrent/utils/signal_bitfield.h +++ b/libtorrent/src/torrent/utils/signal_bitfield.h @@ -37,7 +37,7 @@ #ifndef LIBTORRENT_UTILS_SIGNAL_BITFIELD_H #define LIBTORRENT_UTILS_SIGNAL_BITFIELD_H -#include lt_tr1_functional +#include #include namespace torrent { diff --git a/libtorrent/src/torrent/utils/thread_base.h b/libtorrent/src/torrent/utils/thread_base.h index bfd443ae..72ca4515 100644 --- a/libtorrent/src/torrent/utils/thread_base.h +++ b/libtorrent/src/torrent/utils/thread_base.h @@ -41,7 +41,7 @@ #include #include #include -#include lt_tr1_functional +#include namespace torrent { diff --git a/libtorrent/src/utils/instrumentation.h b/libtorrent/src/utils/instrumentation.h index 1204f33b..5363e78c 100644 --- a/libtorrent/src/utils/instrumentation.h +++ b/libtorrent/src/utils/instrumentation.h @@ -36,8 +36,8 @@ #ifndef LIBTORRENT_UTILS_INSTRUMENTATION_H #define LIBTORRENT_UTILS_INSTRUMENTATION_H -#include lt_tr1_array +#include #include #include "torrent/common.h" diff --git a/libtorrent/src/utils/queue_buckets.h b/libtorrent/src/utils/queue_buckets.h index f87764b6..2a61c39b 100644 --- a/libtorrent/src/utils/queue_buckets.h +++ b/libtorrent/src/utils/queue_buckets.h @@ -39,8 +39,8 @@ #include #include -#include lt_tr1_functional -#include lt_tr1_array +#include +#include namespace torrent { diff --git a/libtorrent/src/utils/udnsevent.h b/libtorrent/src/utils/udnsevent.h index cd4e5192..87428c36 100644 --- a/libtorrent/src/utils/udnsevent.h +++ b/libtorrent/src/utils/udnsevent.h @@ -1,7 +1,7 @@ #ifndef LIBTORRENT_NET_UDNSEVENT_H #define LIBTORRENT_NET_UDNSEVENT_H -#include lt_tr1_functional +#include #include #include