diff --git a/compiler/src/dmd/backend/dwarfdbginf.d b/compiler/src/dmd/backend/dwarfdbginf.d index a4ce1a37d9c2..ea87bbed6e8e 100644 --- a/compiler/src/dmd/backend/dwarfdbginf.d +++ b/compiler/src/dmd/backend/dwarfdbginf.d @@ -44,7 +44,8 @@ import dmd.backend.cdef; version(Windows) { nothrow - private extern (C) char* getcwd(char* buffer, size_t maxlen); + private extern (C) char* _getcwd(char* buffer, size_t maxlen); + alias getcwd = _getcwd; nothrow private extern (C) int* _errno(); // not the multi-threaded version } diff --git a/compiler/src/dmd/json.d b/compiler/src/dmd/json.d index 021387d6f438..174a2d95cd20 100644 --- a/compiler/src/dmd/json.d +++ b/compiler/src/dmd/json.d @@ -42,7 +42,8 @@ import dmd.target; import dmd.visitor; version(Windows) { - extern (C) char* getcwd(char* buffer, size_t maxlen); + extern (C) char* _getcwd(char* buffer, size_t maxlen); + alias getcwd = _getcwd; } else { import core.sys.posix.unistd : getcwd; } diff --git a/compiler/src/dmd/root/filename.d b/compiler/src/dmd/root/filename.d index a2f074dbfaec..cf00d8ad7f63 100644 --- a/compiler/src/dmd/root/filename.d +++ b/compiler/src/dmd/root/filename.d @@ -42,7 +42,8 @@ version (Windows) extern (Windows) DWORD GetFullPathNameW(LPCWSTR, DWORD, LPWSTR, LPWSTR*) nothrow @nogc; extern (Windows) void SetLastError(DWORD) nothrow @nogc; - extern (C) char* getcwd(char* buffer, size_t maxlen) nothrow; + extern (C) char* _getcwd(char* buffer, size_t maxlen) nothrow; + alias getcwd = _getcwd; } version (CRuntime_Glibc)