delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/05/01/03:57:20

Date: Mon, 1 May 2000 04:37:09 -0400 (EDT)
Message-Id: <200005010837.EAA00013@indy.delorie.com>
From: Eli Zaretskii <eliz AT delorie DOT com>
To: Zack Weinberg <zack AT wolery DOT cumb DOT org>
CC: Laurynas Biveinis <lauras AT softhome DOT net>, gcc-patches AT gcc DOT gnu DOT org,
djgpp-workers AT delorie DOT com
In-reply-to: <20000501000928.J11780@wolery.cumb.org> (message from Zack Weinberg on Mon, 1 May 2000 00:09:28 -0700)
Subject: Re: Minor DJGPP fixes
References: <390C769C DOT 812EAB7D AT softhome DOT net>
<20000501000928 DOT J11780 AT wolery DOT cumb DOT org>
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

> - fcntl() working is a characteristic of the _host_, not the target.
> - You should determine if it works using an autoconf test.

Why didn't the original code use an Autoconf test, then?  I understand
that it was added only recently.

> - If it doesn't work, you need to open the file in blocking mode, not
>   just elide the fcntl(); otherwise the code reading the file will
>   break. 

Could you please explain what does ``open in blocking mode'' mean?
Isn't a normal default `open' good enough?  If not, why not?

> This fcntl() is there to avoid a problem that never happens in real
> life: someone does #include </dev/rmt0> and the preprocessor gets
> wedged because there's no tape.

Shouldn't people who do this get what they were asking for?  I mean,
if someone *really* wanted the preprocessor to read the tape,
shouldn't the preprocessor get stuck if there's no tape?

> Therefore, I'd be willing to dump the fcntl() call entirely and open
> the file in blocking mode on all hosts.  Does anyone else have an
> opinion?

I need to understand what a ``blocking mode'' is to form a useful
opinion.  I assume that the same code will be used to read normal
files as well.

- Raw text -


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