[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some non-standard O_* flags are missing

From: Maxime Devos
Subject: Re: Some non-standard O_* flags are missing
Date: Tue, 09 Mar 2021 22:47:20 +0100
User-agent: Evolution 3.34.2

On Tue, 2021-03-09 at 21:36 +0100, Andy Wingo wrote:
> Hi :)  Sure, would be happy to accept a patch for these.
See <>
and messages above.  I'll look at updating NEWS and the manual

>   It's adding
> more definitions to the base environment, which is usually a negative,
> but we'll have to find some kind of module solution for all of these
> flags at some point.

Would defining O_* in a new module (ice-9 open-flags)
(or the existing module (ice-9 posix) maybe?) be acceptable?
Or alternatively, a syntax (open-flag SYMBOL) that expands to
the flag's value --

the last one might be tricky in a
cross-compilation context, but I suppose it would be possible
to define some script "c-snarf" for gathering #define values
from some C include headers to generate a target-architecture specific
table "???/lib/guile/$VERSION/c-defines/$SYSTEM/open-flags.alist",
or something like that.

(Perhaps not really ideal for non-Scheme languages that don't
use Scheme's macro system, but on the plus side the flags would
be inlined in the .go.)

-- Well, that's a little complicated for this patch (-:.
But something to think about perhaps, for eventual native
compilation.  (IIRC Racket and Common Lisp have a FFI
that understands C include files to some degree.)

>   If you do send a patch, please update the manual
> and NEWS also.

The manual only documents O_RDONLY, O_WRONLY, O_RDWR,
O_APPEND and O_CREAT currently, and points the reader
at glibc's manual for additional flags.


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]