From 5ac3ea17df811a71fa64aff78ea1b900facd3364 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Sun, 29 Apr 2012 15:34:20 +0200 Subject: Fix attributes for fortify functions. --- posix/bits/unistd.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'posix/bits') diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h index 66430c07b7..1100eb2018 100644 --- a/posix/bits/unistd.h +++ b/posix/bits/unistd.h @@ -30,7 +30,7 @@ extern ssize_t __REDIRECT (__read_chk_warn, __wur __warnattr ("read called with bigger length than size of " "the destination buffer"); -__extern_always_inline __wur ssize_t +__fortify_function __wur ssize_t read (int __fd, void *__buf, size_t __nbytes) { if (__bos0 (__buf) != (size_t) -1) @@ -68,7 +68,7 @@ extern ssize_t __REDIRECT (__pread64_chk_warn, "the destination buffer"); # ifndef __USE_FILE_OFFSET64 -__extern_always_inline __wur ssize_t +__fortify_function __wur ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) { if (__bos0 (__buf) != (size_t) -1) @@ -83,7 +83,7 @@ pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) return __pread_alias (__fd, __buf, __nbytes, __offset); } # else -__extern_always_inline __wur ssize_t +__fortify_function __wur ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { if (__bos0 (__buf) != (size_t) -1) @@ -101,7 +101,7 @@ pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) # endif # ifdef __USE_LARGEFILE64 -__extern_always_inline __wur ssize_t +__fortify_function __wur ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) { if (__bos0 (__buf) != (size_t) -1) @@ -135,7 +135,7 @@ extern ssize_t __REDIRECT_NTH (__readlink_chk_warn, __nonnull ((1, 2)) __wur __warnattr ("readlink called with bigger length " "than size of destination buffer"); -__extern_always_inline __nonnull ((1, 2)) __wur ssize_t +__fortify_function __nonnull ((1, 2)) __wur ssize_t __NTH (readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)) { @@ -169,7 +169,7 @@ extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn, "length than size of destination " "buffer"); -__extern_always_inline __nonnull ((2, 3)) __wur ssize_t +__fortify_function __nonnull ((2, 3)) __wur ssize_t __NTH (readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)) { @@ -196,7 +196,7 @@ extern char *__REDIRECT_NTH (__getcwd_chk_warn, __wur __warnattr ("getcwd caller with bigger length than size of " "destination buffer"); -__extern_always_inline __wur char * +__fortify_function __wur char * __NTH (getcwd (char *__buf, size_t __size)) { if (__bos (__buf) != (size_t) -1) @@ -217,7 +217,7 @@ extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd) __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " "doesn't specify buffer size"); -__extern_always_inline __nonnull ((1)) __attribute_deprecated__ __wur char * +__fortify_function __nonnull ((1)) __attribute_deprecated__ __wur char * __NTH (getwd (char *__buf)) { if (__bos (__buf) != (size_t) -1) @@ -236,7 +236,7 @@ extern size_t __REDIRECT_NTH (__confstr_chk_warn, __warnattr ("confstr called with bigger length than size of destination " "buffer"); -__extern_always_inline size_t +__fortify_function size_t __NTH (confstr (int __name, char *__buf, size_t __len)) { if (__bos (__buf) != (size_t) -1) @@ -261,7 +261,7 @@ extern int __REDIRECT_NTH (__getgroups_chk_warn, __wur __warnattr ("getgroups called with bigger group count than what " "can fit into destination buffer"); -__extern_always_inline int +__fortify_function int __NTH (getgroups (int __size, __gid_t __list[])) { if (__bos (__list) != (size_t) -1) @@ -287,7 +287,7 @@ extern int __REDIRECT_NTH (__ttyname_r_chk_warn, __nonnull ((2)) __warnattr ("ttyname_r called with bigger buflen than " "size of destination buffer"); -__extern_always_inline int +__fortify_function int __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen)) { if (__bos (__buf) != (size_t) -1) @@ -313,7 +313,7 @@ extern int __REDIRECT (__getlogin_r_chk_warn, __nonnull ((1)) __warnattr ("getlogin_r called with bigger buflen than " "size of destination buffer"); -__extern_always_inline int +__fortify_function int getlogin_r (char *__buf, size_t __buflen) { if (__bos (__buf) != (size_t) -1) @@ -340,7 +340,7 @@ extern int __REDIRECT_NTH (__gethostname_chk_warn, __nonnull ((1)) __warnattr ("gethostname called with bigger buflen than " "size of destination buffer"); -__extern_always_inline int +__fortify_function int __NTH (gethostname (char *__buf, size_t __buflen)) { if (__bos (__buf) != (size_t) -1) @@ -369,7 +369,7 @@ extern int __REDIRECT_NTH (__getdomainname_chk_warn, "buflen than size of destination " "buffer"); -__extern_always_inline int +__fortify_function int __NTH (getdomainname (char *__buf, size_t __buflen)) { if (__bos (__buf) != (size_t) -1) -- cgit 1.4.1