[llvm-commits] [llvm] r55179 - /llvm/trunk/lib/Support/raw_ostream.cpp

Chris Lattner sabre at nondot.org
Fri Aug 22 08:45:08 PDT 2008


Author: lattner
Date: Fri Aug 22 10:45:00 2008
New Revision: 55179

URL: http://llvm.org/viewvc/llvm-project?rev=55179&view=rev
Log:
improve support for systems that need unistd.h to get STDOUT_FILENO.
Patch contributed by Bjorn Reese!

Modified:
    llvm/trunk/lib/Support/raw_ostream.cpp

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=55179&r1=55178&r2=55179&view=diff

==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Fri Aug 22 10:45:00 2008
@@ -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 @@
 #endif
 #endif
 
+using namespace llvm;
+
+
 // An out of line virtual method to provide a home for the class vtable.
 void raw_ostream::handle() {}
 





More information about the llvm-commits mailing list