summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-07-17 02:21:10 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-07-17 02:21:10 +0000
commit212c80ac5dd13b79cdfe5ee39b7bc17a200f47cd (patch)
tree42ea2fe04052cdff461ea3ffa512ce78ffc9dcdd /llvm/lib
parent2202317fce579d7675f5c591b6360e5ecca58545 (diff)
downloadbcm5719-llvm-212c80ac5dd13b79cdfe5ee39b7bc17a200f47cd.tar.gz
bcm5719-llvm-212c80ac5dd13b79cdfe5ee39b7bc17a200f47cd.zip
raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default.
llvm/test/Object/check_binary_output.ll is expected to pass on win32. llvm-svn: 186480
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/raw_ostream.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp
index 3e5ce04d755..92fa8b50a15 100644
--- a/llvm/lib/Support/raw_ostream.cpp
+++ b/llvm/lib/Support/raw_ostream.cpp
@@ -27,6 +27,11 @@
#include <cerrno>
#include <sys/stat.h>
+// <fcntl.h> may provide O_BINARY.
+#if defined(HAVE_FCNTL_H)
+# include <fcntl.h>
+#endif
+
#if defined(HAVE_UNISTD_H)
# include <unistd.h>
#endif
OpenPOWER on IntegriCloud