Mail Archives: djgpp/1998/05/03/16:05:39
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.
- Raw text -