From 969a46a948414734f5bc01994e54d88d153cb3fb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 22 Aug 2008 15:45:00 +0000 Subject: improve support for systems that need unistd.h to get STDOUT_FILENO. Patch contributed by Bjorn Reese! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55179 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/raw_ostream.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/Support') diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index a5cf629b07..d776fa583f 100644 --- a/lib/Support/raw_ostream.cpp +++ b/lib/Support/raw_ostream.cpp @@ -12,10 +12,15 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/raw_ostream.h" +#include "llvm/Config/config.h" #include -using namespace llvm; -#include +#if defined(HAVE_UNISTD_H) +# include +#endif +#if defined(HAVE_FCNTL_H) +# include +#endif #if defined(_MSC_VER) #include @@ -30,6 +35,9 @@ using namespace llvm; #endif #endif +using namespace llvm; + + // An out of line virtual method to provide a home for the class vtable. void raw_ostream::handle() {} -- cgit v1.2.3