diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2017-01-09 12:06:38 +0000 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-01-09 13:21:57 +0000 |
commit | 2e08b9a8001f87903a04183387d2a67605592138 (patch) | |
tree | 8a3a3b1d2967a5a877f70f6ce827e51a50882ca4 /src/main/cpp/util/file_posix.cc | |
parent | 91d1ea0d1a1806b2f0fc9dd1f959b61e5ae1704e (diff) |
Bazel client, Windows: implement GetCwd
See https://github.com/bazelbuild/bazel/issues/2107
See https://github.com/bazelbuild/bazel/issues/2181
--
PiperOrigin-RevId: 143947877
MOS_MIGRATED_REVID=143947877
Diffstat (limited to 'src/main/cpp/util/file_posix.cc')
-rw-r--r-- | src/main/cpp/util/file_posix.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/cpp/util/file_posix.cc b/src/main/cpp/util/file_posix.cc index 475de9ef18..cdeb0ecd5b 100644 --- a/src/main/cpp/util/file_posix.cc +++ b/src/main/cpp/util/file_posix.cc @@ -299,6 +299,7 @@ bool MakeDirectories(const string &path, unsigned int mode) { return MakeDirectories(path, mode, true); } +#ifndef __CYGWIN__ string GetCwd() { char cwdbuf[PATH_MAX]; if (getcwd(cwdbuf, sizeof cwdbuf) == NULL) { @@ -306,6 +307,7 @@ string GetCwd() { } return string(cwdbuf); } +#endif // not __CYGWIN__ bool ChangeDirectory(const string& path) { return chdir(path.c_str()) == 0; |