This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 5/6] Do not reopen temporary files


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> -  FILE *out_file = gdb_fopen_cloexec (filename_temp.data (), "wb").release ();
>> +  gdb_file_up out_file = out_file_fd.to_file ("wb");

Eli> There's a known bug in the MS-Windows (thus MinGW) implementation of
Eli> 'fdopen': it ignores the 'b' and 't' flags.  So the preceding call to
Eli> 'open' must itself specify the O_BINARY flag, or else this replacement
Eli> will introduce a subtle bug.

Thanks.  I think I can pass O_BINARY to mkostemp.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]