From 8c2352b985b1bf69efb965ba15f5e300eb7e8e12 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 21 Sep 2023 15:50:32 +0200 Subject: Properly enable diagnose_as_builtin attribute --- include/unistd.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include/unistd.h') diff --git a/include/unistd.h b/include/unistd.h index e91f922..57f0d0c 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -42,7 +42,6 @@ extern "C" { #undef write __access(write_only, 2, 3) -__diagnose_as_builtin(__builtin_confstr, 1, 2, 3) _FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l) { size_t __b = __bos(__s, 0); @@ -54,7 +53,6 @@ _FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __ } __access(write_only, 1, 2) -__diagnose_as_builtin(__builtin_getcwd, 1, 2) _FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l) { size_t __b = __bos(__s, 0); @@ -67,7 +65,6 @@ _FORTIFY_FN(getcwd) char *getcwd(char * _FORTIFY_POS0 __s, size_t __l) #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #undef getdomainname __access(write_only, 1, 2) -__diagnose_as_builtin(__builtin_getdomainname, 1, 2) _FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __l) { size_t __b = __bos(__s, 0); @@ -78,7 +75,6 @@ _FORTIFY_FN(getdomainname) int getdomainname(char * _FORTIFY_POS0 __s, size_t __ } #endif -__diagnose_as_builtin(__builtin_getgroups, 1, 2) _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t * _FORTIFY_POS0 __s) { size_t __b = __bos(__s, 0); @@ -89,7 +85,6 @@ _FORTIFY_FN(getgroups) int getgroups(int __l, gid_t * _FORTIFY_POS0 __s) } __access(write_only, 1, 2) -__diagnose_as_builtin(__builtin_gethostname, 1, 2) _FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l) { size_t __b = __bos(__s, 0); @@ -100,7 +95,6 @@ _FORTIFY_FN(gethostname) int gethostname(char * _FORTIFY_POS0 __s, size_t __l) } __access(write_only, 1, 2) -__diagnose_as_builtin(__builtin_getlogin_r, 1, 2) _FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l) { size_t __b = __bos(__s, 0); @@ -110,7 +104,6 @@ _FORTIFY_FN(getlogin_r) int getlogin_r(char * _FORTIFY_POS0 __s, size_t __l) return __orig_getlogin_r(__s, __l); } -__diagnose_as_builtin(__builtin_pread, 1, 2, 3, 4) _FORTIFY_FN(pread) ssize_t pread(int __f, void * _FORTIFY_POS0 __s, size_t __n, off_t __o) { @@ -122,7 +115,6 @@ _FORTIFY_FN(pread) ssize_t pread(int __f, void * _FORTIFY_POS0 __s, } __access(write_only, 2, 3) -__diagnose_as_builtin(__builtin_read, 1, 2, 3) _FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n) { size_t __b = __bos(__s, 0); @@ -133,7 +125,6 @@ _FORTIFY_FN(read) ssize_t read(int __f, void * _FORTIFY_POS0 __s, size_t __n) } __access(write_only, 2, 3) -__diagnose_as_builtin(__builtin_readlink, 1, 2, 3) _FORTIFY_FN(readlink) ssize_t readlink(const char *__p, char * _FORTIFY_POS0 __s, size_t __n) { @@ -145,7 +136,6 @@ _FORTIFY_FN(readlink) ssize_t readlink(const char *__p, } __access(write_only, 3, 4) -__diagnose_as_builtin(__builtin_readlinkat, 1, 2, 3, 4) _FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p, char * _FORTIFY_POS0 __s, size_t __n) { @@ -157,7 +147,6 @@ _FORTIFY_FN(readlinkat) ssize_t readlinkat(int __f, const char *__p, } __access(write_only, 2, 3) -__diagnose_as_builtin(__builtin_ttyname_r, 1, 2, 3) _FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s, size_t __n) { @@ -169,7 +158,6 @@ _FORTIFY_FN(ttyname_r) int ttyname_r(int __f, char * _FORTIFY_POS0 __s, } __access(read_only, 2, 3) -__diagnose_as_builtin(__builtin_write, 1, 2, 3) _FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s, size_t __n) { @@ -180,7 +168,6 @@ _FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s, return __orig_write(__f, __s, __n); } -__diagnose_as_builtin(__builtin_pwrite, 1, 2, 3, 4) _FORTIFY_FN(pwrite) ssize_t pwrite(int __f, const void * _FORTIFY_POS0 __s, size_t __n, off_t __o) { -- cgit v1.3