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 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; 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 Precedence: bulk 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