aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArgiris Kirtzidis <akyrtzi@gmail.com>2008-08-17 09:25:21 +0000
committerArgiris Kirtzidis <akyrtzi@gmail.com>2008-08-17 09:25:21 +0000
commit8519c4355b9e5d818e0714f895a7a322c6737bf6 (patch)
tree36ca70ac5eb7cee152aef16c68b62c4c95210a42 /lib
parent8f6293bfe0b84036a119f79f428f9f6ca7d41802 (diff)
downloadexternal_llvm-8519c4355b9e5d818e0714f895a7a322c6737bf6.tar.gz
external_llvm-8519c4355b9e5d818e0714f895a7a322c6737bf6.tar.bz2
external_llvm-8519c4355b9e5d818e0714f895a7a322c6737bf6.zip
Get raw_ostream.cpp to compile on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Support/raw_ostream.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 9686427717..144b90f65e 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/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.