annotate doc/posix-functions/renameat.texi @ 12355:9961377da68e

pread: new module * modules/pread: New file. * lib/pread.c (pread): New file. * m4/pread.m4: Likewise. * lib/unistd.in.h (pread): Define/declare. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define defaults. * modules/unistd (Makefile.am): Substitute witnesses. * doc/posix-functions/pread.texi (pread): Update. * MODULES.html.sh: Add pread.
author Jim Meyering <meyering@redhat.com>
date Wed, 25 Nov 2009 14:33:30 +0100
parents 8e8f0292e99f
children bb0ceefd22dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10880
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 @node renameat
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 @section @code{renameat}
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 @findex renameat
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/renameat.html}
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
12099
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
7 Gnulib module: renameat
10880
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 Portability problems fixed by Gnulib:
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 @itemize
12099
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
11 @item
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
12 This function does not reject trailing slashes on non-directories on
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
13 some platforms, as in @code{renameat(fd,"file",fd,"new/")}:
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
14 Solaris 10.
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
15 @item
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
16 This function ignores trailing slashes on symlinks on some platforms,
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
17 such that @code{renameat(fd,"link/",fd,"new")} corrupts @file{link}:
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
18 Solaris 9.
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
19 @item
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
20 This function is missing on some platforms:
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
21 glibc 2.3.6, MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, OpenBSD 3.8, AIX
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
22 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 8, Cygwin 1.5.x, mingw,
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
23 Interix 3.5, BeOS.
12129
8e8f0292e99f doc: tweak *at function documentation
Eric Blake <ebb9@byu.net>
parents: 12099
diff changeset
24 But the replacement function is not safe to be used in libraries and is not multithread-safe.
10880
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 @end itemize
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 Portability problems not fixed by Gnulib:
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 @itemize
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 @item
12099
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
30 POSIX requires that @code{renameat(fd,"symlink-to-dir/",fd,"dir2")} rename
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
31 @file{dir} and leave @file{symlink-to-dir} dangling; likewise, it
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
32 requires that @code{renameat(fd,"dir",fd,"dangling/")} rename @file{dir} so
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
33 that @file{dangling} is no longer a dangling symlink. This behavior
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
34 is counter-intuitive, so on some systems, @code{renameat} fails with
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
35 @code{ENOTDIR} if either argument is a symlink with a trailing slash:
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
36 glibc, OpenBSD, Cygwin 1.7.
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
37 @item
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
38 This function will not rename a source that is currently opened
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
39 by any process:
01c66cf797b5 renameat: new module
Eric Blake <ebb9@byu.net>
parents: 10883
diff changeset
40 mingw.
10880
b1d6a7b9222f Document functions that have been added to POSIX:2008.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 @end itemize