summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 12:23:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-08 12:23:10 +0000
commite33183acca3d11bbfae6f4551bca890cf7d4280a (patch)
treedb8366616c5e6f1ed8f20cdf2629a3bd059d9f1a
parent29e497d231b91237ca4a1b6d6eaaf7ace869508e (diff)
* addr2line.c: use USE_ELF instead of __ELF__ because Solaris
doesn't define it. USE_ELF is already provided by configure. patched by Naohisa Goto. [ruby-dev:44066] [Bug #4998] * addr2line.h: ditto. * vm_dump.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--addr2line.c4
-rw-r--r--addr2line.h4
-rw-r--r--vm_dump.c2
4 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 49844d4..cf283ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Fri Jul 8 21:20:39 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * addr2line.c: use USE_ELF instead of __ELF__ because Solaris
+ doesn't define it. USE_ELF is already provided by configure.
+ patched by Naohisa Goto. [ruby-dev:44066] [Bug #4998]
+
+ * addr2line.h: ditto.
+
+ * vm_dump.c: ditto.
+
Fri Jul 8 16:40:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/json/parser/parser.rl (convert_encoding): should not modify
diff --git a/addr2line.c b/addr2line.c
index 71ebf03..219d1d4 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -14,7 +14,7 @@
#include <stdio.h>
#include <errno.h>
-#ifdef __ELF__
+#ifdef USE_ELF
#ifdef __OpenBSD__
#include <elf_abi.h>
@@ -605,6 +605,6 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
free(lines);
}
-#else /* defined(__ELF__) */
+#else /* defined(USE_ELF) */
#error not supported
#endif
diff --git a/addr2line.h b/addr2line.h
index cbb18e5..3782d89 100644
--- a/addr2line.h
+++ b/addr2line.h
@@ -11,11 +11,11 @@
#ifndef RUBY_ADDR2LINE_H
#define RUBY_ADDR2LINE_H
-#ifdef __ELF__
+#ifdef USE_ELF
void
rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms);
-#endif /* __ELF__ */
+#endif /* USE_ELF */
#endif /* RUBY_ADDR2LINE_H */
diff --git a/vm_dump.c b/vm_dump.c
index 23143dc..8667a7a 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -797,7 +797,7 @@ rb_vm_bugreport(void)
char **syms = backtrace_symbols(trace, n);
if (syms) {
-#ifdef __ELF__
+#ifdef USE_ELF
rb_dump_backtrace_with_lines(n, trace, syms);
#else
int i;