aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-28 01:56:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-28 01:56:20 +0000
commit1095705c4218f8f752210f1a0b4f78d96ad675ac (patch)
tree4f635c0b2ca5dcd97a802c9d8fa2dccc94b90156
parent24b1b433c5abf02e9f9c7eb3851f4417dc5d8751 (diff)
downloadruby-1095705c4218f8f752210f1a0b4f78d96ad675ac.tar.gz
Check if restrict keyword is supported
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--configure.ac1
-rw-r--r--win32/Makefile.sub5
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4e3f1ef0e5..72a0af6dab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1174,6 +1174,7 @@ AC_C_CHAR_UNSIGNED
AC_C_INLINE
AC_C_VOLATILE
AC_C_TYPEOF
+AC_C_RESTRICT
AS_CASE(":$ac_cv_c_const:$ac_cv_c_volatile:",
[*:no:*], [AC_MSG_ERROR(ANSI C-conforming const and volatile are mandatory)])
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 9ee5ddd5b5..03a41793ac 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -866,6 +866,11 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define RUBY_LONGJMP(env,val) longjmp(env,val)
#define RUBY_JMP_BUF jmp_buf
#define inline __inline
+!if $(MSC_VER) >= 1900
+#define restrict __restrict
+!else
+#define restrict /* not supported */
+!endif
#define NEED_IO_SEEK_BETWEEN_RW 1
!if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64"
#define STACK_GROW_DIRECTION -1