summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-28 18:16:04 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-28 18:16:04 +0000
commit95bfac2e21ea3acb3903d05ff3909028af4a340f (patch)
tree8435ae96827b9433c9794aa769500c773809cff8
parentaad72320354dd5893e49b91952789c5163beb6b2 (diff)
merge revision(s) 51242: [Backport #11343]
* gc.c (__has_feature): move into internal.h. * internal.h (__has_feature): ditto. * internal.h (__has_extension): new macro. * internal.h (STATIC_ASSERT): use _Static_assert with clang. [ruby-core:69931] [Bug #11343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--gc.c4
-rw-r--r--internal.h10
-rw-r--r--version.h6
4 files changed, 23 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e87695059..3dc691be9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun Nov 29 02:55:56 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * gc.c (__has_feature): move into internal.h.
+
+ * internal.h (__has_feature): ditto.
+
+ * internal.h (__has_extension): new macro.
+
+ * internal.h (STATIC_ASSERT): use _Static_assert with
+ clang. [ruby-core:69931] [Bug #11343]
+
Sat Nov 28 06:28:55 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (literal_concat_gen, evstr2dstr_gen): keep literal
diff --git a/gc.c b/gc.c
index b843e7bb73..295d24d2f3 100644
--- a/gc.c
+++ b/gc.c
@@ -32,10 +32,6 @@
#undef rb_data_object_alloc
-#ifndef __has_feature
-# define __has_feature(x) 0
-#endif
-
#ifndef HAVE_MALLOC_USABLE_SIZE
# ifdef _WIN32
# define HAVE_MALLOC_USABLE_SIZE
diff --git a/internal.h b/internal.h
index 9161122732..1783405bd2 100644
--- a/internal.h
+++ b/internal.h
@@ -73,7 +73,15 @@ extern "C" {
(__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
(__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
-#if GCC_VERSION_SINCE(4, 6, 0)
+#ifndef __has_feature
+# define __has_feature(x) 0
+#endif
+
+#ifndef __has_extension
+# define __has_extension __has_feature
+#endif
+
+#if GCC_VERSION_SINCE(4, 6, 0) || __has_extension(c_static_assert)
# define STATIC_ASSERT(name, expr) _Static_assert(expr, #name ": " #expr)
#else
# define STATIC_ASSERT(name, expr) typedef int static_assert_##name##_check[1 - 2*!(expr)]
diff --git a/version.h b/version.h
index 7b6d97b78b..eafb4555e9 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.2.4"
-#define RUBY_RELEASE_DATE "2015-11-28"
-#define RUBY_PATCHLEVEL 206
+#define RUBY_RELEASE_DATE "2015-11-29"
+#define RUBY_PATCHLEVEL 207
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 28
+#define RUBY_RELEASE_DAY 29
#include "ruby/version.h"