OSDN Git Service

Add include files so that IceCompilerServer.cpp can compile on MSC.
authorKarl Schimpf <kschimpf@google.com>
Thu, 1 Oct 2015 21:23:14 +0000 (14:23 -0700)
committerKarl Schimpf <kschimpf@google.com>
Thu, 1 Oct 2015 21:23:14 +0000 (14:23 -0700)
A recent change to IceCompilerServer.cpp was added to allow fatal
errors to return exit status zero. However, this code called ::write
(a C function) that is not defined when compiling with MSC. This CL
adds includes to fix this problem.

BUG=None
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/1379613005 .

src/IceCompileServer.cpp

index 7ba5c30..1230631 100644 (file)
 #include <iostream>
 #include <thread>
 
+#if defined(HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#if defined(_MSC_VER)
+# include <io.h>
+# include <fcntl.h>
+#endif
+
 namespace Ice {
 
 namespace {