ruby/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch
2016-02-17 19:05:04 +01:00

32 lines
1.1 KiB
Diff

From 98e565ec78cb4a07ffde8589ac4581fca31e9c17 Mon Sep 17 00:00:00 2001
From: mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Thu, 7 Jan 2016 13:35:32 +0000
Subject: [PATCH] * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++. [ruby-core:72736]
[Bug #11962]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
ChangeLog | 6 ++++++
include/ruby/ruby.h | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 7aabf5b..82dca14 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -26,6 +26,13 @@ extern "C" {
#include RUBY_EXTCONF_H
#endif
+#if defined(__cplusplus)
+/* __builtin_choose_expr and __builtin_types_compatible aren't available
+ * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */
+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
+# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P
+#endif
+
#include "defines.h"
#define NORETURN_STYLE_NEW 1