From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3177 invoked by alias); 26 Sep 2005 14:14:49 -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 3107 invoked by uid 22791); 26 Sep 2005 14:14:38 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 26 Sep 2005 14:14:38 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EJtka-0000fw-RD; Mon, 26 Sep 2005 10:14:36 -0400 Date: Mon, 26 Sep 2005 14:14:00 -0000 From: Daniel Jacobowitz To: Dave Murphy , gdb-patches@sources.redhat.com, Eli Zaretskii Subject: Re: [patch] Build arm-elf-gdb on mingw host Message-ID: <20050926141436.GA2527@nevyn.them.org> Mail-Followup-To: Dave Murphy , gdb-patches@sources.redhat.com, Eli Zaretskii References: <4337317B.3050300@ntlworld.com> <20050926035937.GA24565@nevyn.them.org> <43377D19.7050505@ntlworld.com> <20050926132325.GA1219@nevyn.them.org> <20050926140841.GB17370@trixie.casa.cgf.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050926140841.GB17370@trixie.casa.cgf.cx> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00223.txt.bz2 On Mon, Sep 26, 2005 at 10:08:41AM -0400, Christopher Faylor wrote: > On Mon, Sep 26, 2005 at 09:23:26AM -0400, Daniel Jacobowitz wrote: > >On Mon, Sep 26, 2005 at 05:46:17AM +0100, Dave Murphy wrote: > >> Sorry, I should have said that under mingw/msys files read in text mode > >> have line endings converted. There are numerous places in chew.c where > >> it checks for a newline character with expressions like "while (at (tos, > >> idx) == '\n')", see skip_white_and_stars(src, idx), > >> strip_trailing_newlines(), remove_noncomments (src, dst), > >> outputdots(), courierize(), bulletize(), copy_past_newline (ptr, idx, > >> dst), kill_bogus_lines(), indent(), skip_past_newline () and nextword > >> (string, word). It seemed easier to just read the input files as binary > >> and suppress the conversion rather than make all the code deal with the > >> "/r/n" sequence. > > > >I'm afraid this explanation doesn't leave me any more enlightened. Are > >you saying that opening files in text mode, in mingw, produces \r\n in > >the program view if there was originally just a \n? > > I think I get it. This patch just modifies chew so that it always > outputs '\n'. Then you see '\n' on input no matter what. Ah, so the problem is that makeinfo fails to handle the '\r\n'? Funny... I'd have expected an msys version of texinfo to expect \r\n. > Would it be possible to just link with binmode.o under mingw (and cygwin for > that matter)? Maybe, but I'm not sure it's what we want here. What about opening all input files in text mode and all output files in binary mode, on all platforms, if we need to do this? -- Daniel Jacobowitz CodeSourcery, LLC