diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-23 16:39:42 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-23 16:41:13 +0200 |
commit | 3ee7673cc98d2acca3144a81bfbe1351b2bbe0fd (patch) | |
tree | 9d775d2874724e742c12fc2b914ecbc2a294abd7 /libguile | |
parent | 663b8826d7867578f8df509a5f986c671f857938 (diff) | |
download | guile-3ee7673cc98d2acca3144a81bfbe1351b2bbe0fd.tar.gz |
Define AT_SYMLINK_NOFOLLOW et al.
* libguile/posix.c (scm_init_posix): Define AT_SYMLINK_NOFOLLOW,
AT_SYMLINK_FOLLOW, AT_NO_AUTOMOUNT, and AT_EMPTY_PATH when available.
(scm_utime): Mention AT_SYMLINK_NOFOLLOW.
* doc/ref/posix.texi (File System): Update accordingly.
* test-suite/tests/posix.test ("utime")["AT_SYMLINK_NOFOLLOW"]: New test.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/posix.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libguile/posix.c b/libguile/posix.c index b0fcad5fd..d8200926d 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1624,7 +1624,10 @@ SCM_DEFINE (scm_utime, "utime", 1, 5, 0, "(utime \"foo\" (- (current-time) 3600))\n" "@end lisp\n" "will set the access time to one hour in the past and the\n" - "modification time to the current time.") + "modification time to the current time.\n\n" + "Last, @var{flags} may be either @code{0} or the\n" + "@code{AT_SYMLINK_NOFOLLOW} constant, to set the time of\n" + "@var{pathname} even if it is a symbolic link.\n") #define FUNC_NAME s_scm_utime { int rv; @@ -2433,6 +2436,19 @@ scm_init_posix () scm_c_define ("LOCK_NB", scm_from_int (LOCK_NB)); #endif +#ifdef AT_SYMLINK_NOFOLLOW + scm_c_define ("AT_SYMLINK_NOFOLLOW", scm_from_int (AT_SYMLINK_NOFOLLOW)); +#endif +#ifdef AT_SYMLINK_FOLLOW + scm_c_define ("AT_SYMLINK_FOLLOW", scm_from_int (AT_SYMLINK_FOLLOW)); +#endif +#ifdef AT_NO_AUTOMOUNT + scm_c_define ("AT_NO_AUTOMOUNT", scm_from_int (AT_NO_AUTOMOUNT)); +#endif +#ifdef AT_EMPTY_PATH + scm_c_define ("AT_EMPTY_PATH", scm_from_int (AT_EMPTY_PATH)); +#endif + #include "libguile/cpp-SIG.c" #include "libguile/posix.x" |