1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-26 05:00:28 +02:00

Define a Scheme binding to ‘fstatat’ when available.

* 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 ‘fstatat’
  and ‘fstatat64’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxime Devos 2021-11-16 11:06:35 +00:00 committed by Ludovic Courtès
parent 0af3c2f509
commit cf255dd3a4
6 changed files with 131 additions and 2 deletions

View file

@ -773,6 +773,14 @@ it will return information about a symbolic link itself, not the
file it points to. @var{path} must be a string.
@end deffn
@deffn {Scheme Procedure} statat dir filename [flags]
@deffnx {C Function} scm_statat dir filename flags
Like @code{stat}, but resolve @var{filename} relative to the directory
referred to by the file port @var{dir} instead. The optional argument
@var{flags} argument can be @code{AT_SYMLINK_NOFOLLOW}, in which case
@var{filename} will not be dereferenced even if it is a symbolic link.
@end deffn
@deffn {Scheme Procedure} readlink path
@deffnx {C Function} scm_readlink (path)
Return the value of the symbolic link named by @var{path} (a string, or