Skip to content

Commit

Permalink
Merge pull request #5062 from MartinNowak/fixInifile
Browse files Browse the repository at this point in the history
fix wrong SYSCONFDIR (dmd looked for /etc/dmd.conf/dmd.conf)
  • Loading branch information
yebblies committed Sep 10, 2015
2 parents f407129 + b2e6b32 commit 8c19631
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/dinifile.d
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extern (C++) const(char)* findConfFile(const(char)* argv0, const(char)* inifile)
* o home directory
* o exe directory (windows)
* o directory off of argv0
* o SYSCONFDIR (default=/etc/) (non-windows)
* o /etc (non-windows)
*/
const(char)* filename = FileName.combine(getenv("HOME"), inifile);
if (FileName.exists(filename))
Expand Down Expand Up @@ -82,9 +82,7 @@ extern (C++) const(char)* findConfFile(const(char)* argv0, const(char)* inifile)
return filename;
}
// Search /etc/ for inifile
enum SYSCONFDIR = "/etc/dmd.conf";
assert(SYSCONFDIR !is null && strlen(SYSCONFDIR));
filename = FileName.combine(SYSCONFDIR, inifile);
filename = FileName.combine("/etc", inifile);
}
// __linux__ || __APPLE__ || __FreeBSD__ || __OpenBSD__ || __sun
return filename;
Expand Down
2 changes: 0 additions & 2 deletions src/posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ else
endif

INSTALL_DIR=../../install
# can be set to override the default /etc/
SYSCONFDIR=/etc/
PGO_DIR=$(abspath pgo)

C=backend
Expand Down

0 comments on commit 8c19631

Please sign in to comment.