diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-17 09:25:21 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-08-17 09:25:21 +0000 |
commit | b97ff82bd4c875004d233424a9cb0da089ddb96f (patch) | |
tree | 0c37bbf372f342729637ff9973b71be1ba7f177d /llvm | |
parent | 5dabe042a67b0c16b075c895189f9e32bd18b1fd (diff) | |
download | bcm5719-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.cpp | 16 |
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. |