From: Maxime Devos <maximedevos@telenet.be>
To: 46220@debbugs.gnu.org
Subject: bug#46220: Fwd: Some non-standard O_* flags are missing
Date: Tue, 09 Mar 2021 20:03:27 +0100 [thread overview]
Message-ID: <4eca22f89b0e02b71962d035de638095e2a72ed2.camel@telenet.be> (raw)
In-Reply-To: <308932c261a6f953a498606fb45cb35e08988af5.camel@telenet.be>
[-- Attachment #1.1: Type: text/plain, Size: 144 bytes --]
I forgot to include O_PATH, which (in combination with O_NOFOLLOW)
is required for opening a symbolic link. See revised patch in attachment.
[-- Attachment #1.2: 0001-Define-O_NOFOLLOW-and-various-other-flags-when-suppo.patch --]
[-- Type: text/x-patch, Size: 2124 bytes --]
From d769a75962c64804f354a0133494491626b8b2dc Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Tue, 2 Mar 2021 18:03:22 +0100
Subject: [PATCH] Define `O_NOFOLLOW' and various other flags when supported.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* libguile/filesys.c (scm_init_filesys): Define ‘O_IGNORE_CTTY’,
‘O_NOLINK’, ‘O_NOFOLLOW’, ‘O_PATH’, ‘O_TMPFILE’, ‘O_SHLOCK’,
‘O_EXLOCK’, ‘O_ASYNC’, ‘O_NOATIME’, ‘O_DIRECTORY’, ‘O_CLOEXEC’
and ‘O_DIRECT’ when available.
---
libguile/filesys.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 1b0af6e14..fce6eec2b 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1958,9 +1958,45 @@ scm_init_filesys ()
#ifdef O_LARGEFILE
scm_c_define ("O_LARGEFILE", scm_from_int (O_LARGEFILE));
#endif
+#ifdef O_IGNORE_CTTY
+ scm_c_define ("O_IGNORE_CTTY", scm_from_int (O_IGNORE_CTTY));
+#endif
+#ifdef O_NOLINK
+ scm_c_define ("O_NOLINK", scm_from_int (O_NOLINK));
+#endif
#ifdef O_NOTRANS
scm_c_define ("O_NOTRANS", scm_from_int (O_NOTRANS));
#endif
+#ifdef O_NOFOLLOW
+ scm_c_define ("O_NOFOLLOW", scm_from_int (O_NOFOLLOW));
+#endif
+#ifdef O_PATH
+ scm_c_define ("O_PATH", scm_from_int (O_PATH));
+#endif
+#ifdef O_TMPFILE
+ scm_c_define ("O_TMPFILE", scm_from_int (O_TMPFILE));
+#endif
+#ifdef O_SHLOCK
+ scm_c_define ("O_SHLOCK", scm_from_int (O_SHLOCK));
+#endif
+#ifdef O_EXLOCK
+ scm_c_define ("O_EXLOCK", scm_from_int (O_EXLOCK));
+#endif
+#ifdef O_ASYNC
+ scm_c_define ("O_ASYNC", scm_from_int (O_ASYNC));
+#endif
+#ifdef O_NOATIME
+ scm_c_define ("O_NOATIME", scm_from_int (O_NOATIME));
+#endif
+#ifdef O_DIRECTORY
+ scm_c_define ("O_DIRECTORY", scm_from_int (O_DIRECTORY));
+#endif
+#ifdef O_CLOEXEC
+ scm_c_define ("O_CLOEXEC", scm_from_int (O_CLOEXEC));
+#endif
+#ifdef O_DIRECT
+ scm_c_define ("O_DIRECT", scm_from_int (O_DIRECT));
+#endif
#ifdef F_DUPFD
scm_c_define ("F_DUPFD", scm_from_int (F_DUPFD));
--
2.30.1
[-- 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 19:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <eee99a01c43dec23cd119f71b9a9758c7986aceb.camel@telenet.be>
2021-01-31 21:30 ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
2021-01-31 21:31 ` bug#46220: Acknowledgement (Fwd: Some non-standard O_* flags are missing) GNU bug Tracking System
2021-03-09 19:03 ` Maxime Devos [this message]
2021-05-02 14:05 ` bug#46220: Fwd: Some non-standard O_* flags are missing Ludovic Courtès
2021-05-08 10:05 ` Ludovic Courtès
2021-05-08 10:06 ` bug#46220: closed (Re: bug#46220: Fwd: Some non-standard O_* flags are missing) GNU bug Tracking System
2021-03-02 18:30 ` bug#46220: Some non-standard O_* flags are missing Maxime Devos
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=4eca22f89b0e02b71962d035de638095e2a72ed2.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=46220@debbugs.gnu.org \
/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).