Merge #12678: build: Fix a few compilation issues with Clang 7 and -Werror
8ae413235
Remove redundant checks for MSG_* from configure.ac (Vasil Dimov)71129e026
Do not check for main() in libminiupnpc (Vasil Dimov)8c632f73c
ax_boost_{chrono,unit_test_framework}.m4: take changes from upstream (Vasil Dimov) Pull request description: Tree-SHA512: a99ef98c0b94f892eadeda24b3d55c25bedf225b98c6e4178cf6c2d886b44d43e9f75414d0b37db9ac261cec2350666e5e64fab9c104249dd34ff485c51663cb
This commit is contained in:
commit
6324c68aa0
5 changed files with 14 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
|
# https://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
#
|
#
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
#
|
#
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
#
|
#
|
||||||
# Test for System library from the Boost C++ libraries. The macro requires
|
# Test for Chrono library from the Boost C++ libraries. The macro requires
|
||||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||||
# <http://randspringer.de/boost/index.html>.
|
# <http://randspringer.de/boost/index.html>.
|
||||||
#
|
#
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# warranty.
|
# warranty.
|
||||||
|
|
||||||
#serial 1
|
#serial 4
|
||||||
|
|
||||||
AC_DEFUN([AX_BOOST_CHRONO],
|
AC_DEFUN([AX_BOOST_CHRONO],
|
||||||
[
|
[
|
||||||
|
@ -68,7 +68,7 @@ AC_DEFUN([AX_BOOST_CHRONO],
|
||||||
CXXFLAGS_SAVE=$CXXFLAGS
|
CXXFLAGS_SAVE=$CXXFLAGS
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
|
||||||
[[boost::chrono::system_clock::time_point time;]])],
|
[[boost::chrono::system_clock::time_point* time = new boost::chrono::system_clock::time_point; delete time;]])],
|
||||||
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
|
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
|
||||||
CXXFLAGS=$CXXFLAGS_SAVE
|
CXXFLAGS=$CXXFLAGS_SAVE
|
||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# ================================================================================
|
# =================================================================================
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
|
# https://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
|
||||||
# ================================================================================
|
# =================================================================================
|
||||||
#
|
#
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
#
|
#
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# warranty.
|
# warranty.
|
||||||
|
|
||||||
#serial 19
|
#serial 21
|
||||||
|
|
||||||
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
||||||
[
|
[
|
||||||
|
@ -66,7 +66,7 @@ AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
||||||
[AC_LANG_PUSH([C++])
|
[AC_LANG_PUSH([C++])
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
|
||||||
[[using boost::unit_test::test_suite;
|
[[using boost::unit_test::test_suite;
|
||||||
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])],
|
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); if (test == NULL) { return 1; } else { return 0; }]])],
|
||||||
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
|
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
|
||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
])
|
])
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -643,22 +643,6 @@ AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
|
||||||
|
|
||||||
AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll])
|
AC_CHECK_DECLS([__builtin_clz, __builtin_clzl, __builtin_clzll])
|
||||||
|
|
||||||
dnl Check for MSG_NOSIGNAL
|
|
||||||
AC_MSG_CHECKING(for MSG_NOSIGNAL)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
|
||||||
[[ int f = MSG_NOSIGNAL; ]])],
|
|
||||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
|
|
||||||
[ AC_MSG_RESULT(no)]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl Check for MSG_DONTWAIT
|
|
||||||
AC_MSG_CHECKING(for MSG_DONTWAIT)
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
|
||||||
[[ int f = MSG_DONTWAIT; ]])],
|
|
||||||
[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_DONTWAIT, 1,[Define this symbol if you have MSG_DONTWAIT]) ],
|
|
||||||
[ AC_MSG_RESULT(no)]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl Check for malloc_info (for memory statistics information in getmemoryinfo)
|
dnl Check for malloc_info (for memory statistics information in getmemoryinfo)
|
||||||
AC_MSG_CHECKING(for getmemoryinfo)
|
AC_MSG_CHECKING(for getmemoryinfo)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
|
||||||
|
@ -771,7 +755,7 @@ dnl Check for libminiupnpc (optional)
|
||||||
if test x$use_upnp != xno; then
|
if test x$use_upnp != xno; then
|
||||||
AC_CHECK_HEADERS(
|
AC_CHECK_HEADERS(
|
||||||
[miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
|
[miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
|
||||||
[AC_CHECK_LIB([miniupnpc], [main],[MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])],
|
[AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])],
|
||||||
[have_miniupnpc=no]
|
[have_miniupnpc=no]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -42,12 +42,13 @@
|
||||||
// We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization.
|
// We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization.
|
||||||
#define FEELER_SLEEP_WINDOW 1
|
#define FEELER_SLEEP_WINDOW 1
|
||||||
|
|
||||||
#if !defined(HAVE_MSG_NOSIGNAL)
|
// MSG_NOSIGNAL is not available on some platforms, if it doesn't exist define it as 0
|
||||||
|
#if !defined(MSG_NOSIGNAL)
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MSG_DONTWAIT is not available on some platforms, if it doesn't exist define it as 0
|
// MSG_DONTWAIT is not available on some platforms, if it doesn't exist define it as 0
|
||||||
#if !defined(HAVE_MSG_DONTWAIT)
|
#if !defined(MSG_DONTWAIT)
|
||||||
#define MSG_DONTWAIT 0
|
#define MSG_DONTWAIT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
|
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
|
||||||
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
|
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
|
||||||
|
|
||||||
#if !defined(HAVE_MSG_NOSIGNAL)
|
#if !defined(MSG_NOSIGNAL)
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue