Date: Sun, 3 May 1998 18:42:59 +0300 (IDT) From: Eli Zaretskii To: Nate Eldredge cc: Andreas Kochenburger , 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.