From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4924 invoked by alias); 26 Sep 2005 19:13:46 -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 4873 invoked by uid 22791); 26 Sep 2005 19:13:39 -0000 Received: from romy.inter.net.il (HELO romy.inter.net.il) (192.114.186.66) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 26 Sep 2005 19:13:39 +0000 Received: from HOME-C4E4A596F7 (IGLD-83-130-206-248.inter.net.il [83.130.206.248]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id CNA02856 (AUTH halo1); Mon, 26 Sep 2005 22:13:35 +0300 (IDT) Date: Mon, 26 Sep 2005 19:13:00 -0000 Message-Id: From: Eli Zaretskii To: Dave Murphy CC: gdb-patches@sources.redhat.com In-reply-to: <20050926140841.GB17370@trixie.casa.cgf.cx> (message from Christopher Faylor on Mon, 26 Sep 2005 10:08:41 -0400) Subject: Re: [patch] Build arm-elf-gdb on mingw host Reply-to: 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> X-SW-Source: 2005-09/txt/msg00231.txt.bz2 > Date: Mon, 26 Sep 2005 10:08:41 -0400 > From: Christopher Faylor > > 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. > > Would it be possible to just link with binmode.o under mingw (and cygwin for > that matter)? If the problem is with MSYS's makeinfo, then it's IMHO wrong to solve it in chew. Besides, the suggested change, viz +#ifdef __MINGW32__ +/* Prevent \r\n\ line endings */ +#include +unsigned int _CRT_fmode = _O_BINARY; +#endif is too general: it switches _all_ file I/O for _all_ files to binary mode, in _all_ MinGW builds. Thus, if the file chew reads is edited with some Windows editor that doesn't preserve line-endings (Emacs does), then chew itself might fail. Even if currently this change doesn't cause any trouble, it could be a time bomb: imagine that at a later date someone adds code to chew that reads some other file--we don't want to remember then to open it explicitly in text mode to prevent bugs. So I'm against this fix. If MSYS makeinfo is the culprit, let them fix it, or let them use another port, which does TRT.