Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] cli/cli-dump.c: Write dump always in binary mode on Cygwin
Date: Mon, 05 Aug 2002 05:30:00 -0000	[thread overview]
Message-ID: <jed6sxv67q.fsf@sykes.suse.de> (raw)
In-Reply-To: <20020805122700.Z3921@cygbert.vinschen.de> (Corinna Vinschen's message of "Mon, 5 Aug 2002 12:27:00 +0200")

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."


  reply	other threads:[~2002-08-05 12:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05  3:27 Corinna Vinschen
2002-08-05  5:30 ` Andreas Schwab [this message]
2002-08-05 16:10 ` Michael Snyder
2002-08-05 21:45   ` Eli Zaretskii
2002-08-06  1:10     ` Corinna Vinschen
2002-08-06  9:12       ` Eli Zaretskii
2002-08-07  1:52         ` Corinna Vinschen
2002-08-06  7:02     ` Andrew Cagney
2002-08-07  8:45     ` Richard Earnshaw
2002-08-07 10:55       ` Andrew Cagney
2002-08-07 22:09       ` Eli Zaretskii
2002-08-08  9:57         ` Andrew Cagney
2002-08-09  2:19           ` [RFA]: Change all fopen modes to binary in cli-dump.c [was Re: [RFA] cli/cli-dump.c: Write dump always in binary mode on Cygwin] Corinna Vinschen
2002-08-09  7:46             ` Andrew Cagney
2002-08-09  9:36               ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jed6sxv67q.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox