merged fix from RC_0_16

This commit is contained in:
Arvid Norberg 2013-05-26 21:36:20 +00:00
parent 5fff90b288
commit ad8c105a24
2 changed files with 13 additions and 2 deletions

View File

@ -192,6 +192,11 @@ POSSIBILITY OF SUCH DAMAGE.
#endif // TORRENT_USE_OPENSSL #endif // TORRENT_USE_OPENSSL
#endif // MAC_OS_X_VERSION_MIN_REQUIRED #endif // MAC_OS_X_VERSION_MIN_REQUIRED
// execinfo.h is available in the MacOS X 10.5 SDK.
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
#define TORRENT_USE_EXECINFO 1
#endif
#endif // __APPLE__ #endif // __APPLE__
#else #else
@ -212,6 +217,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_USE_IFCONF 1 #define TORRENT_USE_IFCONF 1
#define TORRENT_HAS_SALEN 0 #define TORRENT_HAS_SALEN 0
#define TORRENT_USE_POSIX_MEMALIGN 1 #define TORRENT_USE_POSIX_MEMALIGN 1
#if __amd64__ || __i386__
#define TORRENT_USE_EXECINFO 1
#endif
// ==== MINGW === // ==== MINGW ===
#elif defined __MINGW32__ #elif defined __MINGW32__
@ -363,6 +371,10 @@ inline int snprintf(char* buf, int len, char const* fmt, ...)
#define TORRENT_USE_NETLINK 0 #define TORRENT_USE_NETLINK 0
#endif #endif
#ifndef TORRENT_USE_EXECINFO
#define TORRENT_USE_EXECINFO 0
#endif
#ifndef TORRENT_USE_SYSCTL #ifndef TORRENT_USE_SYSCTL
#define TORRENT_USE_SYSCTL 0 #define TORRENT_USE_SYSCTL 0
#endif #endif

View File

@ -114,8 +114,7 @@ std::string demangle(char const* name) { return name; }
#include <signal.h> #include <signal.h>
#include "libtorrent/version.hpp" #include "libtorrent/version.hpp"
// execinfo.h is available in the MacOS X 10.5 SDK. #if TORRENT_USE_EXECINFO
#if (defined __linux__ || (defined __APPLE__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050))
#include <execinfo.h> #include <execinfo.h>
TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth) TORRENT_EXPORT void print_backtrace(char* out, int len, int max_depth)