mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-14 05:26:28 +00:00
lets us not need to alter hasher.hpp to compile
This commit is contained in:
parent
0a78631a6c
commit
bee4a3c552
@ -40,10 +40,25 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "libtorrent/config.hpp"
|
#include "libtorrent/config.hpp"
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
|
|
||||||
|
#ifdef TORRENT_USE_OPENSSL
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// from sha1.cpp
|
||||||
|
struct TORRENT_EXPORT SHA_CTX
|
||||||
|
{
|
||||||
|
boost::uint32_t state[5];
|
||||||
|
boost::uint32_t count[2];
|
||||||
|
boost::uint8_t buffer[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
TORRENT_EXPORT void SHA1_Init(SHA_CTX* context);
|
||||||
|
TORRENT_EXPORT void SHA1_Update(SHA_CTX* context, boost::uint8_t const* data, boost::uint32_t len);
|
||||||
|
TORRENT_EXPORT void SHA1_Final(boost::uint8_t* digest, SHA_CTX* context);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
@ -105,3 +120,4 @@ namespace libtorrent
|
|||||||
|
|
||||||
#endif // TORRENT_HASHER_HPP_INCLUDED
|
#endif // TORRENT_HASHER_HPP_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
7
setup.py
7
setup.py
@ -96,7 +96,10 @@ python_version = platform.python_version()[0:3]
|
|||||||
# it has been removed to prevent confusion.
|
# it has been removed to prevent confusion.
|
||||||
|
|
||||||
if not OS == "win":
|
if not OS == "win":
|
||||||
EXTRA_COMPILE_ARGS = ["-Wno-missing-braces"]
|
EXTRA_COMPILE_ARGS = ["-Wno-missing-braces", "-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1",
|
||||||
|
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1",
|
||||||
|
"-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1",
|
||||||
|
"-DHAVE_PTHREAD=1", "-DTORRENT_USE_OPENSSL=1", "-DHAVE_SSL=1"]
|
||||||
if ARCH == "x64":
|
if ARCH == "x64":
|
||||||
EXTRA_COMPILE_ARGS.append("-DAMD64")
|
EXTRA_COMPILE_ARGS.append("-DAMD64")
|
||||||
|
|
||||||
@ -113,7 +116,7 @@ if not OS == "win":
|
|||||||
boosttype = 'nomt'
|
boosttype = 'nomt'
|
||||||
else:
|
else:
|
||||||
boosttype = 'mt'
|
boosttype = 'mt'
|
||||||
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
removals = ['-g', '-Wstrict-prototypes']
|
||||||
additions = ['-DNDEBUG', '-O2']
|
additions = ['-DNDEBUG', '-O2']
|
||||||
|
|
||||||
if python_version == '2.5':
|
if python_version == '2.5':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user