From 10103e8cc7ce82027b5e96b7a5793ed4c27567b9 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 18 Feb 2013 21:46:00 +0000 Subject: [PATCH] Correct condition of r39302 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_dump.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vm_dump.c b/vm_dump.c index f7423031cf..54bc286985 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -424,18 +424,18 @@ rb_vmdebug_thread_dump_state(VALUE self) return Qnil; } -#ifndef HAVE_BACKTRACE -#define HAVE_BACKTRACE 0 -#endif -#ifdef BROKEN_BACKTRACE -# undef HAVE_BACKTRACE +#if defined(HAVE_BACKTRACE) +# if HAVE_LIBUNWIND +# undef backtrace +# define backtrace unw_backtrace +# elif defined(BROKEN_BACKTRACE) +# undef HAVE_BACKTRACE +# define HAVE_BACKTRACE 0 +# endif +#else # define HAVE_BACKTRACE 0 #endif -#if HAVE_LIBUNWIND -# define HAVE_BACKTRACE 1 -# undef backtrace -# define backtrace unw_backtrace -#endif + #if HAVE_BACKTRACE # include #elif defined(_WIN32)