fix gcc build
This commit is contained in:
parent
d764e74f33
commit
60d1b8fa7c
|
@ -398,6 +398,18 @@ int snprintf(char* buf, int len, char const* fmt, ...)
|
|||
#define TORRENT_NO_RETURN
|
||||
#endif
|
||||
|
||||
#ifdef __GLIBC__
|
||||
#define TORRENT_EXCEPTION_THROW_SPECIFIER _GLIBCXX_USE_NOEXCEPT
|
||||
#else
|
||||
|
||||
#if __cplusplus > 199711L && defined BOOST_NO_CXX11_NOEXCEPT
|
||||
#define TORRENT_EXCEPTION_THROW_SPECIFIER throw()
|
||||
#else
|
||||
#define TORRENT_EXCEPTION_THROW_SPECIFIER noexcept
|
||||
#endif
|
||||
|
||||
#endif // __GLIBC__
|
||||
|
||||
#ifndef TORRENT_ICONV_ARG
|
||||
#define TORRENT_ICONV_ARG (char**)
|
||||
#endif
|
||||
|
|
|
@ -53,10 +53,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "libtorrent/aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#ifndef BOOST_SYSTEM_NOEXCEPT
|
||||
#define BOOST_SYSTEM_NOEXCEPT throw()
|
||||
#endif
|
||||
|
||||
namespace libtorrent
|
||||
{
|
||||
|
||||
|
@ -540,8 +536,8 @@ namespace libtorrent
|
|||
struct TORRENT_EXPORT libtorrent_exception: std::exception
|
||||
{
|
||||
libtorrent_exception(error_code const& s): m_error(s), m_msg(0) {}
|
||||
virtual const char* what() const BOOST_SYSTEM_NOEXCEPT;
|
||||
virtual ~libtorrent_exception() BOOST_SYSTEM_NOEXCEPT;
|
||||
virtual const char* what() const TORRENT_EXCEPTION_THROW_SPECIFIER;
|
||||
virtual ~libtorrent_exception() TORRENT_EXCEPTION_THROW_SPECIFIER;
|
||||
error_code error() const { return m_error; }
|
||||
private:
|
||||
error_code m_error;
|
||||
|
|
|
@ -326,7 +326,7 @@ namespace libtorrent
|
|||
#endif
|
||||
|
||||
#ifndef BOOST_NO_EXCEPTIONS
|
||||
const char* libtorrent_exception::what() const BOOST_SYSTEM_NOEXCEPT
|
||||
const char* libtorrent_exception::what() const TORRENT_EXCEPTION_THROW_SPECIFIER
|
||||
{
|
||||
if (!m_msg)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ namespace libtorrent
|
|||
return m_msg;
|
||||
}
|
||||
|
||||
libtorrent_exception::~libtorrent_exception() BOOST_SYSTEM_NOEXCEPT
|
||||
libtorrent_exception::~libtorrent_exception() TORRENT_EXCEPTION_THROW_SPECIFIER
|
||||
{
|
||||
free(m_msg);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
*/
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
#include "aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <string>
|
||||
|
@ -56,7 +58,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include "aux_/disable_warnings_pop.hpp"
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
#include "libtorrent/parse_url.hpp"
|
||||
#include "libtorrent/random.hpp"
|
||||
|
|
|
@ -40,9 +40,15 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/bdecode.hpp"
|
||||
#include "libtorrent/bencode.hpp"
|
||||
#include "libtorrent/entry.hpp"
|
||||
|
||||
#include "aux_/disable_warnings_push.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <boost/bind.hpp>
|
||||
#include <iostream>
|
||||
#include <cstdarg>
|
||||
|
||||
#include "aux_/disable_warnings_pop.hpp"
|
||||
|
||||
using namespace libtorrent;
|
||||
namespace lt = libtorrent;
|
||||
|
|
Loading…
Reference in New Issue