From b68dc369e06f8d1666562a70bab6bc3f7d642989 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 17 Aug 2008 09:25:21 +0000 Subject: [PATCH] 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 --- lib/Support/raw_ostream.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 96864277170..144b90f65ee 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -15,13 +15,19 @@ #include using namespace llvm; -#if !defined(_MSC_VER) #include -#else + +#if defined(_MSC_VER) #include -#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.