diff options
Diffstat (limited to 'libc/sysdeps/linux/common')
113 files changed, 593 insertions, 455 deletions
diff --git a/libc/sysdeps/linux/common/__rt_sigtimedwait.c b/libc/sysdeps/linux/common/__rt_sigtimedwait.c index 09409fe81..43c6b6517 100644 --- a/libc/sysdeps/linux/common/__rt_sigtimedwait.c +++ b/libc/sysdeps/linux/common/__rt_sigtimedwait.c @@ -16,18 +16,18 @@ static _syscall4(int, __rt_sigtimedwait, const sigset_t *, set, siginfo_t *, info, const struct timespec *, timeout, size_t, setsize); -int attribute_hidden __sigwaitinfo(const sigset_t * set, siginfo_t * info) +int sigwaitinfo(const sigset_t * set, siginfo_t * info) { return __rt_sigtimedwait(set, info, NULL, _NSIG / 8); } -int attribute_hidden __sigtimedwait(const sigset_t * set, siginfo_t * info, +int sigtimedwait(const sigset_t * set, siginfo_t * info, const struct timespec *timeout) { return __rt_sigtimedwait(set, info, timeout, _NSIG / 8); } #else -int attribute_hidden __sigwaitinfo(const sigset_t * set, siginfo_t * info) +int sigwaitinfo(const sigset_t * set, siginfo_t * info) { if (set == NULL) __set_errno(EINVAL); @@ -36,7 +36,7 @@ int attribute_hidden __sigwaitinfo(const sigset_t * set, siginfo_t * info) return -1; } -int attribute_hidden __sigtimedwait(const sigset_t * set, siginfo_t * info, +int sigtimedwait(const sigset_t * set, siginfo_t * info, const struct timespec *timeout) { if (set == NULL) @@ -46,6 +46,7 @@ int attribute_hidden __sigtimedwait(const sigset_t * set, siginfo_t * info, return -1; } #endif -/* keep these weak so that libpthread can overwrite them */ -weak_alias(__sigtimedwait,sigtimedwait) -weak_alias(__sigwaitinfo,sigwaitinfo) +libc_hidden_proto(sigwaitinfo) +libc_hidden_def(sigwaitinfo) +libc_hidden_proto(sigtimedwait) +libc_hidden_def(sigtimedwait) diff --git a/libc/sysdeps/linux/common/__syscall_fcntl.c b/libc/sysdeps/linux/common/__syscall_fcntl.c index ca9aff5e7..f8652def6 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl.c @@ -11,18 +11,16 @@ #include <stdarg.h> #include <fcntl.h> -#undef __fcntl - #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64 -extern int __fcntl64(int fd, int cmd, ...) attribute_hidden; +extern int __libc_fcntl64(int fd, int cmd, ...); +libc_hidden_proto(__libc_fcntl64) #endif -#undef fcntl #define __NR___syscall_fcntl __NR_fcntl static inline _syscall3(int, __syscall_fcntl, int, fd, int, cmd, long, arg); -int attribute_hidden __fcntl(int fd, int cmd, ...) +int __libc_fcntl(int fd, int cmd, ...) { long arg; va_list list; @@ -33,7 +31,7 @@ int attribute_hidden __fcntl(int fd, int cmd, ...) if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) { #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64 - return __fcntl64(fd, cmd, arg); + return __libc_fcntl64(fd, cmd, arg); #else __set_errno(ENOSYS); return -1; @@ -41,10 +39,15 @@ int attribute_hidden __fcntl(int fd, int cmd, ...) } return (__syscall_fcntl(fd, cmd, arg)); } -strong_alias(__fcntl,fcntl) -weak_alias(__fcntl,__libc_fcntl) +libc_hidden_proto(__libc_fcntl) +libc_hidden_def(__libc_fcntl) + +strong_alias(__libc_fcntl,fcntl) +libc_hidden_proto(fcntl) +libc_hidden_def(fcntl) #if ! defined __NR_fcntl64 && defined __UCLIBC_HAS_LFS__ -hidden_strong_alias(__fcntl,__fcntl64) -weak_alias(__fcntl,fcntl64) -weak_alias(__fcntl,__libc_fcntl64) +strong_alias(__libc_fcntl,__libc_fcntl64) +strong_alias(__libc_fcntl,fcntl64) +libc_hidden_proto(fcntl64) +libc_hidden_def(fcntl64) #endif diff --git a/libc/sysdeps/linux/common/__syscall_fcntl64.c b/libc/sysdeps/linux/common/__syscall_fcntl64.c index 9231808e3..759ba949f 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl64.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl64.c @@ -12,10 +12,9 @@ #include <fcntl.h> #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64 -#undef fcntl64 #define __NR___syscall_fcntl64 __NR_fcntl64 static inline _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg); -int attribute_hidden __fcntl64(int fd, int cmd, ...) +int __libc_fcntl64(int fd, int cmd, ...) { long arg; va_list list; @@ -26,6 +25,10 @@ int attribute_hidden __fcntl64(int fd, int cmd, ...) va_end(list); return (__syscall_fcntl64(fd, cmd, arg)); } -strong_alias(__fcntl64,fcntl64) -weak_alias(__fcntl64,__libc_fcntl64) +libc_hidden_proto(__libc_fcntl64) +libc_hidden_def(__libc_fcntl64) + +strong_alias(__libc_fcntl64,fcntl64) +libc_hidden_proto(fcntl64) +libc_hidden_def(fcntl64) #endif diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c index 4e450bbc5..a708fad90 100644 --- a/libc/sysdeps/linux/common/_exit.c +++ b/ |