summaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-24 20:31:50 +0000
committerJakub Jelinek <jakub@redhat.com>2006-04-24 20:31:50 +0000
commit1100b0e29213d536814d675cb3e1faff447db322 (patch)
treec6eb5ed6b41bccaaa7a9b263cac188a143a89e74 /posix
parent48f59b8e1a60fa1e9f20bfd322214cec1be3a635 (diff)
Updated to fedora-glibc-20060424T2027
Diffstat (limited to 'posix')
-rw-r--r--posix/bits/unistd.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h
index d461108e53..96f26d5482 100644
--- a/posix/bits/unistd.h
+++ b/posix/bits/unistd.h
@@ -100,6 +100,28 @@ __NTH (readlink (__const char *__restrict __path, char *__restrict __buf,
}
#endif
+#ifdef __USE_ATFILE
+extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len,
+ size_t __buflen)
+ __THROW __nonnull ((2, 3)) __wur;
+extern ssize_t __REDIRECT_NTH (__readlinkat_alias,
+ (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len),
+ readlinkat)
+ __nonnull ((2, 3)) __wur;
+
+extern __always_inline __nonnull ((2, 3)) __wur ssize_t
+__NTH (readlinkat (int __fd, __const char *__restrict __path,
+ char *__restrict __buf, size_t __len))
+{
+ if (__bos (__buf) != (size_t) -1
+ && (!__builtin_constant_p (__len) || __len > __bos (__buf)))
+ return __readlinkat_chk (__fd, __path, __buf, __len, __bos (__buf));
+ return __readlinkat_alias (__fd, __path, __buf, __len);
+}
+#endif
+
extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
__THROW __wur;
extern char *__REDIRECT_NTH (__getcwd_alias,