Skip to content

Commit

Permalink
* addr2line.c: use USE_ELF instead of __ELF__ because Solaris
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
nurse committed Jul 8, 2011
1 parent 29e497d commit e33183a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions 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> Fri Jul 8 16:40:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>


* ext/json/parser/parser.rl (convert_encoding): should not modify * ext/json/parser/parser.rl (convert_encoding): should not modify
Expand Down
4 changes: 2 additions & 2 deletions addr2line.c
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>


#ifdef __ELF__ #ifdef USE_ELF


#ifdef __OpenBSD__ #ifdef __OpenBSD__
#include <elf_abi.h> #include <elf_abi.h>
Expand Down Expand Up @@ -605,6 +605,6 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
free(lines); free(lines);
} }


#else /* defined(__ELF__) */ #else /* defined(USE_ELF) */
#error not supported #error not supported
#endif #endif
4 changes: 2 additions & 2 deletions addr2line.h
Expand Up @@ -11,11 +11,11 @@
#ifndef RUBY_ADDR2LINE_H #ifndef RUBY_ADDR2LINE_H
#define RUBY_ADDR2LINE_H #define RUBY_ADDR2LINE_H


#ifdef __ELF__ #ifdef USE_ELF


void void
rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms); rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms);


#endif /* __ELF__ */ #endif /* USE_ELF */


#endif /* RUBY_ADDR2LINE_H */ #endif /* RUBY_ADDR2LINE_H */
2 changes: 1 addition & 1 deletion vm_dump.c
Expand Up @@ -797,7 +797,7 @@ rb_vm_bugreport(void)
char **syms = backtrace_symbols(trace, n); char **syms = backtrace_symbols(trace, n);


if (syms) { if (syms) {
#ifdef __ELF__ #ifdef USE_ELF
rb_dump_backtrace_with_lines(n, trace, syms); rb_dump_backtrace_with_lines(n, trace, syms);
#else #else
int i; int i;
Expand Down

0 comments on commit e33183a

Please sign in to comment.