diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-24 13:48:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-24 13:48:08 +0000 |
commit | 8fc8587e05163f0002915d06fbb20386cbcbb2ef (patch) | |
tree | 787ee4b27d8199a90fd20b4185814fd6800c22ca /ext/etc/extconf.rb | |
parent | 9885c1c79fb4316fd754e65b9d3292bab9aaffd4 (diff) | |
download | ruby-8fc8587e05163f0002915d06fbb20386cbcbb2ef.tar.gz |
sysconfdir on Windows
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on
Windows. [ruby-core:43110] [Bug #6121]
* ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set
in RbConfig::CONFIG and not empty.
* win32/Makefile.sub (config.status): sysconfdir is not used on
Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/etc/extconf.rb')
-rw-r--r-- | ext/etc/extconf.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/etc/extconf.rb b/ext/etc/extconf.rb index 1e679b5d0b..20a7dd00d6 100644 --- a/ext/etc/extconf.rb +++ b/ext/etc/extconf.rb @@ -12,8 +12,10 @@ have_func("uname((struct utsname *)NULL)", headers) have_func("getlogin") have_func("getpwent") have_func("getgrent") -sysconfdir = RbConfig.expand(RbConfig::CONFIG["sysconfdir"].dup, "prefix"=>"", "DESTDIR"=>"") -$defs.push("-DSYSCONFDIR=#{Shellwords.escape(sysconfdir.dump)}") +if (sysconfdir = RbConfig::CONFIG["sysconfdir"] and + !RbConfig.expand(sysconfdir.dup, "prefix"=>"", "DESTDIR"=>"").empty?) + $defs.push("-DSYSCONFDIR=#{Shellwords.escape(sysconfdir.dump)}") +end have_func("sysconf") have_func("confstr") |