aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/util/file_windows.cc
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2016-11-28 14:04:27 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-11-28 15:30:06 +0000
commit3b89d2d82b87b253bb29972361880e471f13f8ac (patch)
treeada72d3bc9c5588104cbe8958b90dad51bd09650 /src/main/cpp/util/file_windows.cc
parentd0a12695894095d27f33020bacb5c2d9d318d7f8 (diff)
Bazel client: make it compile with MSVC
Final modifications to the Bazel client code so we can compile //src/main/cpp/...:all using MSVC. Yay! We still have some dependencies that don't compile with MSVC, namely Ijar, build-runfiles, process-wrapper, and process-tools. Still, this change is a huge success, because now we can add regression tests to prevent people from introducing breaking changes to the client that would break Windows/MSVC compilation. It's important to point out that we can only build this library for now, most functions in file_windows.cc and blaze_util_windows.cc have an empty body (they just call `pdie`). See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140348351
Diffstat (limited to 'src/main/cpp/util/file_windows.cc')
-rw-r--r--src/main/cpp/util/file_windows.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/cpp/util/file_windows.cc b/src/main/cpp/util/file_windows.cc
index 6cab2b491e..cbf17d1c7f 100644
--- a/src/main/cpp/util/file_windows.cc
+++ b/src/main/cpp/util/file_windows.cc
@@ -16,11 +16,33 @@
#include <windows.h>
#include "src/main/cpp/util/errors.h"
+#include "src/main/cpp/util/file.h"
namespace blaze_util {
using std::string;
+class WindowsPipe : public IPipe {
+ public:
+ bool Send(void* buffer, int size) override {
+ // TODO(bazel-team): implement this.
+ pdie(255, "blaze_util::WindowsPipe::Send is not yet implemented");
+ return false;
+ }
+
+ int Receive(void* buffer, int size) override {
+ // TODO(bazel-team): implement this.
+ pdie(255, "blaze_util::WindowsPipe::Receive is not yet implemented");
+ return 0;
+ }
+};
+
+IPipe* CreatePipe() {
+ // TODO(bazel-team): implement this.
+ pdie(255, "blaze_util::CreatePipe is not implemented on Windows");
+ return nullptr;
+}
+
bool ReadFile(const string& filename, string* content, int max_size) {
// TODO(bazel-team): implement this.
pdie(255, "blaze_util::ReadFile is not implemented on Windows");