From 60aa9c809b58b214cba304b28f5813c8a7399a92 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 23 Apr 2011 17:34:58 +0000 Subject: [PATCH] * include/ruby/intern.h: pcc can't use __builtin_constant_p. * vm_exec.c: change condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ include/ruby/intern.h | 2 +- vm_exec.c | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b41b3d96f..7369093e3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Apr 24 02:25:23 2011 NARUSE, Yui + + * include/ruby/intern.h: pcc can't use __builtin_constant_p. + + * vm_exec.c: change condition. + Sun Apr 24 01:58:01 2011 NARUSE, Yui * ext/date/date_core.c (leap_p): surpress warning: parentheses. diff --git a/include/ruby/intern.h b/include/ruby/intern.h index 37210e1a5a..7e552d41cf 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -715,7 +715,7 @@ VALUE rb_str_length(VALUE); long rb_str_offset(VALUE, long); size_t rb_str_capacity(VALUE); VALUE rb_str_ellipsize(VALUE, long); -#if defined __GNUC__ +#if defined(__GNUC__) && !defined(__PCC__) #define rb_str_new_cstr(str) __extension__ ( \ { \ (__builtin_constant_p(str)) ? \ diff --git a/vm_exec.c b/vm_exec.c index 15003c4e56..82a42679a4 100644 --- a/vm_exec.c +++ b/vm_exec.c @@ -11,13 +11,13 @@ #include -#if VMDEBUG > 0 +#if (VMDEBUG > 0) || defined(__clang) #define DECL_SC_REG(type, r, reg) register type reg_##r -#elif __GNUC__ && __x86_64__ && !__clang__ +#elif __GNUC__ && __x86_64__ #define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("r" reg) -#elif __GNUC__ && __i386__ && !__clang__ +#elif __GNUC__ && __i386__ #define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("e" reg) #else