2 @section @code{renameat}
5 POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/renameat.html}
7 Gnulib module: renameat
9 Portability problems fixed by Gnulib:
12 This function does not reject trailing slashes on non-directories on
13 some platforms, as in @code{renameat(fd,"file",fd,"new/")}:
16 This function ignores trailing slashes on symlinks on some platforms,
17 such that @code{renameat(fd,"link/",fd,"new")} corrupts @file{link}:
20 This function is missing on some platforms:
21 glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
22 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw,
26 Portability problems not fixed by Gnulib:
29 POSIX requires that @code{renameat(fd,"symlink-to-dir/",fd,"dir2")} rename
30 @file{dir} and leave @file{symlink-to-dir} dangling; likewise, it
31 requires that @code{renameat(fd,"dir",fd,"dangling/")} rename @file{dir} so
32 that @file{dangling} is no longer a dangling symlink. This behavior
33 is counter-intuitive, so on some systems, @code{renameat} fails with
34 @code{ENOTDIR} if either argument is a symlink with a trailing slash:
35 glibc, OpenBSD, Cygwin 1.7.
37 This function will not rename a source that is currently opened