mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-19 07:36:16 +00:00
Replaced custom execinfo autoconf test.
This commit is contained in:
+1
-2
@@ -20,8 +20,6 @@ TORRENT_DISABLE_IPV6
|
|||||||
|
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
||||||
TORRENT_CHECK_EXECINFO
|
|
||||||
|
|
||||||
TORRENT_ENABLE_ARCH
|
TORRENT_ENABLE_ARCH
|
||||||
TORRENT_WITH_SYSROOT
|
TORRENT_WITH_SYSROOT
|
||||||
|
|
||||||
@@ -29,6 +27,7 @@ TORRENT_WITHOUT_VARIABLE_FDSET
|
|||||||
TORRENT_WITHOUT_STATVFS
|
TORRENT_WITHOUT_STATVFS
|
||||||
TORRENT_WITHOUT_STATFS
|
TORRENT_WITHOUT_STATFS
|
||||||
|
|
||||||
|
AX_EXECINFO
|
||||||
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
|
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
|
||||||
AX_WITH_CURSES
|
AX_WITH_CURSES
|
||||||
|
|
||||||
|
|||||||
@@ -150,21 +150,6 @@ dnl Need to fix this so that it uses the stuff defined by the system.
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
|
|
||||||
AC_MSG_CHECKING(for execinfo.h)
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
|
||||||
#include <execinfo.h>
|
|
||||||
int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
|
|
||||||
])],
|
|
||||||
[
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
|
|
||||||
], [
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
|
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
|
||||||
AC_MSG_CHECKING(the byte alignment)
|
AC_MSG_CHECKING(the byte alignment)
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -53,7 +53,7 @@
|
|||||||
#include <rak/functional.h>
|
#include <rak/functional.h>
|
||||||
#include <rak/error_number.h>
|
#include <rak/error_number.h>
|
||||||
|
|
||||||
#ifdef USE_EXECINFO
|
#ifdef HAVE_BACKTRACE
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ handle_sigbus(int signum, siginfo_t* sa, void* ptr) {
|
|||||||
std::stringstream output;
|
std::stringstream output;
|
||||||
output << "Caught SIGBUS, dumping stack:" << std::endl;
|
output << "Caught SIGBUS, dumping stack:" << std::endl;
|
||||||
|
|
||||||
#ifdef USE_EXECINFO
|
#ifdef HAVE_BACKTRACE
|
||||||
void* stackPtrs[20];
|
void* stackPtrs[20];
|
||||||
|
|
||||||
// Print the stack and exit.
|
// Print the stack and exit.
|
||||||
@@ -604,7 +604,7 @@ do_panic(int signum) {
|
|||||||
|
|
||||||
output << "Caught " << SignalHandler::as_string(signum) << ", dumping stack:" << std::endl;
|
output << "Caught " << SignalHandler::as_string(signum) << ", dumping stack:" << std::endl;
|
||||||
|
|
||||||
#ifdef USE_EXECINFO
|
#ifdef HAVE_BACKTRACE
|
||||||
void* stackPtrs[20];
|
void* stackPtrs[20];
|
||||||
|
|
||||||
// Print the stack and exit.
|
// Print the stack and exit.
|
||||||
|
|||||||
Reference in New Issue
Block a user