diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-22 15:45:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-22 15:45:00 +0000 |
commit | 1345675e363ebcc1a752e945de8dc93d61a9e730 (patch) | |
tree | ce17c160b5bc58d59735e3e5d421ae25be2c7249 /lib/Support/raw_ostream.cpp | |
parent | 9754964a4c015e07f73f9fbe0853e12e4581203f (diff) | |
download | external_llvm-1345675e363ebcc1a752e945de8dc93d61a9e730.tar.gz external_llvm-1345675e363ebcc1a752e945de8dc93d61a9e730.tar.bz2 external_llvm-1345675e363ebcc1a752e945de8dc93d61a9e730.zip |
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
Diffstat (limited to 'lib/Support/raw_ostream.cpp')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
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 <ostream> -using namespace llvm; -#include <fcntl.h> +#if defined(HAVE_UNISTD_H) +# include <unistd.h> +#endif +#if defined(HAVE_FCNTL_H) +# include <fcntl.h> +#endif #if defined(_MSC_VER) #include <io.h> @@ -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() {} |