aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--addr2line.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7183c12bd3..15a315029f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 29 19:33:54 2016 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * addr2line.c: define toupper for its use. fix r54391.
+
Tue Mar 29 19:23:46 2016 NARUSE, Yui <naruse@ruby-lang.org>
* include/ruby/ruby.h (rb_isupper, rb_islower, rb_isalpha, rb_isdigit,
diff --git a/addr2line.c b/addr2line.c
index c8faf48d62..b031710d71 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -812,8 +812,7 @@ next_line:
#include <stdarg.h>
#define MAXNBUF (sizeof(intmax_t) * CHAR_BIT + 1)
-extern int rb_toupper(int c);
-#define toupper(c) rb_toupper(c)
+static inline int toupper(int c) { return ('A' <= c && c <= 'Z') ? (c&0x5f) : c; }
#define hex2ascii(hex) (hex2ascii_data[hex])
char const hex2ascii_data[] = "0123456789abcdefghijklmnopqrstuvwxyz";
static inline int imax(int a, int b) { return (a > b ? a : b); }