mirror of https://github.com/xzeldon/htop.git
make htop friendly to uclibc (thanks to Matt for the report)
This commit is contained in:
parent
72dbb72b68
commit
36ef1a93be
10
CRT.c
10
CRT.c
|
@ -11,7 +11,9 @@ in the source distribution for its full text.
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#ifdef HAVE_EXECINFO_H
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "String.h"
|
#include "String.h"
|
||||||
|
|
||||||
|
@ -125,12 +127,14 @@ static void CRT_handleSIGSEGV(int sgn) {
|
||||||
CRT_done();
|
CRT_done();
|
||||||
#if __linux
|
#if __linux
|
||||||
fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n");
|
fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n");
|
||||||
#else
|
#ifdef HAVE_EXECINFO_H
|
||||||
fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n");
|
|
||||||
#endif
|
|
||||||
size_t size = backtrace(backtraceArray, sizeof(backtraceArray));
|
size_t size = backtrace(backtraceArray, sizeof(backtraceArray));
|
||||||
fprintf(stderr, "Backtrace: \n");
|
fprintf(stderr, "Backtrace: \n");
|
||||||
backtrace_symbols_fd(backtraceArray, size, 2);
|
backtrace_symbols_fd(backtraceArray, size, 2);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n");
|
||||||
|
#endif
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
CRT.h
2
CRT.h
|
@ -14,7 +14,9 @@ in the source distribution for its full text.
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#ifdef HAVE_EXECINFO_H
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "String.h"
|
#include "String.h"
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h curses.h],[:],[
|
AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h curses.h],[:],[
|
||||||
missing_headers="$missing_headers $ac_header"
|
missing_headers="$missing_headers $ac_header"
|
||||||
])
|
])
|
||||||
|
AC_CHECK_HEADERS([execinfo.h],[:],[:])
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_HEADER_STDBOOL
|
AC_HEADER_STDBOOL
|
||||||
|
|
Loading…
Reference in New Issue