ruby-changes:51057
From: nobu <ko1@a...>
Date: Thu, 26 Apr 2018 21:36:34 +0900 (JST)
Subject: [ruby-changes:51057] nobu:r63264 (trunk): win32/Makefile.sub: LIBDIR_BASENAME
nobu 2018-04-26 21:36:27 +0900 (Thu, 26 Apr 2018) New Revision: 63264 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63264 Log: win32/Makefile.sub: LIBDIR_BASENAME * mjit.c (init_header_filename): support LIBDIR_BASENAME. * win32/Makefile.sub (config.h): ditto. Modified files: trunk/mjit.c trunk/win32/Makefile.sub Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 63263) +++ win32/Makefile.sub (revision 63264) @@ -834,6 +834,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/ https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L834 #define DEFAULT_KCODE KCODE_NONE #define LOAD_RELATIVE 1 #define DLEXT ".so" +!if "$(libdir_basename)" != "lib" +#define LIBDIR_BASENAME "$(libdir_basename)" +!endif !if "$(EXTSTATIC)" == "static" #define EXTSTATIC 1 !endif Index: mjit.c =================================================================== --- mjit.c (revision 63263) +++ mjit.c (revision 63264) @@ -1176,13 +1176,20 @@ init_header_filename(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1176 const size_t header_name_len = sizeof(header_name) - 1; char *p; #ifdef _WIN32 + static const char libdirname[] = "/" +# ifdef LIBDIR_BASENAME + LIBDIR_BASENAME +# else + "lib" +# endif + ; static const char libpathflag[] = # ifdef _MSC_VER "-LIBPATH:" # else "-L" # endif - ; + ; const size_t libpathflag_len = sizeof(libpathflag) - 1; #endif @@ -1210,9 +1217,9 @@ init_header_filename(void) https://github.com/ruby/ruby/blob/trunk/mjit.c#L1217 p = append_str2(p, basedir, baselen); *p = '\0'; - libruby_installed = xmalloc(libpathflag_len + baselen + rb_strlen_lit("/lib") + 1); + libruby_installed = xmalloc(libpathflag_len + baselen + sizeof(libdirname)); p = append_str2(libruby_installed, libruby_build, p - libruby_build); - p = append_lit(p, "/lib"); + p = append_str(p, libdirname); *p = '\0'; #endif } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/