[PATCH v2 02/14] Allow file ports in ‘readlink’.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect whether ‘readlinkat’ is defined. * libguile/filesys.c (scm_readlink): Support file ports when ‘readlinkat’ exists. (scm_init_filesys): Provide ‘chdir-ports’ when it exists. * doc/ref/posix.texi (File System): Document it. * test-suite/tests/filesys.test ("readlink"): Test

[PATCH v2 00/14] Bindings to *at functions

2021-11-16 Thread Maxime Devos
This is a v2 of https://lists.gnu.org/archive/html/guile-devel/2021-03/msg0026.html, with a lot more tests, a few less functions and more consistent documentation. ‘rename-file-at’ has been modified to support #f as one of the two directory arguments, denoting the current working directory. Maxime

[PATCH v2 10/14] Define a Scheme binding to ‘unlinkat’ when it exists.

2021-11-16 Thread Maxime Devos
‘unlinkat’ is used for both unlinking regular files and removing empty directories. * configure.ac: Detect if ‘unlinkat’ exists. * doc/ref/posix.texi (File System): Document why there is no ‘rmdirat’ procedure, and document the ‘delete-file-at’ procedure. * libguile/filesys.c (scm_rmdir): Adju

[PATCH v2 09/14] Define a Scheme binding to ‘fchmodat’ when it exists.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect existence of fchmodat. * libguile/filesys.c (scm_chmodat): New procedure. * libguile/filesys.h (scm_chmodat): Make it part of the API. * test-suite/tests/filesys.test ("chmodat"): Test it. --- configure.ac | 4 +-- libguile/filesys.c| 36 +++

[PATCH v2 04/14] Define ‘symlinkat’ wrapper when supported.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect whether ‘symlinkat’ exists. * libguile/filesys.c (scm_symlinkat): Define a Scheme binding when it exists. * libguile/filesys.h: Make the binding part of the public C API. * doc/ref/posix.texi (File System): Document the binding. * test-suite/tests/filesys.test ("symlinkat")

[PATCH v2 11/14] Define a Scheme binding to ‘fchownat’ when it exists.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect whether ‘fchownat’ is available. * libguile/filesys.c (scm_chownat): Define a Scheme binding to ‘fchownat’ when available. * libguile/filesys.h (scm_chownat): Make it part of the API. * doc/ref/posix.texi (File System): Document it. --- configure.ac | 4 ++-- doc/re

[PATCH v2 06/14] Correct documentation of ‘mkdir’ w.r.t. the umask.

2021-11-16 Thread Maxime Devos
* doc/ref/posix.texi (mkdir): Note that the umask is applied even if the mode argument is set. --- doc/ref/posix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi index d261ac8da..7f136376b 100644 --- a/doc/ref/posix.texi +++ b/doc

[PATCH v2 13/14] Define Scheme bindings to ‘openat’ when available.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect if ‘openat’ is defined. * libguile/filesys.c (flags_to_mode): Extract from ... (scm_mode): ... here. (scm_open_fdes_at, scm_openat): Define the Scheme bindings. * libguile/filesys.h (scm_open_fdes_at, scm_openat): Make them part of the API. * doc/ref/posix.texi (File

[PATCH v2 03/14] Allow file ports in ‘utime’.

2021-11-16 Thread Maxime Devos
Ports representing symbolic links are currently unsupported. * configure.ac: Detect 'futimens'. * doc/ref/posix.texi (utime): Update documentation. * libguile/posix.c (scm_utime): Support ports. * libguile/posix.h (scm_utime): Rename argument. * test-suite/tests/posix.test ("utime"): Add more test

[PATCH v2 01/14] Allow file ports in ‘chdir’ when supported.

2021-11-16 Thread Maxime Devos
* configure.ac: Check for ‘fchdir’. * libguile/filesys.c (scm_chdir): Support file ports. (scm_init_filesys): Report support of file ports. * doc/ref/posix.texi (Processes): Update accordingly. * doc/ref/guile.texi: Add copyright line for new documentation in this patch and later patches. * test-su

[PATCH v2 12/14] Define a Scheme binding to ‘fstatat’ when available.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect if ‘fstatat’ is defined. * libguile/filesys.c (scm_statat): Define a Scheme binding to ‘fstatat’. * libguile/filesys.h (scm_statat): Make it part of the C API. * doc/ref/posix.texi (File System): Document it. * libguile/syscalls.h (fstatat_or_fstatat64): Choose between ‘fstat

[PATCH v2 07/14] Define AT_REMOVEDIR and others when available.

2021-11-16 Thread Maxime Devos
* libguile/posix.c (scm_init_posix): Define (in Scheme) AT_REMOVEDIR and AT_EACCESS when defined (in C). --- libguile/posix.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libguile/posix.c b/libguile/posix.c index bd7f40ca8..a6f7c9a0d 100644 --- a/libguile/posix.c +++ b/libguile/posi

[PATCH v2 05/14] Define bindings to ‘mkdirat’ when the C function exists.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect if ‘mkdirat’ exists. * libguile/filesys.c (scm_mkdirat): Define the Scheme binding. * doc/ref/posix.texi (File System): Document it. --- configure.ac | 2 +- doc/ref/posix.texi| 6 ++ libguile/filesys.c| 25 +

[PATCH v2 08/14] Define a Scheme binding to ‘renameat’ when it exists.

2021-11-16 Thread Maxime Devos
* configure.ac: Detect if ‘renameat’ is defined. * libguile/filesys.c (scm_renameat): Define a Scheme binding to the ‘renameat’ system call. * doc/ref/posix.texi (File System): Document it. * libguile/filesys.h (scm_renameat): Make it part of the C API. * test-suite/tests/filesys.test ("rename-fi

[PATCH v2 14/14] Update NEWS.

2021-11-16 Thread Maxime Devos
--- NEWS | 12 1 file changed, 12 insertions(+) diff --git a/NEWS b/NEWS index 710b8ddda..922543a31 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ Changes in 3.0.8 (since 3.0.7) ** Fix compilation of (ash x N), where N is a literal, at -O1 and below ** Texinfo and XML parsers are n

Re: [PATCH v2 14/14] Update NEWS.

2021-11-16 Thread Maxime Devos
Maxime Devos schreef op di 16-11-2021 om 11:06 [+]: > [...] > +** Fix documentation of ‘mkdir’ > +   Previously, the documentation implied the umask was ignored if > the > +   mode was set explicitely.  However, this is not the case. As noted by Thien-Thi Nguyen, the spelling is ‘explicitly’,

Re: [PATCH v2 01/14] Allow file ports in ‘chdir’ when supported.

2021-11-16 Thread Maxime Devos
Maxime Devos schreef op di 16-11-2021 om 11:06 [+]: >  Copyright (C) 1996-1997, 2000-2005, 2009-2021 Free Software > Foundation, > -Inc. > +Inc. \\ > +Copyright (C) 2021 Maxime Devos \\ doesn't work. I'll try something else

Re: [PATCH v2 01/14] Allow file ports in ‘chdir’ when supported.

2021-11-16 Thread Maxime Devos
Maxime Devos schreef op di 16-11-2021 om 12:18 [+]: > Maxime Devos schreef op di 16-11-2021 om 11:06 [+]: > >  Copyright (C) 1996-1997, 2000-2005, 2009-2021 Free Software > > Foundation, > > -Inc. > > +Inc. \\ > > +Copyright (C) 2021 Maxime Devos > > > \\ doesn't work. I'll try something