summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-17 09:25:21 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-08-17 09:25:21 +0000
commitb97ff82bd4c875004d233424a9cb0da089ddb96f (patch)
tree0c37bbf372f342729637ff9973b71be1ba7f177d /llvm
parent5dabe042a67b0c16b075c895189f9e32bd18b1fd (diff)
downloadbcm5719-llvm-b97ff82bd4c875004d233424a9cb0da089ddb96f.tar.gz
bcm5719-llvm-b97ff82bd4c875004d233424a9cb0da089ddb96f.zip
Get raw_ostream.cpp to compile on MSVC.
llvm-svn: 54879
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 96864277170..144b90f65ee 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -15,13 +15,19 @@
#include <ostream>
using namespace llvm;
-#if !defined(_MSC_VER)
#include <fcntl.h>
-#else
+
+#if defined(_MSC_VER)
#include <io.h>
-#define open(x,y,z) _open(x,y)
-#define write(fd, start, size) _write(fd, start, size)
-#define close(fd) _close(fd)
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
#endif
// An out of line virtual method to provide a home for the class vtable.
OpenPOWER on IntegriCloud