ruby-changes:27244
From: nobu <ko1@a...>
Date: Mon, 18 Feb 2013 10:23:04 +0900 (JST)
Subject: [ruby-changes:27244] nobu:r39296 (trunk): version.c: move ruby_exec_prefix
nobu 2013-02-18 10:11:58 +0900 (Mon, 18 Feb 2013) New Revision: 39296 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39296 Log: version.c: move ruby_exec_prefix * version.c (ruby_exec_prefix): move all path configuration stuffs. Modified files: trunk/configure.in trunk/ruby.c trunk/version.c Index: configure.in =================================================================== --- configure.in (revision 39295) +++ configure.in (revision 39296) @@ -3347,7 +3347,7 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; t https://github.com/ruby/ruby/blob/trunk/configure.in#L3347 else AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !<verconf>!) fi -AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) +AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_ARCH_PREFIX_FOR(arch), ${RUBY_ARCH_PREFIX_FOR} !<verconf>!) AC_DEFINE_UNQUOTED(RUBY_SITEARCH_PREFIX_FOR(arch), ${RUBY_SITEARCH_PREFIX_FOR} !<verconf>!) Index: version.c =================================================================== --- version.c (revision 39295) +++ version.c (revision 39296) @@ -67,6 +67,9 @@ const char ruby_description[] = RUBY_DES https://github.com/ruby/ruby/blob/trunk/version.c#L67 const char ruby_copyright[] = RUBY_COPYRIGHT; const char ruby_engine[] = "ruby"; VALUE ruby_engine_name = Qnil; +#if !defined(LOAD_RELATIVE) || !LOAD_RELATIVE +const char ruby_exec_prefix[] = RUBY_EXEC_PREFIX; +#endif const char ruby_initial_load_paths[] = #ifndef NO_INITIAL_LOAD_PATH Index: ruby.c =================================================================== --- ruby.c (revision 39295) +++ ruby.c (revision 39296) @@ -492,9 +492,10 @@ ruby_init_loadpath_safe(int safe_level) https://github.com/ruby/ruby/blob/trunk/ruby.c#L492 #define RUBY_RELATIVE(path, len) rb_str_buf_cat(BASEPATH(), (path), (len)) #else - static const char exec_prefix[] = RUBY_EXEC_PREFIX; + extern const char ruby_exec_prefix[]; + const size_t exec_prefix_len = strlen(ruby_exec_prefix); #define RUBY_RELATIVE(path, len) rubylib_mangled_path((path), (len)) -#define PREFIX_PATH() RUBY_RELATIVE(exec_prefix, sizeof(exec_prefix)-1) +#define PREFIX_PATH() RUBY_RELATIVE(ruby_exec_prefix, exec_prefix_len) #endif load_path = GET_VM()->load_path; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/