[PATCH] D38984: Use O_BINARY when opening GCDA file on Windows

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 07:51:16 PDT 2017


He does add “b” to the mode of fopen as the workaround.  The problem is
that he already had opened with open(), which doesn’t take a mide string,
only mode flags.  So  in order to use fopen, which i hypothesize is because
open didn’t have _O_BINARY, it had to be closed first and reopened with “b”.

Point is, if you use _O_BINARY with open(), then “b” becomes
irrelevant/unnecessary

On Tue, Oct 17, 2017 at 7:22 AM Joerg Sonnenberger <joerg at bec.de> wrote:

> On Tue, Oct 17, 2017 at 02:17:15PM +0000, Zachary Turner via llvm-commits
> wrote:
> > Did you confirm this fixes it? Because i was just speculating :)
>
> ...and if it does, adding "b" to the mode would result in the same
> behavior for fopen.
>
> Joerg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171017/adde1e73/attachment.html>


More information about the llvm-commits mailing list