From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6065 invoked by alias); 5 Aug 2002 12:30:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6057 invoked from network); 5 Aug 2002 12:30:02 -0000 Received: from unknown (HELO Cantor.suse.de) (213.95.15.193) by sources.redhat.com with SMTP; 5 Aug 2002 12:30:02 -0000 Received: from Hermes.suse.de (Charybdis.suse.de [213.95.15.201]) by Cantor.suse.de (Postfix) with ESMTP id E420414475 for ; Mon, 5 Aug 2002 14:30:01 +0200 (MEST) X-Authentication-Warning: sykes.suse.de: schwab set sender to schwab@suse.de using -f To: gdb-patches@sources.redhat.com Subject: Re: [RFA] cli/cli-dump.c: Write dump always in binary mode on Cygwin References: <20020805122700.Z3921@cygbert.vinschen.de> X-Yow: Now that I have my ``APPLE,'' I comprehend COST ACCOUNTING!! From: Andreas Schwab Date: Mon, 05 Aug 2002 05:30:00 -0000 In-Reply-To: <20020805122700.Z3921@cygbert.vinschen.de> (Corinna Vinschen's message of "Mon, 5 Aug 2002 12:27:00 +0200") Message-ID: User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (ia64-suse-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-08/txt/msg00093.txt.bz2 Corinna Vinschen 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."