summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/__rt_sigtimedwait.c15
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl.c25
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl64.c11
-rw-r--r--libc/sysdeps/linux/common/_exit.c7
-rw-r--r--libc/sysdeps/linux/common/adjtimex.c9
-rw-r--r--libc/sysdeps/linux/common/alarm.c12
-rw-r--r--libc/sysdeps/linux/common/chdir.c5
-rw-r--r--libc/sysdeps/linux/common/chmod.c5
-rw-r--r--libc/sysdeps/linux/common/clock_getres.c4
-rw-r--r--libc/sysdeps/linux/common/clock_gettime.c4
-rw-r--r--libc/sysdeps/linux/common/clock_settime.c4
-rw-r--r--libc/sysdeps/linux/common/close.c9
-rw-r--r--libc/sysdeps/linux/common/cmsg_nxthdr.c7
-rw-r--r--libc/sysdeps/linux/common/creat64.c4
-rw-r--r--libc/sysdeps/linux/common/dl-osinfo.h13
-rw-r--r--libc/sysdeps/linux/common/dup2.c6
-rw-r--r--libc/sysdeps/linux/common/execve.c5
-rw-r--r--libc/sysdeps/linux/common/fchdir.c6
-rw-r--r--libc/sysdeps/linux/common/fork.c9
-rw-r--r--libc/sysdeps/linux/common/fstat.c13
-rw-r--r--libc/sysdeps/linux/common/fstat64.c6
-rw-r--r--libc/sysdeps/linux/common/fstatfs.c6
-rw-r--r--libc/sysdeps/linux/common/fsync.c2
-rw-r--r--libc/sysdeps/linux/common/ftruncate.c3
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c4
-rw-r--r--libc/sysdeps/linux/common/getcwd.c50
-rw-r--r--libc/sysdeps/linux/common/getdents.c7
-rw-r--r--libc/sysdeps/linux/common/getdents64.c7
-rw-r--r--libc/sysdeps/linux/common/getdirname.c20
-rw-r--r--libc/sysdeps/linux/common/getdnnm.c20
-rw-r--r--libc/sysdeps/linux/common/getdtablesize.c9
-rw-r--r--libc/sysdeps/linux/common/getegid.c11
-rw-r--r--libc/sysdeps/linux/common/geteuid.c11
-rw-r--r--libc/sysdeps/linux/common/getgid.c5
-rw-r--r--libc/sysdeps/linux/common/getgroups.c9
-rw-r--r--libc/sysdeps/linux/common/gethstnm.c21
-rw-r--r--libc/sysdeps/linux/common/getpagesize.c16
-rw-r--r--libc/sysdeps/linux/common/getpgid.c3
-rw-r--r--libc/sysdeps/linux/common/getpid.c12
-rw-r--r--libc/sysdeps/linux/common/getpriority.c5
-rw-r--r--libc/sysdeps/linux/common/getrlimit.c7
-rw-r--r--libc/sysdeps/linux/common/getrlimit64.c4
-rw-r--r--libc/sysdeps/linux/common/getsid.c5
-rw-r--r--libc/sysdeps/linux/common/gettimeofday.c6
-rw-r--r--libc/sysdeps/linux/common/getuid.c5
-rw-r--r--libc/sysdeps/linux/common/ioctl.c6
-rw-r--r--libc/sysdeps/linux/common/kill.c5
-rw-r--r--libc/sysdeps/linux/common/llseek.c18
-rw-r--r--libc/sysdeps/linux/common/longjmp.c13
-rw-r--r--libc/sysdeps/linux/common/lseek.c14
-rw-r--r--libc/sysdeps/linux/common/lstat.c13
-rw-r--r--libc/sysdeps/linux/common/lstat64.c6
-rw-r--r--libc/sysdeps/linux/common/mkdir.c5
-rw-r--r--libc/sysdeps/linux/common/mkfifo.c4
-rw-r--r--libc/sysdeps/linux/common/mknod.c5
-rw-r--r--libc/sysdeps/linux/common/mmap.c5
-rw-r--r--libc/sysdeps/linux/common/mmap64.c5
-rw-r--r--libc/sysdeps/linux/common/modify_ldt.c2
-rw-r--r--libc/sysdeps/linux/common/mremap.c6
-rw-r--r--libc/sysdeps/linux/common/msync.c2
-rw-r--r--libc/sysdeps/linux/common/munmap.c6
-rw-r--r--libc/sysdeps/linux/common/nanosleep.c5
-rw-r--r--libc/sysdeps/linux/common/nice.c7
-rw-r--r--libc/sysdeps/linux/common/ntp_gettime.c6
-rw-r--r--libc/sysdeps/linux/common/open.c14
-rw-r--r--libc/sysdeps/linux/common/open64.c14
-rw-r--r--libc/sysdeps/linux/common/pause.c8
-rw-r--r--libc/sysdeps/linux/common/pipe.c6
-rw-r--r--libc/sysdeps/linux/common/poll.c46
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c6
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise64.c2
-rw-r--r--libc/sysdeps/linux/common/pread_write.c35
-rw-r--r--libc/sysdeps/linux/common/read.c9
-rw-r--r--libc/sysdeps/linux/common/readlink.c6
-rw-r--r--libc/sysdeps/linux/common/rmdir.c6
-rw-r--r--libc/sysdeps/linux/common/sbrk.c12
-rw-r--r--libc/sysdeps/linux/common/select.c10
-rw-r--r--libc/sysdeps/linux/common/setegid.c10
-rw-r--r--libc/sysdeps/linux/common/seteuid.c14
-rw-r--r--libc/sysdeps/linux/common/setgroups.c9
-rw-r--r--libc/sysdeps/linux/common/setitimer.c6
-rw-r--r--libc/sysdeps/linux/common/setpgid.c5
-rw-r--r--libc/sysdeps/linux/common/setpgrp.c8
-rw-r--r--libc/sysdeps/linux/common/setpriority.c6
-rw-r--r--libc/sysdeps/linux/common/setregid.c4
-rw-r--r--libc/sysdeps/linux/common/setresgid.c5
-rw-r--r--libc/sysdeps/linux/common/setresuid.c5
-rw-r--r--libc/sysdeps/linux/common/setreuid.c5
-rw-r--r--libc/sysdeps/linux/common/setrlimit.c8
-rw-r--r--libc/sysdeps/linux/common/setrlimit64.c4
-rw-r--r--libc/sysdeps/linux/common/setsid.c6
-rw-r--r--libc/sysdeps/linux/common/settimeofday.c6
-rw-r--r--libc/sysdeps/linux/common/sigprocmask.c7
-rw-r--r--libc/sysdeps/linux/common/sigsuspend.c7
-rw-r--r--libc/sysdeps/linux/common/ssp.c38
-rw-r--r--libc/sysdeps/linux/common/stat.c13
-rw-r--r--libc/sysdeps/linux/common/stat64.c6
-rw-r--r--libc/sysdeps/linux/common/statfs.c5
-rw-r--r--libc/sysdeps/linux/common/time.c12
-rw-r--r--libc/sysdeps/linux/common/times.c6
-rw-r--r--libc/sysdeps/linux/common/truncate.c3
-rw-r--r--libc/sysdeps/linux/common/truncate64.c5
-rw-r--r--libc/sysdeps/linux/common/ulimit.c8
-rw-r--r--libc/sysdeps/linux/common/uname.c6
-rw-r--r--libc/sysdeps/linux/common/unlink.c6
-rw-r--r--libc/sysdeps/linux/common/utime.c15
-rw-r--r--libc/sysdeps/linux/common/utimes.c13
-rw-r--r--libc/sysdeps/linux/common/vfork.c9
-rw-r--r--libc/sysdeps/linux/common/wait.c14
-rw-r--r--libc/sysdeps/linux/common/wait3.c7
-rw-r--r--libc/sysdeps/linux/common/wait4.c5
-rw-r--r--libc/sysdeps/linux/common/waitpid.c17
-rw-r--r--libc/sysdeps/linux/common/write.c11
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/