| www.delorie.com/djgpp/mail-archives/browse.cgi | search |
| Date: | Sun, 3 May 1998 18:42:59 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| To: | Nate Eldredge <nate AT cartsys DOT com> |
| cc: | Andreas Kochenburger <kochenbu AT no DOT spam DOT de>, djgpp AT delorie DOT com |
| Subject: | Re: Bug in djgpp 2.8.0b with open()? |
| In-Reply-To: | <19980429033703.AAF3301@ppp104.cartsys.com> |
| Message-ID: | <Pine.SUN.3.91.980503184236.19706l-100000@is> |
| MIME-Version: | 1.0 |
On Tue, 28 Apr 1998, Nate Eldredge wrote:
> >ANSI standard doesn't say anything about the `open' function because
> >`open' is non-ANSI.
>
> Okay, to be pedantic...
>
> What does POSIX say?
About O_RDONLY, O_WRONLY and O_RDWR:
...the programmer *must* specify one of these.
About O_TRUNC:
This flag should be used only on ordinary files open for
writing.
So it seems to me that using O_TRUNC with no O_WRONLY or O_RDWR is an
error, as far as Posix is concerned.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |