delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/09/12:55:08

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Thu, 9 May 2002 09:54:55 -0700
From: Zack Weinberg <zack AT codesourcery DOT com>
To: pavenis AT lanet DOT lv
Cc: Andris Pavenis <pavenis AT latnet DOT lv>, djgpp-workers AT delorie DOT com,
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>,
Nick Clifton <nickc AT cambridge DOT redhat DOT com>, gcc-patches AT gcc DOT gnu DOT org
Subject: Re: RFA: Ignore DOS end-of-line characters (ctrl-Z) unless -W
Message-ID: <20020509165455.GA3910@codesourcery.com>
References: <3CDA764D DOT 1410 DOT A1F3EA AT localhost> <3CDAC9D0 DOT 15538 DOT 1E838FC AT localhost>
Mime-Version: 1.0
In-Reply-To: <3CDAC9D0.15538.1E838FC@localhost>
User-Agent: Mutt/1.3.28i
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, May 09, 2002 at 07:11:12PM +0300, pavenis AT lanet DOT lv wrote:
> On 9 May 2002 at 8:42, Zack Weinberg wrote:
> 
> > On Thu, May 09, 2002 at 01:14:53PM +0300, pavenis AT lanet DOT lv wrote:
> > > 
> > > OK. Here it is (tested for DJGPP with 3.1 branch)
> > 
> > O_TEXT, not O_BINARY.  Also, based on other discussion with Eli, the
> > check should apply to all file descriptors, not just stdin, so please
> > move it below the call to open.
> > 
> 
> I don't think so.
> 
> With O_TEXT we will run into another trouble as length of data in memory will 
> be smaller than one in file. As result read_include_file() will complain that
> input file is shorter than expected.
> 
> So unless we want to remove that check, O_BINARY must stay there.
> 
> Current patch changes mode to O_BINARY in rather specific case when
> one is feeding source in gcc from pipe. For example 
> 	cat foo.c | gcc -c -x c -o foo.o -
> In this case file is opened in text mode by default, and I'm getting
> a warning I mentioned above.

Sorry, I misread !isatty as isatty.  This is fine, then.

zw

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019