about summary refs log tree commit diff
path: root/posix/unistd.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-16 00:24:16 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-16 00:24:16 +0000
commit5c46041a9c8e0431f0b329a94becfc5d576d12cb (patch)
treef1674233067d582cc28ab1221c00660b8fb66a65 /posix/unistd.h
parentfc30e8dafa2326ef5f5c05f032606635c329cc12 (diff)
downloadglibc-5c46041a9c8e0431f0b329a94becfc5d576d12cb.tar.gz
glibc-5c46041a9c8e0431f0b329a94becfc5d576d12cb.tar.xz
glibc-5c46041a9c8e0431f0b329a94becfc5d576d12cb.zip
* sysdeps/unix/sysv/linux/renameat.c: Move errno setting code in
	separate function __atfct_seterrno_2.
	* include/fcntl.h: Declare __atfct_seterrno_2.
	* posix/unistd.h: Declare linkat, symlinkat, readlinkat.
	* io/Makefile (routines): Add linkat, symlinkat, readlinkat.
	* io/Versions [GLIBC_2.4]: Export linkat, symlinkat, readlinkat.
	* io/linkat.c: New file.
	* io/readlinkat.c: New file.
	* io/symlinkat.c: New file.
	* sysdeps/unix/sysv/linux/linkat.c: New file.
	* sysdeps/unix/sysv/linux/readlinkat.c: New file.
	* sysdeps/unix/sysv/linux/symlinkat.c: New file.
Diffstat (limited to 'posix/unistd.h')
-rw-r--r--posix/unistd.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/posix/unistd.h b/posix/unistd.h
index 86e0e9e659..9684126eaa 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -742,6 +742,13 @@ extern int ttyslot (void) __THROW;
 extern int link (__const char *__from, __const char *__to)
      __THROW __nonnull ((1, 2)) __wur;
 
+#ifdef __USE_GNU
+/* Like link but relative paths in TO and FROM are interpreted relative
+   to FROMFD and TOFD respectively.  */
+extern int linkat (int __fromfd, __const char *__from, int __tofd,
+		   __const char *__to) __THROW __nonnull ((2, 4)) __wur;
+#endif
+
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
 /* Make a symbolic link to FROM named TO.  */
 extern int symlink (__const char *__from, __const char *__to)
@@ -754,6 +761,17 @@ extern int readlink (__const char *__restrict __path, char *__restrict __buf,
 		     size_t __len) __THROW __nonnull ((1, 2)) __wur;
 #endif /* Use BSD.  */
 
+#ifdef __USE_GNU
+/* Like symlink but a relative path in TO is interpreted relative to TOFD.  */
+extern int symlinkat (__const char *__from, int __tofd,
+		      __const char *__to) __THROW __nonnull ((1, 3)) __wur;
+
+/* Like readlink but a relative PATH is interpreted relative to FD.  */
+extern int readlinkat (int __fd, __const char *__restrict __path,
+		       char *__restrict __buf, size_t __len)
+     __THROW __nonnull ((2, 3)) __wur;
+#endif
+
 /* Remove the link NAME.  */
 extern int unlink (__const char *__name) __THROW __nonnull ((1));