mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
Fix space handling for different paths.
E.g. on my machine LLVM is installed in folder C:\My Program Files\LLVM. Fixes part of issue #1465. (PR 1466 is required for complete fix.)
This commit is contained in:
parent
1508bafccc
commit
cb0f2e7e6a
4 changed files with 26 additions and 20 deletions
|
@ -131,16 +131,20 @@ bool ConfigFile::locate() {
|
|||
APPEND_FILENAME_AND_RETURN_IF_EXISTS
|
||||
}
|
||||
#else
|
||||
#define STR(x) #x
|
||||
#define XSTR(x) STR(x)
|
||||
// try the install-prefix/etc
|
||||
p = LDC_INSTALL_PREFIX;
|
||||
p = XSTR(LDC_INSTALL_PREFIX);
|
||||
sys::path::append(p, "etc");
|
||||
APPEND_FILENAME_AND_RETURN_IF_EXISTS
|
||||
|
||||
// try the install-prefix/etc/ldc
|
||||
p = LDC_INSTALL_PREFIX;
|
||||
p = XSTR(LDC_INSTALL_PREFIX);
|
||||
sys::path::append(p, "etc");
|
||||
sys::path::append(p, "ldc");
|
||||
APPEND_FILENAME_AND_RETURN_IF_EXISTS
|
||||
#undef XSTR
|
||||
#undef STR
|
||||
|
||||
// try /etc (absolute path)
|
||||
p = "/etc";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue