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 "zlib.h"
|
||||
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
extern "C"
|
||||
{
|
||||
#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
|
||||
{
|
||||
|
@ -105,3 +120,4 @@ namespace libtorrent
|
|||
|
||||
#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.
|
||||
|
||||
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":
|
||||
EXTRA_COMPILE_ARGS.append("-DAMD64")
|
||||
|
||||
|
@ -113,7 +116,7 @@ if not OS == "win":
|
|||
boosttype = 'nomt'
|
||||
else:
|
||||
boosttype = 'mt'
|
||||
removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes']
|
||||
removals = ['-g', '-Wstrict-prototypes']
|
||||
additions = ['-DNDEBUG', '-O2']
|
||||
|
||||
if python_version == '2.5':
|
||||
|
|
Loading…
Reference in New Issue