This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] cli/cli-dump.c: Write dump always in binary mode onCygwin
- From: Andreas Schwab <schwab at suse dot de>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 05 Aug 2002 14:30:01 +0200
- Subject: Re: [RFA] cli/cli-dump.c: Write dump always in binary mode onCygwin
- References: <20020805122700.Z3921@cygbert.vinschen.de>
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."