unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#46220: Fwd: Some non-standard O_* flags are missing
       [not found] <eee99a01c43dec23cd119f71b9a9758c7986aceb.camel@telenet.be>
@ 2021-01-31 21:30 ` Maxime Devos
  2021-01-31 21:31   ` bug#46220: Acknowledgement (Fwd: Some non-standard O_* flags are missing) GNU bug Tracking System
                     ` (2 more replies)
  2021-03-02 18:30 ` bug#46220: Some non-standard O_* flags are missing Maxime Devos
  1 sibling, 3 replies; 7+ messages in thread
From: Maxime Devos @ 2021-01-31 21:30 UTC (permalink / raw)
  To: 46220


[-- Attachment #1.1: Type: text/plain, Size: 124 bytes --]

Hi guilers,

I've accidentally sent the message to guile-devel instead
of bug-guile.  The bug report is forwarded here.

[-- Attachment #1.2: Forwarded message — Some non-standard O_* flags are missing --]
[-- Type: message/rfc822, Size: 1619 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 654 bytes --]

Hi guilers,

I noticed the following open flags are not defined:
O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK,
O_SHLOCK, O_EXLOCK, O_ASYNC, O_NOATIME.

Some of these are Hurd-specific, Linux-specific
and BSD-specific.  I'm particularily interested
in O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK
and O_NOATIME, the others don't matter for me,
though they may be useful for others.

Could extra O_* flags be exported to Guile (in libguile/filesys.c)
on systems where they are defined?

Greetings,
Maxime
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #1.2.1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: Acknowledgement (Fwd: Some non-standard O_* flags are missing)
  2021-01-31 21:30 ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
@ 2021-01-31 21:31   ` GNU bug Tracking System
  2021-03-09 19:03   ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
  2021-05-08 10:06   ` bug#46220: closed (Re: bug#46220: Fwd: Some non-standard O_* flags are missing) GNU bug Tracking System
  2 siblings, 0 replies; 7+ messages in thread
From: GNU bug Tracking System @ 2021-01-31 21:31 UTC (permalink / raw)
  To: bug-guile

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-guile@gnu.org

If you wish to submit further information on this problem, please
send it to 46220@debbugs.gnu.org.

Please do not send mail to help-debbugs@gnu.org unless you wish
to report a problem with the Bug-tracking system.

-- 
46220: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46220
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems



^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: Some non-standard O_* flags are missing
       [not found] <eee99a01c43dec23cd119f71b9a9758c7986aceb.camel@telenet.be>
  2021-01-31 21:30 ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
@ 2021-03-02 18:30 ` Maxime Devos
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Devos @ 2021-03-02 18:30 UTC (permalink / raw)
  Cc: 46220


[-- Attachment #1.1: Type: text/plain, Size: 679 bytes --]

Hi guilers,

Attached is a patch that exports O_NOFOLLOW & others
when available.  While testing, I found some weirdness
(kernel: Linux).

$ ./meta/build-env guile
scheme@(guile-user)> O_NOFOLLOW
$1 = 131072
scheme@(guile-user)> O_NOTRANS
$2 = 0
scheme@(guile-user)> O_LARGEFILE
$3 = 0

O_NOFOLLOW is exported as expected.  O_NOTRANS is exported,
even though on the Linux kernel (O_NOTRANS is Hurd-specific).
O_LARGEFILE is 0, which could be correct I suppose, but if
files are opened in large file mode by default I don't really
see a point in defining O_LARGEFILE.

This seems orthogonal to this bug (well, feature request), though.

Greetings,
Maxime.

[-- Attachment #1.2: 0001-Define-O_NOFOLLOW-and-various-other-flags-when-suppo.patch --]
[-- Type: text/x-patch, Size: 2033 bytes --]

From 885c0886295eded82188c32b3b5ae52dd08b306c 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_TMPFILE’, ‘O_SHLOCK’, ‘O_EXLOCK’,
  ‘O_ASYNC’, ‘O_NOATIME’, ‘O_DIRECTORY’, ‘O_CLOEXEC’ and ‘O_DIRECT’
  when available.
---
 libguile/filesys.c | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/libguile/filesys.c b/libguile/filesys.c
index 1b0af6e14..020c9cf7b 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1958,9 +1958,42 @@ 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_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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: Fwd: Some non-standard O_* flags are missing
  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
  2021-05-02 14:05     ` 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
  2 siblings, 2 replies; 7+ messages in thread
From: Maxime Devos @ 2021-03-09 19:03 UTC (permalink / raw)
  To: 46220


[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: Fwd: Some non-standard O_* flags are missing
  2021-03-09 19:03   ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
@ 2021-05-02 14:05     ` Ludovic Courtès
  2021-05-08 10:05     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2021-05-02 14:05 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46220

Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

> 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(+)

The patch LGTM.  I’ll apply it later today if there are no objections.

Thanks!

Ludo’.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: Fwd: Some non-standard O_* flags are missing
  2021-03-09 19:03   ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
  2021-05-02 14:05     ` Ludovic Courtès
@ 2021-05-08 10:05     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2021-05-08 10:05 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 46220-done

Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

> 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.

Pushed as 553c82cee924f0bada27f8209c3bcb28be407953, followed with a NEWS
update.

Thanks!

Ludo’.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#46220: closed (Re: bug#46220: Fwd: Some non-standard O_* flags are missing)
  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   ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
@ 2021-05-08 10:06   ` GNU bug Tracking System
  2 siblings, 0 replies; 7+ messages in thread
From: GNU bug Tracking System @ 2021-05-08 10:06 UTC (permalink / raw)
  To: bug-guile

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

Your bug report

#46220: Fwd: Some non-standard O_* flags are missing

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 46220@debbugs.gnu.org.

-- 
46220: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=46220
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems

[-- Attachment #2: Type: message/rfc822, Size: 3519 bytes --]

From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 46220-done@debbugs.gnu.org
Subject: Re: bug#46220: Fwd: Some non-standard O_* flags are missing
Date: Sat, 08 May 2021 12:05:32 +0200
Message-ID: <878s4pa6c3.fsf@gnu.org>

Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

> 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.

Pushed as 553c82cee924f0bada27f8209c3bcb28be407953, followed with a NEWS
update.

Thanks!

Ludo’.


[-- Attachment #3: Type: message/rfc822, Size: 6248 bytes --]

[-- Attachment #3.1.1.1: Type: text/plain, Size: 124 bytes --]

Hi guilers,

I've accidentally sent the message to guile-devel instead
of bug-guile.  The bug report is forwarded here.

[-- Attachment #3.1.1.2: Forwarded message — Some non-standard O_* flags are missing --]
[-- Type: message/rfc822, Size: 1619 bytes --]

[-- Attachment #3.1.1.2.1.1: Type: text/plain, Size: 654 bytes --]

Hi guilers,

I noticed the following open flags are not defined:
O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK,
O_SHLOCK, O_EXLOCK, O_ASYNC, O_NOATIME.

Some of these are Hurd-specific, Linux-specific
and BSD-specific.  I'm particularily interested
in O_NOFOLLOW, O_TMPFILE, O_IGNORE_CTTY, O_NOLINK
and O_NOATIME, the others don't matter for me,
though they may be useful for others.

Could extra O_* flags be exported to Guile (in libguile/filesys.c)
on systems where they are defined?

Greetings,
Maxime
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #3.1.1.2.1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

[-- Attachment #3.1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-08 10:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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   ` bug#46220: Fwd: Some non-standard O_* flags are missing Maxime Devos
2021-05-02 14:05     ` 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

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git