From 694d50c71efc079c794fc81fb13d49ce5036ce36 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Wed, 27 Jan 2010 11:38:50 +0100 Subject: [PATCH] Bug#50409 Solaris 8 compatibility broken by assumption about printstack() being present When Bug#47391 was fixed, no assumption was made that support for Solaris 8 was needed. Solaris 8 lacks printstack(), and the build breaks because of this. This patch adds a test for the presence of printstack() to configure.in for 5.0, and uses HAVE_PRINTSTACK to make decisions rather than the __sun define. --- configure.in | 2 +- sql/stacktrace.c | 2 +- sql/stacktrace.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 405ebddadbe..a399ccb2909 100644 --- a/configure.in +++ b/configure.in @@ -2128,7 +2128,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \ shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \ sighold sigset sigthreadmask \ snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr strtol \ - strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr) + strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr printstack) # # diff --git a/sql/stacktrace.c b/sql/stacktrace.c index 295a7a3e1e2..a8648ca4e5a 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -227,7 +227,7 @@ stack trace is much more helpful in diagnosing the problem, so please do \n\ resolve it\n"); } -#elif defined(__sun) +#elif defined(HAVE_PRINTSTACK) /* Use Solaris' symbolic stack trace routine. */ #include diff --git a/sql/stacktrace.h b/sql/stacktrace.h index 718b545b775..1366a6cf996 100644 --- a/sql/stacktrace.h +++ b/sql/stacktrace.h @@ -35,7 +35,7 @@ void check_thread_lib(void); #define HAVE_STACKTRACE extern void set_exception_pointers(EXCEPTION_POINTERS *ep); #define init_stacktrace() {} -#elif defined(__sun) +#elif defined(HAVE_PRINTSTACK) #define HAVE_STACKTRACE #define init_stacktrace() {} #endif