Re: [cc65] Re: CBM POSIX I/O w/o O_TRUNC ?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2010-02-08 19:32:33
Hi!

On Sun, Feb 07, 2010 at 11:29:11PM +0100, Oliver Schmidt wrote:
> a) Why doesn't the open() code require O_EXCL to be set in the same
> way it requires O_CREAT to be set?

Why should it?  And the goal was not to implement POSIX behaviour, but get
something usable. To implement full POSIX, some more flags are necessary, and
some of the functionality cannot be implemented (and is useless on an 8-bit).

> b) Why does the code check for O_TRUNC and O_APPEND if only "new"
> files can be written?

That is probably an error. Appending data to an existing file is possible, so
O_WRONLY | O_APPEND should be allowed.

> In any case it would be great if there were some hints in the docs on
> what the CBM implementation of the POSIX I/O calls can and what they
> can't.

Feel free to add them as appropriate.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Feb 8 19:32:38 2010

This archive was generated by hypermail 2.1.8 : 2010-02-08 19:32:40 CET