diff --git a/Jamfile b/Jamfile index 2806892da..cac684d55 100755 --- a/Jamfile +++ b/Jamfile @@ -89,6 +89,11 @@ rule linking ( properties * ) ; } + if beos in $(properties) + { + result += netkit ; + } + if solaris in $(properties) { result += libsocket libnsl ; @@ -299,6 +304,9 @@ lib user32 : : User32 ; lib shell32 : : shell32 ; lib gdi32 : : gdi32 ; +# required for networking on beos +lib netkit : : net /boot/system/lib shared ; + local boost-library-search-path = /opt/local/lib /usr/lib diff --git a/include/libtorrent/config.hpp b/include/libtorrent/config.hpp index c5dfd23cb..44aebeb01 100644 --- a/include/libtorrent/config.hpp +++ b/include/libtorrent/config.hpp @@ -113,12 +113,18 @@ POSSIBILITY OF SUCH DAMAGE. // (disables some float-dependent APIs) #define TORRENT_NO_FPU 1 #define TORRENT_USE_I2P 0 +#define TORRENT_USE_ICONV 0 // ==== Darwin/BSD === #elif (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ \ || defined __OpenBSD__ || defined __bsdi__ || defined __DragonFly__ \ || defined __FreeBSD_kernel__ #define TORRENT_BSD +// we don't need iconv on mac, because +// the locale is always utf-8 +#if defined __APPLE__ +#define TORRENT_USE_ICONV 0 +#endif // ==== LINUX === #elif defined __linux__ @@ -129,6 +135,10 @@ POSSIBILITY OF SUCH DAMAGE. // ==== WINDOWS === #elif defined WIN32 #define TORRENT_WINDOWS +// windows has its own functions to convert +// apple uses utf-8 as its locale, so no conversion +// is necessary +#define TORRENT_USE_ICONV 0 // ==== SOLARIS === #elif defined sun || defined __sun @@ -139,6 +149,8 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_BEOS #include // B_PATH_NAME_LENGTH #define TORRENT_HAS_FALLOCATE 0 +#define TORRENT_USE_MLOCK 0 +#define TORRENT_USE_ICONV 0 #if __GNUCC__ == 2 # if defined(TORRENT_BUILDING_SHARED) # define TORRENT_EXPORT __declspec(dllexport) @@ -209,14 +221,9 @@ inline int snprintf(char* buf, int len, char const* fmt, ...) #define TORRENT_UPNP_LOGGING #endif -// windows has its own functions to convert -// apple uses utf-8 as its locale, so no conversion -// is necessary -#if !defined TORRENT_WINDOWS && !defined __APPLE__ && !defined TORRENT_AMIGA // libiconv presence, not implemented yet +#ifndef TORRENT_USE_ICONV #define TORRENT_USE_ICONV 1 -#else -#define TORRENT_ISE_ICONV 0 #endif #if defined UNICODE && !defined BOOST_NO_STD_WSTRING diff --git a/include/libtorrent/error_code.hpp b/include/libtorrent/error_code.hpp index ae384939b..3b39784eb 100644 --- a/include/libtorrent/error_code.hpp +++ b/include/libtorrent/error_code.hpp @@ -47,7 +47,8 @@ POSSIBILITY OF SUCH DAMAGE. #include #endif -#include +#include // strdup +#include // free namespace libtorrent { diff --git a/include/libtorrent/peer_connection.hpp b/include/libtorrent/peer_connection.hpp index daf5461d4..73b9b18af 100644 --- a/include/libtorrent/peer_connection.hpp +++ b/include/libtorrent/peer_connection.hpp @@ -76,6 +76,7 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/bitfield.hpp" #include "libtorrent/bandwidth_socket.hpp" #include "libtorrent/socket_type_fwd.hpp" +#include "libtorrent/error_code.hpp" #ifdef TORRENT_STATS #include "libtorrent/aux_/session_impl.hpp" diff --git a/src/allocator.cpp b/src/allocator.cpp index 7918a8e08..0995048f4 100644 --- a/src/allocator.cpp +++ b/src/allocator.cpp @@ -37,8 +37,9 @@ POSSIBILITY OF SUCH DAMAGE. #include #elif defined TORRENT_BEOS #include +#include // malloc/free #else -#include +#include // valloc/free #include // _SC_PAGESIZE #endif diff --git a/src/escape_string.cpp b/src/escape_string.cpp index f1f81ed85..863321410 100644 --- a/src/escape_string.cpp +++ b/src/escape_string.cpp @@ -42,6 +42,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include +#include "libtorrent/config.hpp" #include "libtorrent/assert.hpp" #include "libtorrent/escape_string.hpp" #include "libtorrent/parse_url.hpp" diff --git a/src/time.cpp b/src/time.cpp index 45d16a912..b62d9db9b 100644 --- a/src/time.cpp +++ b/src/time.cpp @@ -201,7 +201,7 @@ namespace libtorrent namespace libtorrent { ptime time_now_hires() - { return ptime(get_system_time()); } + { return ptime(system_time()); } } #endif // TORRENT_USE_SYSTEM_TIME