ruby-changes:54384
From: nobu <ko1@a...>
Date: Fri, 28 Dec 2018 10:56:26 +0900 (JST)
Subject: [ruby-changes:54384] nobu:r66598 (trunk): Check if restrict keyword is supported
nobu 2018-12-28 10:56:20 +0900 (Fri, 28 Dec 2018) New Revision: 66598 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66598 Log: Check if restrict keyword is supported Modified files: trunk/configure.ac trunk/win32/Makefile.sub Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 66597) +++ win32/Makefile.sub (revision 66598) @@ -866,6 +866,11 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L866 #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 Index: configure.ac =================================================================== --- configure.ac (revision 66597) +++ configure.ac (revision 66598) @@ -1174,6 +1174,7 @@ AC_C_CHAR_UNSIGNED https://github.com/ruby/ruby/blob/trunk/configure.ac#L1174 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)]) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/