| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-workers-bounces using -f |
| Date: | Fri, 05 Apr 2002 11:23:12 +0300 |
| From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
| Sender: | halo1 AT zahav DOT net DOT il |
| To: | Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> |
| Message-Id: | <7704-Fri05Apr2002112312+0300-eliz@is.elta.co.il> |
| X-Mailer: | emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 |
| CC: | djgpp-workers AT delorie DOT com |
| In-reply-to: | <3CAB1FDB.68F9CF2F@phekda.freeserve.co.uk> (message from Richard |
| Dawe on Wed, 03 Apr 2002 16:29:31 +0100) | |
| Subject: | Re: redirection problem with perl |
| References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1020128134413 DOT 26430D-100000 AT is> <3CAB1FDB DOT 68F9CF2F AT phekda DOT freeserve DOT co DOT uk> |
| 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 |
> Date: Wed, 03 Apr 2002 16:29:31 +0100
> From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
>
> > 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?
Looks good, but I have one comment (see below).
> BTW _creatnew seems to ignore the flags that are passed to it. For instance,
> if you try to create a new file in write-only mode, then _creatnew ignores the
> write-only flag and opens it read-write.
That sounds like a bug that should be fixed, but could you please
elaborate? Where does _creatnew ignore the flags? I see the code
does use the value of flags when it invokes system calls.
> + /* FIXME: Use the data in the SFT. */
> + sft_entry_ptr = _get_sft_entry_ptr(fd);
> + if (!sft_entry_ptr)
> + {
> + /* Pass through `errno'. */
> + return -1;
> + }
I think you should consult the append flag in __fd_properties even if
the SFT access fails. There's no need to ignore what the library
knows internally.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |