1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

version.c: move ruby_exec_prefix

* version.c (ruby_exec_prefix): move all path configuration stuffs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-18 01:11:58 +00:00
parent 97ef7189dd
commit 46cdc66f84
3 changed files with 7 additions and 3 deletions

View file

@ -3347,7 +3347,7 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
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>!)

5
ruby.c
View file

@ -492,9 +492,10 @@ ruby_init_loadpath_safe(int safe_level)
#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;

View file

@ -67,6 +67,9 @@ const char ruby_description[] = RUBY_DESCRIPTION;
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