diff options
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r-- | libc/sysdeps/linux/common/getcwd.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getdirname.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getdnnm.c | 7 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getgroups.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/gethstnm.c | 7 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getpriority.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getsid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/nice.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setegid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/seteuid.c | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setgroups.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setpgid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setpgrp.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setpriority.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setregid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setresgid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setresuid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setreuid.c | 3 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/setsid.c | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/uname.c | 4 |
20 files changed, 54 insertions, 19 deletions
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c index d007993eb..4a1ea093e 100644 --- a/libc/sysdeps/linux/common/getcwd.c +++ b/libc/sysdeps/linux/common/getcwd.c @@ -153,7 +153,7 @@ int __syscall_getcwd(char * buf, unsigned long size) #endif -char *getcwd(char *buf, size_t size) +char attribute_hidden *__getcwd(char *buf, size_t size) { int ret; char *path; @@ -185,4 +185,4 @@ char *getcwd(char *buf, size_t size) free (path); return NULL; } - +strong_alias(__getcwd,getcwd) diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c index 486ee9335..d791f34a3 100644 --- a/libc/sysdeps/linux/common/getdirname.c +++ b/libc/sysdeps/linux/common/getdirname.c @@ -17,6 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define getcwd __getcwd + #include <features.h> #include <unistd.h> #include <sys/stat.h> diff --git a/libc/sysdeps/linux/common/getdnnm.c b/libc/sysdeps/linux/common/getdnnm.c index 3c48b4ca0..aa4215f84 100644 --- a/libc/sysdeps/linux/common/getdnnm.c +++ b/libc/sysdeps/linux/common/getdnnm.c @@ -1,3 +1,5 @@ +#define uname __uname + #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -6,8 +8,8 @@ #include <sys/utsname.h> -int -getdomainname(char *name, size_t len) +int attribute_hidden +__getdomainname(char *name, size_t len) { struct utsname uts; @@ -25,3 +27,4 @@ getdomainname(char *name, size_t len) __strcpy(name, uts.domainname); return 0; } +strong_alias(__getdomainname,getdomainname) diff --git a/libc/sysdeps/linux/common/getgroups.c b/libc/sysdeps/linux/common/getgroups.c index 402d87e66..c863489b9 100644 --- a/libc/sysdeps/linux/common/getgroups.c +++ b/libc/sysdeps/linux/common/getgroups.c @@ -18,7 +18,7 @@ static inline _syscall2(int, __syscall_getgroups, int, size, __kernel_gid_t *, list); -int getgroups(int n, gid_t * groups) +int attribute_hidden __getgroups(int n, gid_t * groups) { if (unlikely(n < 0)) { __set_errno(EINVAL); @@ -36,3 +36,4 @@ int getgroups(int n, gid_t * groups) return ngids; } } +strong_alias(__getgroups,getgroups) diff --git a/libc/sysdeps/linux/common/gethstnm.c b/libc/sysdeps/linux/common/gethstnm.c index 8a23e9516..cb6e5efce 100644 --- a/libc/sysdeps/linux/common/gethstnm.c +++ b/libc/sysdeps/linux/common/gethstnm.c @@ -1,10 +1,12 @@ +#define uname __uname + #include <string.h> #include <unistd.h> #include <sys/utsname.h> #include <errno.h> -int -gethostname(char *name, size_t len) +int attribute_hidden +__gethostname(char *name, size_t len) { struct utsname uts; @@ -22,3 +24,4 @@ gethostname(char *name, size_t len) __strcpy(name, uts.nodename); return 0; } +strong_alias(__gethostname,gethostname) diff --git a/libc/sysdeps/linux/common/getpriority.c b/libc/sysdeps/linux/common/getpriority.c index ca8b375fb..3f695402d 100644 --- a/libc/sysdeps/linux/common/getpriority.c +++ b/libc/sysdeps/linux/common/getpriority.c @@ -17,7 +17,7 @@ static inline _syscall2(int, __syscall_getpriority, /* The return value of __syscall_getpriority is biased by this value * to avoid returning negative values. */ #define PZERO 20 -int getpriority(enum __priority_which which, id_t who) +int attribute_hidden __getpriority(enum __priority_which which, id_t who) { int res; @@ -26,3 +26,4 @@ int getpriority(enum __priority_which which, id_t who) res = PZERO - res; return res; } +strong_alias(__getpriority,getpriority) diff --git a/libc/sysdeps/linux/common/getsid.c b/libc/sysdeps/linux/common/getsid.c index 4bb539cd2..3e9c2d8ba 100644 --- a/libc/sysdeps/linux/common/getsid.c +++ b/libc/sysdeps/linux/common/getsid.c @@ -13,7 +13,8 @@ #define __NR___syscall_getsid __NR_getsid static inline _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid); -pid_t getsid(pid_t pid) +pid_t attribute_hidden __getsid(pid_t pid) { return (__syscall_getsid(pid)); } +strong_alias(__getsid,getsid) diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c index b21f63e08..20f7996a7 100644 --- a/libc/sysdeps/linux/common/nice.c +++ b/libc/sysdeps/linux/common/nice.c @@ -8,6 +8,9 @@ * GNU Library General Public License (LGPL) version 2 or later. */ +#define getpriority __getpriority +#define setpriority __setpriority + #include "syscalls.h" #include <unistd.h> #include <sys/resource.h> diff --git a/libc/sysdeps/linux/common/setegid.c b/libc/sysdeps/linux/common/setegid.c index 100a34568..d3175dad5 100644 --- a/libc/sysdeps/linux/common/setegid.c +++ b/libc/sysdeps/linux/common/setegid.c @@ -1,3 +1,6 @@ +#define setresgid __setresgid +#define setregid __setregid + #define _GNU_SOURCE #include <unistd.h> #include <stdio.h> diff --git a/libc/sysdeps/linux/common/seteuid.c b/libc/sysdeps/linux/common/seteuid.c index e970e0711..f5ed35743 100644 --- a/libc/sysdeps/linux/common/seteuid.c +++ b/libc/sysdeps/linux/common/seteuid.c @@ -1,3 +1,6 @@ +#define setresuid __setresuid +#define setreuid __setreuid + #define _GNU_SOURCE #include <unistd.h> #include <stdio.h> @@ -6,7 +9,7 @@ #include <sys/types.h> #include <sys/syscall.h> -int seteuid(uid_t uid) +int attribute_hidden __seteuid(uid_t uid) { int result; @@ -26,3 +29,4 @@ int seteuid(uid_t uid) return result; } +strong_alias(__seteuid,seteuid) diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c index d92840370..96428edb3 100644 --- a/libc/sysdeps/linux/common/setgroups.c +++ b/libc/sysdeps/linux/common/setgroups.c @@ -17,7 +17,7 @@ static inline _syscall2(int, __syscall_setgroups, size_t, size, const __kernel_gid_t *, list); -int setgroups(size_t n, const gid_t * groups) +int attribute_hidden __setgroups(size_t n, const gid_t * groups) { if (n > (size_t) sysconf(_SC_NGROUPS_MAX)) { __set_errno(EINVAL); @@ -36,3 +36,4 @@ int setgroups(size_t n, const gid_t * groups) return (__syscall_setgroups(n, kernel_groups)); } } +strong_alias(__setgroups,setgroups) diff --git a/libc/sysdeps/linux/common/setpgid.c b/libc/sysdeps/linux/common/setpgid.c index 0373dc3f7..6d73f08ec 100644 --- a/libc/sysdeps/linux/common/setpgid.c +++ b/libc/sysdeps/linux/common/setpgid.c @@ -14,7 +14,8 @@ static inline _syscall2(int, __syscall_setpgid, __kernel_pid_t, pid, __kernel_pid_t, pgid); -int setpgid(pid_t pid, pid_t pgid) +int attribute_hidden __setpgid(pid_t pid, pid_t pgid) { return (__syscall_setpgid(pid, pgid)); } +strong_alias(__setpgid,setpgid) diff --git a/libc/sysdeps/linux/common/setpgrp.c b/libc/sysdeps/linux/common/setpgrp.c index 0fa8fccc3..966bb4da6 100644 --- a/libc/sysdeps/linux/common/setpgrp.c +++ b/libc/sysdeps/linux/common/setpgrp.c @@ -1,3 +1,5 @@ +#define setpgid __setpgid + #include <syscall.h> #include <unistd.h> diff --git a/libc/sysdeps/linux/common/setpriority.c b/libc/sysdeps/linux/common/setpriority.c index 287ea8dd3..06476d88f 100644 --- a/libc/sysdeps/linux/common/setpriority.c +++ b/libc/sysdeps/linux/common/setpriority.c @@ -9,4 +9,6 @@ #include "syscalls.h" #include <sys/resource.h> -_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio); +#define __NR___setpriority __NR_setpriority +attribute_hidden _syscall3(int, __setpriority, __priority_which_t, which, id_t, who, int, prio); +strong_alias(__setpriority,setpriority) diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c index 06c166182..cfd375744 100644 --- a/libc/sysdeps/linux/common/setregid.c +++ b/libc/sysdeps/linux/common/setregid.c @@ -14,7 +14,7 @@ static inline _syscall2(int, __syscall_setregid, __kernel_gid_t, rgid, __kernel_gid_t, egid); -int setregid(gid_t rgid, gid_t egid) +int attribute_hidden __setregid(gid_t rgid, gid_t egid) { if (((rgid + 1) > (gid_t) ((__kernel_gid_t) - 1U)) || ((egid + 1) > (gid_t) ((__kernel_gid_t) - 1U))) { @@ -23,3 +23,4 @@ int setregid(gid_t rgid, gid_t egid) } return (__syscall_setregid(rgid, egid)); } +strong_alias(__setregid,setregid) diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c index 312994583..fbfa98be3 100644 --- a/libc/sysdeps/linux/common/setresgid.c +++ b/libc/sysdeps/linux/common/setresgid.c @@ -14,7 +14,7 @@ static inline _syscall3(int, __syscall_setresgid, __kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid); -int setresgid(gid_t rgid, gid_t egid, gid_t sgid) +int attribute_hidden __setresgid(gid_t rgid, gid_t egid, gid_t sgid) { if (((rgid + 1) > (gid_t) ((__kernel_gid_t) - 1U)) || ((egid + 1) > (gid_t) ((__kernel_gid_t) - 1U)) @@ -24,4 +24,5 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) } return (__syscall_setresgid(rgid, egid, sgid)); } +strong_alias(__setresgid,setresgid) #endif diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c index d979b8968..6ed1423f5 100644 --- a/libc/sysdeps/linux/common/setresuid.c +++ b/libc/sysdeps/linux/common/setresuid.c @@ -14,7 +14,7 @@ static inline _syscall3(int, __syscall_setresuid, __kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid); -int setresuid(uid_t ruid, uid_t euid, uid_t suid) +int attribute_hidden __setresuid(uid_t ruid, uid_t euid, uid_t suid) { if (((ruid + 1) > (uid_t) ((__kernel_uid_t) - 1U)) || ((euid + 1) > (uid_t) ((__kernel_uid_t) - 1U)) @@ -24,4 +24,5 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid) } return (__syscall_setresuid(ruid, euid, suid)); } +strong_alias(__setresuid,setresuid) #endif diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c index 7275c94e9..15ab5c01a 100644 --- a/libc/sysdeps/linux/common/setreuid.c +++ b/libc/sysdeps/linux/common/setreuid.c @@ -14,7 +14,7 @@ static inline _syscall2(int, __syscall_setreuid, __kernel_uid_t, ruid, __kernel_uid_t, euid); -int setreuid(uid_t ruid, uid_t euid) +int attribute_hidden __setreuid(uid_t ruid, uid_t euid) { if (((ruid + 1) > (uid_t) ((__kernel_uid_t) - 1U)) || ((euid + 1) > (uid_t) ((__kernel_uid_t) - 1U))) { @@ -23,3 +23,4 @@ int setreuid(uid_t ruid, uid_t euid) } return (__syscall_setreuid(ruid, euid)); } +strong_alias(__setreuid,setreuid) diff --git a/libc/sysdeps/linux/common/setsid.c b/libc/sysdeps/linux/common/setsid.c index 0e2e2a31e..b3e1e8706 100644 --- a/libc/sysdeps/linux/common/setsid.c +++ b/libc/sysdeps/linux/common/setsid.c @@ -9,4 +9,6 @@ #include "syscalls.h" #include <unistd.h> -_syscall0(pid_t, setsid); +#define __NR___setsid __NR_setsid +attribute_hidden _syscall0(pid_t, __setsid); +strong_alias(__setsid,setsid) diff --git a/libc/sysdeps/linux/common/uname.c b/libc/sysdeps/linux/common/uname.c index b3c93e0af..3d252edc7 100644 --- a/libc/sysdeps/linux/common/uname.c +++ b/libc/sysdeps/linux/common/uname.c @@ -9,4 +9,6 @@ #include "syscalls.h" #include <sys/utsname.h> -_syscall1(int, uname, struct utsname *, buf); +#define __NR___uname __NR_uname +attribute_hidden _syscall1(int, __uname, struct utsname *, buf); +strong_alias(__uname,uname) |