From 611d0c1c6e3b3b980f77405dce713838aa19ecdc Mon Sep 17 00:00:00 2001 From: Alden Torres Date: Wed, 11 Nov 2015 11:02:52 -0800 Subject: [PATCH] Fixed to make it compatible with mingw-w64 and generic linux --- Jamfile | 19 ++++--------------- ed25519/src/seed.cpp | 4 ++-- include/libtorrent/aux_/byteswap.hpp | 2 +- src/session.cpp | 2 +- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Jamfile b/Jamfile index 148f2b67c..d2aa29225 100644 --- a/Jamfile +++ b/Jamfile @@ -94,6 +94,7 @@ rule linking ( properties * ) # exclude gcc from a regular windows build to make mingw # link against the regular unix library name if windows in $(properties) + && ! gcc in $(properties) { result += ssleay32 libeay32 @@ -105,13 +106,7 @@ rule linking ( properties * ) } else { - result += crypto ssl z ; - } - - if linux in $(properties) - { - # linker library on linux, required when using openssl - result += dl ; + result += crypto ssl ; } } @@ -175,12 +170,6 @@ rule linking ( properties * ) result += libsocket libnsl ; } - # clock_gettime on linux requires librt - if linux in $(properties) - { - result += librt ; - } - if on in $(properties) { result += libiconv ; @@ -555,8 +544,8 @@ variant test_barebones : debug # required for openssl on windows lib ssleay32 : : ssleay32 ; lib libeay32 : : libeay32 ; -lib advapi32 : : Advapi32 ; -lib user32 : : User32 ; +lib advapi32 : : advapi32 ; +lib user32 : : user32 ; lib shell32 : : shell32 ; lib gdi32 : : gdi32 ; lib dbghelp : : dbghelp ; diff --git a/ed25519/src/seed.cpp b/ed25519/src/seed.cpp index 63244cbbd..2123cc56c 100644 --- a/ed25519/src/seed.cpp +++ b/ed25519/src/seed.cpp @@ -15,8 +15,8 @@ using namespace Windows::Security::Cryptography; using namespace Windows::Storage::Streams; using namespace Microsoft::WRL; #elif defined _WIN32 -#include -#include +#include +#include #else #include #endif diff --git a/include/libtorrent/aux_/byteswap.hpp b/include/libtorrent/aux_/byteswap.hpp index 349fd2617..32a0f56dc 100644 --- a/include/libtorrent/aux_/byteswap.hpp +++ b/include/libtorrent/aux_/byteswap.hpp @@ -43,7 +43,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #ifdef TORRENT_WINDOWS -#include +#include #else // posix header // for ntohl and htonl diff --git a/src/session.cpp b/src/session.cpp index e19f743e0..a28fab367 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -349,7 +349,7 @@ namespace libtorrent void session::start(int flags, settings_pack const& pack, io_service* ios) { #if defined _MSC_VER && defined TORRENT_DEBUG - // workaround for microsofts + // workaround for microsoft's // hardware exceptions that makes // it hard to debug stuff ::_set_se_translator(straight_to_debugger);