www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/04/03/11:07:43

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10204031602.AA18516@clio.rice.edu>
Subject: Re: redirection problem with perl
To: djgpp-workers AT delorie DOT com
Date: Wed, 3 Apr 2002 10:02:47 -0600 (CST)
In-Reply-To: <3CAB1FDB.68F9CF2F@phekda.freeserve.co.uk> from "Richard Dawe" at Apr 03, 2002 04:29:31 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
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

> > 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 ;-)
> 
> How about the diff below? This updates the test program to parse F_GETFL's
> return code. OK to commit? I'll add a "What's Changed" entry too for the
> commit.

Does the code below work on NT/Win2K/XP?  If not, the return value is
being changed (previously 0, now -1) for that platform.

> +      /* FIXME: Use the data in the SFT. */
> +      sft_entry_ptr = _get_sft_entry_ptr(fd);
> +      if (!sft_entry_ptr)
> +      {
> +       /* Pass through `errno'. */
> +       return -1;
> +      }
> +
> +      /* Offset 2 in the SFT contains the open flags. */
> +      sft_open_flags = _farpeekw(_dos_ds, sft_entry_ptr + 2);

- Raw text -


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