[前][次][番号順一覧][スレッド一覧]

ruby-changes:54064

From: nobu <ko1@a...>
Date: Sat, 8 Dec 2018 12:32:44 +0900 (JST)
Subject: [ruby-changes:54064] nobu:r66283 (trunk): Fix compile error at r66280

nobu	2018-12-08 12:32:39 +0900 (Sat, 08 Dec 2018)

  New Revision: 66283

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66283

  Log:
    Fix compile error at r66280

  Modified files:
    trunk/mjit.c
    trunk/win32/Makefile.sub
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 66282)
+++ win32/Makefile.sub	(revision 66283)
@@ -1381,7 +1381,9 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1381
 #define RUBY_MJIT_CONFIG_H 1
 
 #define MJIT_CONFIG_ESCAPED_EQ "="
-#define MJIT_PRECOMPILED_HEADER_NAME "/$(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME)"
+#define MJIT_HEADER_INSTALL_DIR "/$(MJIT_HEADER_INSTALL_DIR)"
+#define MJIT_MIN_HEADER_NAME "$(MJIT_MIN_HEADER_NAME)"
+#define MJIT_PRECOMPILED_HEADER_NAME "$(MJIT_PRECOMPILED_HEADER_NAME)"
 <<KEEP
 	@
 	@(set sep=#define MJIT_CC_COMMON ) & \
Index: mjit.c
===================================================================
--- mjit.c	(revision 66282)
+++ mjit.c	(revision 66283)
@@ -423,6 +423,7 @@ init_header_filename(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L423
     }
     else
 #endif
+#ifndef _MSC_VER
     {
         /* A name of the header file included in any C file generated by MJIT for iseqs. */
         static const char header_name[] = MJIT_HEADER_INSTALL_DIR "/" MJIT_MIN_HEADER_NAME;
@@ -431,9 +432,7 @@ init_header_filename(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L432
         header_file = xmalloc(baselen + header_name_len + 1);
         p = append_str2(header_file, basedir, baselen);
         p = append_str2(p, header_name, header_name_len + 1);
-    }
-#ifndef _MSC_VER
-    {
+
         if ((fd = rb_cloexec_open(header_file, O_RDONLY, 0)) < 0) {
             verbose(1, "Cannot access header file: %s", header_file);
             xfree(header_file);
@@ -451,7 +450,7 @@ init_header_filename(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L450
     }
 #else
     {
-        static const char pch_name[] = MJIT_PRECOMPILED_HEADER_NAME;
+        static const char pch_name[] = MJIT_HEADER_INSTALL_DIR "/" MJIT_PRECOMPILED_HEADER_NAME;
         const size_t pch_name_len = sizeof(pch_name) - 1;
 
         pch_file = xmalloc(baselen + pch_name_len + 1);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]