aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-10-05 09:43:29 +1000
committerSteve Bennett <steveb@workware.net.au>2020-10-05 09:46:33 +1000
commit71f2833f6fca6d59b634f74a7babb0b437893bc8 (patch)
treee6fc6d294f877a96da915448a3040d2bdc1d8571
parenta262aee64da817c03f3f1e9389489e4d33e1cfd5 (diff)
downloadjimtcl-71f2833f6fca6d59b634f74a7babb0b437893bc8.zip
jimtcl-71f2833f6fca6d59b634f74a7babb0b437893bc8.tar.gz
jimtcl-71f2833f6fca6d59b634f74a7babb0b437893bc8.tar.bz2
build: some systems have backtrace but not execinfo.h
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--auto.def2
-rw-r--r--jim.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/auto.def b/auto.def
index 7483db2..5781d98 100644
--- a/auto.def
+++ b/auto.def
@@ -122,7 +122,7 @@ if {[opt-bool coverage]} {
}
cc-check-includes time.h sys/time.h sys/socket.h netinet/in.h arpa/inet.h netdb.h
-cc-check-includes util.h pty.h sys/un.h dlfcn.h unistd.h dirent.h crt_externs.h
+cc-check-includes util.h pty.h sys/un.h dlfcn.h unistd.h dirent.h crt_externs.h execinfo.h
# Check sizeof time_t so we can warn on non-Y2038 compliance
cc-with {-includes time.h} {
diff --git a/jim.c b/jim.c
index eef1293..d9c7fe0 100644
--- a/jim.c
+++ b/jim.c
@@ -64,7 +64,7 @@
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef HAVE_BACKTRACE
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
#ifdef HAVE_CRT_EXTERNS_H
@@ -635,7 +635,7 @@ static void JimPanicDump(int condition, const char *fmt, ...)
fprintf(stderr, "\n\n");
va_end(ap);
-#ifdef HAVE_BACKTRACE
+#if defined(HAVE_BACKTRACE)
{
void *array[40];
int size, i;