summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-18 21:46:00 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-18 21:46:00 +0000
commit10103e8cc7ce82027b5e96b7a5793ed4c27567b9 (patch)
treecaa4fdde68d7a3f62220de5848d231659d699724 /vm_dump.c
parent52b01813066b68ec826e96c6db02a91df8f7f1fd (diff)
Correct condition of r39302
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/vm_dump.c b/vm_dump.c
index f742303..54bc286 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 <execinfo.h>
#elif defined(_WIN32)