#cmakedefine01 HAVE_SYS_TIME_H
#cmakedefine01 HAVE_PTHREAD_NP_H
#cmakedefine01 HAVE_SYS_LWP_H
+#cmakedefine01 HAVE_LIBUNWIND_H
#cmakedefine01 HAVE_KQUEUE
#cmakedefine01 HAVE_GETPWUID_R
check_include_files(sys/time.h HAVE_SYS_TIME_H)
check_include_files(pthread_np.h HAVE_PTHREAD_NP_H)
check_include_files(sys/lwp.h HAVE_SYS_LWP_H)
+check_include_files(libunwind.h HAVE_LIBUNWIND_H)
check_function_exists(kqueue HAVE_KQUEUE)
check_function_exists(getpwuid_r HAVE_GETPWUID_R)
#include "pal/context.h"
#include <dlfcn.h>
#include <exception>
+#if HAVE_LIBUNWIND_H
#define UNW_LOCAL_ONLY
#include <libunwind.h>
+#endif
//----------------------------------------------------------------------
// Exception Handling ABI Level I: Base ABI
// Virtual Unwinding
//----------------------------------------------------------------------
+#if HAVE_LIBUNWIND_H
#if UNWIND_CONTEXT_IS_UCONTEXT_T
static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwContext)
{
return TRUE;
}
+#else
+#error don't know how to unwind on this platform
+#endif
#if _DEBUG
//----------------------------------------------------------------------