summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/raw_ostream.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-08-22 15:45:00 +0000
committerChris Lattner <sabre@nondot.org>2008-08-22 15:45:00 +0000
commitd564f2995706d4268eeffc16bbaded0bdd3bae8f (patch)
tree0a0d5edc7c74d3b42babea822b78a1cf7d0b620c /llvm/lib/Support/raw_ostream.cpp
parent3d0f51d7038804253e8759bfb3cf82e63f0b5734 (diff)
downloadbcm5719-llvm-d564f2995706d4268eeffc16bbaded0bdd3bae8f.tar.gz
bcm5719-llvm-d564f2995706d4268eeffc16bbaded0bdd3bae8f.zip
improve support for systems that need unistd.h to get STDOUT_FILENO.
Patch contributed by Bjorn Reese! llvm-svn: 55179
Diffstat (limited to 'llvm/lib/Support/raw_ostream.cpp')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index a5cf629b071..d776fa583f1 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/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() {}
OpenPOWER on IntegriCloud