diff options
author | Bruno Haible <bruno@clisp.org> | 2021-01-06 02:08:41 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-01-06 04:59:20 +0100 |
commit | 9333dcf67b904820e442634077ecfe285b363c1a (patch) | |
tree | d5433564b16e2956c1725c1ab14fa9b1fbc39369 /lib/utimens.c | |
parent | db1e2d8454753100558a2208a7f858ac957c25d0 (diff) | |
download | gnulib-9333dcf67b904820e442634077ecfe285b363c1a.tar.gz |
utimensat: Work around trailing slash bug in utimensat() on AIX 7.2.
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Require AC_CANONICAL_HOST. Add a
test for trailing slash handling. Improve cross-compilation guesses.
Conditionally define HAVE_NEARLY_WORKING_UTIMENSAT.
* lib/utimensat.c (rpl_utimensat): Add alternative implementation when
HAVE_NEARLY_WORKING_UTIMENSAT is defined.
* lib/utimens.c: Use the overridden utimensat when
HAVE_NEARLY_WORKING_UTIMENSAT is defined.
* doc/posix-functions/utimensat.texi: Mention the AIX bug.
Diffstat (limited to 'lib/utimens.c')
-rw-r--r-- | lib/utimens.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utimens.c b/lib/utimens.c index 677e833f62..44d1ea003e 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -53,7 +53,9 @@ /* Avoid recursion with rpl_futimens or rpl_utimensat. */ #undef futimens -#undef utimensat +#if !HAVE_NEARLY_WORKING_UTIMENSAT +# undef utimensat +#endif /* Solaris 9 mistakenly succeeds when given a non-directory with a trailing slash. Force the use of rpl_stat for a fix. */ |