1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-09-01 02:34:55 +00:00
Files
gnulib/modules/renameatu
T
Paul Eggert d682f8de7f fchmodat: port better to MS-Windows etc.
MS-Windows problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-06/msg00041.html
Although I don’t use MS-Windows I see some related fstatat etc.
problems and am trying to fix them with this further patch.
* lib/fchmodat.c (fchmodat):
* lib/lchmod.c (lchmod):
* lib/lchown.c (lchown)
[!HAVE_LCHOWN && HAVE_CHOWN && !CHOWN_MODIFIES_SYMLINK]:
* lib/renameatu.c (renameatu)
[HAVE_RENAME && RENAME_TRAILING_SLASH_SOURCE_BUG]:
Use readlinkat/readlink instead of fstatat/lstat to test merely
whether a string names a symlink, as this avoids problems
with EOVERFLOW.  Also, I hope it works around the MS-Windows
issues that Bruno noted.
* m4/fchmodat.m4 (gl_PREREQ_FCHMODAT):
Check for readlinkat, not lchmod.
* m4/lchmod.m4 (gl_FUNC_LCHMOD): Do not require AC_CANONICAL_HOST
or check for lstat.
(gl_PREREQ_LCHMOD): Check for readlink.
* modules/lchown (Depends-on): Add readlink.  Do not depend on
lstat merely because !HAVE_LCHOWN.
* modules/renameatu (Depends-on): Add fstatat, readlinkat.
2022-06-12 13:47:12 -07:00

46 lines
1.1 KiB
Plaintext

Description:
renameatu() function: rename a file, relative to two dirs, with unsigned flag
Files:
lib/at-func2.c
lib/renameatu.c
lib/renameatu.h
m4/renameat.m4
Depends-on:
stdio
extensions
fcntl-h
filenamecat-lgpl [test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1]
openat-h [test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1]
fstatat [test $REPLACE_RENAMEAT = 1]
readlinkat [test $REPLACE_RENAMEAT = 1]
stdbool [test $REPLACE_RENAMEAT = 1]
at-internal [test $HAVE_RENAMEAT = 0]
filename [test $HAVE_RENAMEAT = 0]
fstat [test $HAVE_RENAMEAT = 0]
getcwd-lgpl [test $HAVE_RENAMEAT = 0]
openat-die [test $HAVE_RENAMEAT = 0]
rename [test $HAVE_RENAMEAT = 0]
same-inode [test $HAVE_RENAMEAT = 0]
save-cwd [test $HAVE_RENAMEAT = 0]
stat [test $HAVE_RENAMEAT = 0]
configure.ac:
gl_FUNC_RENAMEAT
if test $HAVE_RENAMEAT = 0; then
AC_LIBOBJ([at-func2])
fi
Makefile.am:
lib_SOURCES += renameatu.c
Include:
"renameatu.h"
License:
GPL
Maintainer:
Jim Meyering, Eric Blake