Skip to content

Commit

Permalink
fix wrong SYSCONFDIR (dmd looked for /etc/dmd.conf/dmd.conf)
Browse files Browse the repository at this point in the history
- remove SYSCONFDIR which AFAIK isn't used by anyone
  • Loading branch information
MartinNowak committed Sep 9, 2015
1 parent e9808b5 commit b2e6b32
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
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
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 b2e6b32

Please sign in to comment.