summaryrefslogtreecommitdiff
path: root/doc/posix-functions/renameat.texi
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-09-07 06:45:59 -0600
committerEric Blake <ebb9@byu.net>2009-10-02 06:29:58 -0600
commit1b6986bdbf9454a758ed2c24f8f7d91e34e6bc75 (patch)
tree84c0f85f21bf20cb0af7f14d7823dabc16923bfe /doc/posix-functions/renameat.texi
parent0d54f471901494f8fc5b638fbcc0768a42caddc7 (diff)
downloadgnulib-1b6986bdbf9454a758ed2c24f8f7d91e34e6bc75.tar.gz
renameat: new module
Passes on Linux and cygwin 1.7 native renameat, and on systems lacking renameat, but fails on Solaris 9 and 10 for now. * modules/renameat: New file. * lib/renameat.c (renameat): Likewise. * m4/renameat.m4 (gl_FUNC_RENAMEAT): Likewise. * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add witnesses. * modules/stdio (Makefile.am): Substitute them. * lib/stdio.in.h (renameat): Declare it. * MODULES.html.sh (systems lacking POSIX:2008): Mention module. * doc/posix-functions/renameat.texi (renameat): Likewise. * modules/renameat-tests: New test. * tests/test-renameat.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'doc/posix-functions/renameat.texi')
-rw-r--r--doc/posix-functions/renameat.texi29
1 files changed, 25 insertions, 4 deletions
diff --git a/doc/posix-functions/renameat.texi b/doc/posix-functions/renameat.texi
index de7fa9ab9d..52f3921a66 100644
--- a/doc/posix-functions/renameat.texi
+++ b/doc/posix-functions/renameat.texi
@@ -4,16 +4,37 @@
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/renameat.html}
-Gnulib module: ---
+Gnulib module: renameat
Portability problems fixed by Gnulib:
@itemize
+@item
+This function does not reject trailing slashes on non-directories on
+some platforms, as in @code{renameat(fd,"file",fd,"new/")}:
+Solaris 10.
+@item
+This function ignores trailing slashes on symlinks on some platforms,
+such that @code{renameat(fd,"link/",fd,"new")} corrupts @file{link}:
+Solaris 9.
+@item
+This function is missing on some platforms:
+glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
+5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw,
+Interix 3.5, BeOS.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@item
-This function is missing on some platforms:
-glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
-5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Cygwin 1.5.x, mingw, Interix 3.5, BeOS.
+POSIX requires that @code{renameat(fd,"symlink-to-dir/",fd,"dir2")} rename
+@file{dir} and leave @file{symlink-to-dir} dangling; likewise, it
+requires that @code{renameat(fd,"dir",fd,"dangling/")} rename @file{dir} so
+that @file{dangling} is no longer a dangling symlink. This behavior
+is counter-intuitive, so on some systems, @code{renameat} fails with
+@code{ENOTDIR} if either argument is a symlink with a trailing slash:
+glibc, OpenBSD, Cygwin 1.7.
+@item
+This function will not rename a source that is currently opened
+by any process:
+mingw.
@end itemize