summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 14:19:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-21 14:19:23 +0000
commite4ff51b05a13e0a1d304a1022a9a609f7cf42f71 (patch)
tree086ecf0183ce8ae8ad6b13ad05efde962151c2b4
parent52a275ee79a51cc6ae05a745d38a36c96f95adc2 (diff)
sysconfdir on Windows
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--configure.ac1
-rw-r--r--ext/etc/etc.c3
-rw-r--r--win32/Makefile.sub1
3 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 84e42848d46..30fe9e5512f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,6 +627,7 @@ AS_CASE(["$target_os"],
RT_VER=`echo "$rb_cv_msvcrt" | tr -cd [0-9]`
test "$RT_VER" = "" && RT_VER=60
AC_DEFINE_UNQUOTED(RUBY_MSVCRT_VERSION, $RT_VER)
+ sysconfdir=
])
: ${enable_shared=yes}
],
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 46857c62c79..d5197eb5663 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -628,7 +628,8 @@ VALUE rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc);
*
* This is typically "/etc", but is modified by the prefix used when Ruby was
* compiled. For example, if Ruby is built and installed in /usr/local, returns
- * "/usr/local/etc".
+ * "/usr/local/etc" on other than Windows. On Windows, this returns system
+ * provided directory always.
*/
static VALUE
etc_sysconfdir(VALUE obj)
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 17807593db9..ccf7c5bb475 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -829,7 +829,6 @@ s,@bindir@,$${exec_prefix}/bin,;t t
s,@sbindir@,$${exec_prefix}/sbin,;t t
s,@libexecdir@,$${exec_prefix}/libexec,;t t
s,@datadir@,$${prefix}/share,;t t
-s,@sysconfdir@,$${prefix}/etc,;t t
s,@sharedstatedir@,/etc,;t t
s,@localstatedir@,/var,;t t
s,@libdir@,$${exec_prefix}/$(libdir_basename),;t t