From fb98474239a7ffb145e529dbcf069866b2e9296e Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 14 Jun 2018 14:03:02 +0200 Subject: deno2: make getcwd() work on windows --- deno2/main.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'deno2') diff --git a/deno2/main.cc b/deno2/main.cc index 342b957b9..2a10b8820 100644 --- a/deno2/main.cc +++ b/deno2/main.cc @@ -2,9 +2,14 @@ // All rights reserved. MIT License. #include #include -#include #include +#ifdef _WIN32 +#include +#else +#include +#endif + #include "./msg.pb.h" #include "include/deno.h" #include "v8/src/base/logging.h" @@ -19,6 +24,7 @@ void MessagesFromJS(Deno* d, const char* channel, deno_buf buf) { response.set_command(deno::Msg_Command_START); char cwdbuf[1024]; + // TODO(piscisaureus): support unicode on windows. std::string cwd(getcwd(cwdbuf, sizeof(cwdbuf))); response.set_start_cwd(cwd); -- cgit v1.2.3