diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-07-17 02:21:10 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-07-17 02:21:10 +0000 |
commit | f7e73accb7abe472a1febc38888133df6149cfed (patch) | |
tree | e84090be4b00509e2cd7bc1d9edaa6fc0943b133 /lib/Support | |
parent | a38edf071dbc76b2e0525485ea4c368cee908373 (diff) | |
download | external_llvm-f7e73accb7abe472a1febc38888133df6149cfed.zip external_llvm-f7e73accb7abe472a1febc38888133df6149cfed.tar.gz external_llvm-f7e73accb7abe472a1febc38888133df6149cfed.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/raw_ostream.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp index 3e5ce04..92fa8b5 100644 --- a/lib/Support/raw_ostream.cpp +++ b/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 |