This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] cli/cli-dump.c: Write dump always in binary mode onCygwin


Corinna Vinschen <vinschen@redhat.com> writes:

|> Hi,
|> 
|> the following patch solves a problem in the dump code in cli/cli-dump.c.
|> On systems which support binary and textmode file IO, the dump code
|> doesn't explicitly write in binary mode, resulting in files written
|> in textmode if that's the current default on the system.  This leads
|> to a corrupted dump file since each LF is converted to CR/LF in the
|> file.  The patch uses the "b" flag in the fopen(3) call to write
|> explicitly binary.  Even if that flag is POSIX standard

It's not only POSIX C but already ISO C.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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