aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/util/file_posix.cc
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2017-01-11 18:00:54 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-01-12 09:10:00 +0000
commit56882b1d61f10d51f41279c5d60f2fffeca37e00 (patch)
tree00fb30178536b7ad165809fe4d2231b5f71cb281 /src/main/cpp/util/file_posix.cc
parentbb7963efe6966799d5910ecb721a606942107a02 (diff)
Bazel client, Windows: implement WriteFile
See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 144218095 MOS_MIGRATED_REVID=144218095
Diffstat (limited to 'src/main/cpp/util/file_posix.cc')
-rw-r--r--src/main/cpp/util/file_posix.cc6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main/cpp/util/file_posix.cc b/src/main/cpp/util/file_posix.cc
index cc8cadbcf0..02c0fa8055 100644
--- a/src/main/cpp/util/file_posix.cc
+++ b/src/main/cpp/util/file_posix.cc
@@ -189,7 +189,6 @@ bool ReadFile(const string &filename, string *content, int max_size) {
close(fd);
return result;
}
-#endif // not __CYGWIN__
bool WriteFile(const void *data, size_t size, const string &filename) {
UnlinkPath(filename); // We don't care about the success of this.
@@ -209,11 +208,6 @@ bool WriteFile(const void *data, size_t size, const string &filename) {
return result;
}
-// TODO(bazel-team): implement all functions in file_windows.cc, use them from
-// MSYS, remove file_posix.cc from the `srcs` of
-// //src/main/cpp/util:file when building for MSYS, and remove all
-// #ifndef __CYGWIN__ directives.
-#ifndef __CYGWIN__
bool UnlinkPath(const string &file_path) {
return unlink(file_path.c_str()) == 0;
}