diff options
author | Maxime Devos <maximedevos@telenet.be> | 2021-11-16 11:06:36 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-10-21 17:42:20 +0200 |
commit | c8b81ffb3492d1f1e7fc6886809108f31ac55794 (patch) | |
tree | 8bea11430518da4200975f0e1d9eb86f29ab8019 /libguile/syscalls.h | |
parent | cf255dd3a4f01da5e88c6da3738e7745ad8b9594 (diff) | |
download | guile-c8b81ffb3492d1f1e7fc6886809108f31ac55794.tar.gz |
Define Scheme bindings to ‘openat’ when available.
* 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 System): Document them.
* test-suite/tests/filesys.test ("openat"): Test ‘openat’.
* libguile/syscalls.h (openat_or_openat64): Decide between ‘openat’
and ‘openat64’.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'libguile/syscalls.h')
-rw-r--r-- | libguile/syscalls.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/syscalls.h b/libguile/syscalls.h index 37d532e60..6f4061138 100644 --- a/libguile/syscalls.h +++ b/libguile/syscalls.h @@ -58,6 +58,7 @@ #define lstat_or_lstat64 CHOOSE_LARGEFILE(lstat,lstat64) #define off_t_or_off64_t CHOOSE_LARGEFILE(off_t,off64_t) #define open_or_open64 CHOOSE_LARGEFILE(open,open64) +#define openat_or_openat64 CHOOSE_LARGEFILE(openat,openat64) #define readdir_or_readdir64 CHOOSE_LARGEFILE(readdir,readdir64) #if SCM_HAVE_READDIR64_R == 1 # define readdir_r_or_readdir64_r CHOOSE_LARGEFILE(readdir_r,readdir64_r) |