From: Maxime Devos <maximedevos@telenet.be>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: Some non-standard O_* flags are missing
Date: Tue, 09 Mar 2021 22:47:20 +0100 [thread overview]
Message-ID: <17e5d28f64768602b6e1eb164e82f90b58c5209d.camel@telenet.be> (raw)
In-Reply-To: <87mtvc2hfa.fsf@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
On Tue, 2021-03-09 at 21:36 +0100, Andy Wingo wrote:
> Hi :) Sure, would be happy to accept a patch for these.
See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46220>
and messages above. I'll look at updating NEWS and the manual
later.
> 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.
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-03-09 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-31 21:13 Some non-standard O_* flags are missing Maxime Devos
2021-03-09 20:36 ` Andy Wingo
2021-03-09 21:47 ` Maxime Devos [this message]
2021-03-10 20:08 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17e5d28f64768602b6e1eb164e82f90b58c5209d.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).