delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/29/05:14:53

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Tue, 29 Jan 2002 11:13:33 +0100
From: Laszlo Molnar <laszlo DOT molnar AT eth DOT ericsson DOT se>
To: djgpp-workers AT delorie DOT com
Subject: Re: redirection problem with perl
Message-ID: <20020129111332.J565@libra.eth.ericsson.se>
References: <20020128122904 DOT R5722 AT libra DOT eth DOT ericsson DOT se> <Pine DOT SUN DOT 3 DOT 91 DOT 1020128134413 DOT 26430D-100000 AT is>
Mime-Version: 1.0
User-Agent: Mutt/1.2i
In-Reply-To: <Pine.SUN.3.91.1020128134413.26430D-100000@is>; from eliz@is.elta.co.il on Mon, Jan 28, 2002 at 01:50:41PM +0200
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 Mon, Jan 28, 2002 at 01:50:41PM +0200, Eli Zaretskii wrote:
> Write a DJGPP-specific functions which returns the open mode based on the
> stream's _flag member of struct FILE, and use that instead of fcntl.

Hmm, I tried this, and it seems to work, thanks. Unfortunately this
_flag member does not store information about the text/binary mode of
the stream, but I found the necessary information in another structure
(__file_handles I think). On the other hand the _IOAPPEND flag seems to
be not used in the sources of libc, so I guess this information is lost
for me...

> Or fix the FIXME in fcntl.c that would make F_GETFL something other than
> a no-op, and then use the fixed version to build Perl ;-)

Well, sounds tricky. I'm not sure how to get the necessary information
from DOS. And I would like to use the plain 2.03 libc...

> Btw, I think that the code in Perl you showed is non-portable: no one

True. In fact in the latest development version of perl most of the
ports are already switched to perl's own "stdio" implementation (called
PerlIO) which solves this problem portably. Too bad it did not work
at all with DJGPP when I tried...

Laszlo

- Raw text -


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