Re: [cc65] POSIX i/o

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-01-09 22:38:22


On Thu, Jan 09, 2003 at 02:55:01PM +0100, Piotr Fusik wrote:
> > Regarding the #defines for seek: The C standard says that these have to go
> > into stdio.h, so they are in the right place.
>
> Shouldn't they be defined both in stdio.h (for fseek) and fcntl.h (for
> lseek) ?

I see no real need to do that. The standard says that the #defines are
in stdio.h, so anyone using them just has to include this header file.

> > Regarding the values: The
> > standard does not say anything about the values of these constants, the it's
> > up to the implementation to choose them as fits. Why do you think the values
> > are wrong?
>
> On all the systems I checked they were defined as I wrote.

That does not mean that the definitions used by cc65 are wrong. One reason to
change the defines would be if there are older programs out in the wild, that
use numeric values instead of the symbolic names. An example where this is
true is STDIN_FILENO and friends: Older Unix programs often use the numeric
file descriptor 0 instead of using STDIN_FILENO. But even if numeric values
are used by some programs, this wouldn't mean that the values used by cc65 are
wrong. Using some specific values is a concession to old, badly written code,
not a necessity.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-09 22:38:37 CET