[LLVMbugs] [Bug 16914] New: Use of O_BINARY breaks QNX

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Aug 16 08:05:03 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16914

            Bug ID: 16914
           Summary: Use of O_BINARY breaks QNX
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Support Libraries
          Assignee: unassignedbugs at nondot.org
          Reporter: s_llvm at nedprod.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -478,7 +478,7 @@ raw_fd_ostream::raw_fd_ostream(const char *Filename,
std::string &ErrorInfo,
 raw_fd_ostream::raw_fd_ostream(int fd, bool shouldClose, bool unbuffered)
   : raw_ostream(unbuffered), FD(fd),
     ShouldClose(shouldClose), Error(false), UseAtomicWrites(false) {
-#ifdef O_BINARY
+#if defined(O_BINARY) && !defined(__QNXNTO__)
   // Setting STDOUT and STDERR to binary mode is necessary in Win32
   // to avoid undesirable linefeed conversion.
   if (fd == STDOUT_FILENO || fd == STDERR_FILENO)

This is because QNX defines O_BINARY for compat with DOS, but it really doesn't
mean the same thing.

Niall

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130816/6f5130ea/attachment.html>


More information about the llvm-bugs mailing list