From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in djgpp 2.8.0b with open()? Date: Mon, 4 May 1998 14:12:06 +0100 Organization: wot? me? Message-ID: References: <19980429033703 DOT AAF3301 AT ppp104 DOT cartsys DOT com> NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Eli Zaretskii writes >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. Surely it means its invalid on a file opened RDONLY, correct for WRONLY, open to argument (but probably valid) on RDWR? After all the perceived problem is that O_WRONLY/O_RDWR is not implicit in O_TRUNC, buts needs to be explicitly supplied. --- Paul Shirley: my email address is 'obvious'ly anti-spammed