summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-29 06:03:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-29 06:03:09 +0000
commit22c81db9d8bd5087e4c1a0d4771873ad7d58ad88 (patch)
tree5f457f8dbb7d5b15dfb9e365b67e3dbcde2499c6 /ruby.c
parent06d98b4d4dfa2f4d61373a4fe06a4fdaaedc9452 (diff)
configure.in: use configured libdir value
* configure.in (LIBDIR_BASENAME): use configured libdir value to fix --enable-load-relative on systems where libdir is not default value, overridden in config.site files. [ruby-core:47267] [Bug #6903] * ruby.c (ruby_init_loadpath_safe): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 0fc5247..2fbd48f 100644
--- a/ruby.c
+++ b/ruby.c
@@ -412,7 +412,11 @@ ruby_init_loadpath_safe(int safe_level)
p = strrchr(libpath, '/');
if (p) {
static const char bindir[] = "/bin";
+#ifdef LIBDIR_BASENAME
+ static const char libdir[] = "/"LIBDIR_BASENAME;
+#else
static const char libdir[] = "/lib";
+#endif
const ptrdiff_t bindir_len = (ptrdiff_t)sizeof(bindir) - 1;
const ptrdiff_t libdir_len = (ptrdiff_t)sizeof(libdir) - 1;
*p = 0;