From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: Re: Some non-standard O_* flags are missing Date: Tue, 09 Mar 2021 22:47:20 +0100 Message-ID: <17e5d28f64768602b6e1eb164e82f90b58c5209d.camel@telenet.be> References: <87mtvc2hfa.fsf@pobox.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-ixZ8Aiy1vZWdvdsGmQQH" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13427"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Mar 09 22:48:04 2021 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJkCx-0003Mv-C1 for guile-devel@m.gmane-mx.org; Tue, 09 Mar 2021 22:48:03 +0100 Original-Received: from localhost ([::1]:56294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJkCw-0006gC-EC for guile-devel@m.gmane-mx.org; Tue, 09 Mar 2021 16:48:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJkCW-0006es-Kn for guile-devel@gnu.org; Tue, 09 Mar 2021 16:47:39 -0500 Original-Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:59330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJkCU-0002gq-3p for guile-devel@gnu.org; Tue, 09 Mar 2021 16:47:36 -0500 Original-Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id eMnT2400Q0mfAB406MnThD; Tue, 09 Mar 2021 22:47:28 +0100 In-Reply-To: <87mtvc2hfa.fsf@pobox.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1615326448; bh=Z6Q3aQT1kdYAYjXg1cEe9LZUrgERkgvM7qJsK3XvfvA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=taEknvLcoJGy7pEVL5hbxTllqdJC5W8FEDzXOBTuaper9pSZYHemxNQYkpLZo0ji1 qMpvQhHpLBMFVDNaoaP8HJ+J5DUlCPDV/SYMuHVES9KA+GcaLSdPwOw7lvr//sPYpH iKSv+ncAicAe9djGGx8IR5vLzCz/+kR7v3IszJfL4ZL5QVp0kCzVkx6RmyBq/40bMx /YqKS+IA7r/LncQLkj1AROVzLN6TptovYiTJM8m8NZZZAay4L/7O/ZsxG1FpX8uHnT wrsfTbMIfydqG1TlbBYR19v+/I85zzI0ObC53g2eRAUBouW6c8BCoc70p5RtOQkM1c RnKzCm0jHqXiw== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20703 Archived-At: --=-ixZ8Aiy1vZWdvdsGmQQH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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. --=-ixZ8Aiy1vZWdvdsGmQQH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYEfs6BccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lZBAQDPpxxPsGunrWjDb4OAgEAAKZ8E p+NPJeNci1DaNfCL2QD/SkoeudJq2KK7KqCJ6J3Mv3X4cB67hCICfnEUkdZ6hAs= =SOYC -----END PGP SIGNATURE----- --=-ixZ8Aiy1vZWdvdsGmQQH--