summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-23 23:25:34 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-23 23:25:34 +0000
commitb4a09d83d1568672b94fe91b678194409983b824 (patch)
tree89e0bc03c51c7158e5222801600935456ac328d6 /libc/sysdeps/linux
parentaabaf1b78632327a9549b6901074565f4c54d95b (diff)
psm updates: add __libc symbols for signal cancellation
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/creat64.c9
-rw-r--r--libc/sysdeps/linux/common/ioctl.c2
-rw-r--r--libc/sysdeps/linux/common/open.c6
-rw-r--r--libc/sysdeps/linux/common/open64.c3
-rw-r--r--libc/sysdeps/linux/common/poll.c11
-rw-r--r--libc/sysdeps/linux/common/pselect.c5
-rw-r--r--libc/sysdeps/linux/common/readv.c7
-rw-r--r--libc/sysdeps/linux/common/select.c13
-rw-r--r--libc/sysdeps/linux/common/sigsuspend.c11
-rw-r--r--libc/sysdeps/linux/common/writev.c7
10 files changed, 51 insertions, 23 deletions
diff --git a/libc/sysdeps/linux/common/creat64.c b/libc/sysdeps/linux/common/creat64.c
index c1f250832..f5f00182c 100644
--- a/libc/sysdeps/linux/common/creat64.c
+++ b/libc/sysdeps/linux/common/creat64.c
@@ -22,11 +22,14 @@
#include <fcntl.h>
#include <sys/types.h>
-libc_hidden_proto(open64)
+extern __typeof(open64) __libc_open64;
+libc_hidden_proto(__libc_open64)
+extern __typeof(creat64) __libc_creat64;
/* Create FILE with protections MODE. */
-int creat64 (const char *file, mode_t mode)
+int __libc_creat64 (const char *file, mode_t mode)
{
- return open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
+ return __libc_open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
+weak_alias(__libc_creat64,creat64)
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
index e8e3a1031..e4e710a71 100644
--- a/libc/sysdeps/linux/common/ioctl.c
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -15,7 +15,7 @@ libc_hidden_proto(ioctl)
#define __NR___syscall_ioctl __NR_ioctl
static inline
-_syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
+_syscall3(int, __syscall_ioctl, int, fd, int, request, void *, arg);
int ioctl(int fd, unsigned long int request, ...)
{
diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c
index 822ac4f63..580876a26 100644
--- a/libc/sysdeps/linux/common/open.c
+++ b/libc/sysdeps/linux/common/open.c
@@ -15,12 +15,13 @@
#include <sys/param.h>
extern __typeof(open) __libc_open;
-libc_hidden_proto(__libc_open)
+extern __typeof(creat) __libc_creat;
#define __NR___syscall_open __NR_open
static inline _syscall3(int, __syscall_open, const char *, file,
int, flags, __kernel_mode_t, mode);
+libc_hidden_proto(__libc_open)
int __libc_open(const char *file, int flags, ...)
{
/* gcc may warn about mode being uninitialized.
@@ -42,7 +43,8 @@ libc_hidden_proto(open)
weak_alias(__libc_open,open)
libc_hidden_weak(open)
-int creat(const char *file, mode_t mode)
+int __libc_creat(const char *file, mode_t mode)
{
return __libc_open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
}
+weak_alias(__libc_creat,creat)
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index 81480f88e..93a27e9bd 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -20,6 +20,7 @@ libc_hidden_proto(__libc_open)
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
+libc_hidden_proto(__libc_open64)
int __libc_open64 (const char *file, int oflag, ...)
{
int mode = 0;
@@ -34,6 +35,8 @@ int __libc_open64 (const char *file, int oflag, ...)
return __libc_open(file, oflag | O_LARGEFILE, mode);
}
+libc_hidden_def(__libc_open64)
+
libc_hidden_proto(open64)
weak_alias(__libc_open64,open64)
libc_hidden_weak(open64)
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index 00fd70816..2512dc4da 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -20,10 +20,11 @@
#include "syscalls.h"
#include <sys/poll.h>
-libc_hidden_proto(poll)
+extern __typeof(poll) __libc_poll;
#ifdef __NR_poll
-_syscall3(int, poll, struct pollfd *, fds,
+# define __NR___libc_poll __NR_poll
+_syscall3(int, __libc_poll, struct pollfd *, fds,
unsigned long int, nfds, int, timeout);
#else
@@ -48,7 +49,7 @@ libc_hidden_proto(select)
Returns the number of file descriptors with events, zero if timed out,
or -1 for errors. */
-int poll(struct pollfd *fds, nfds_t nfds, int timeout)
+int __libc_poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
static int max_fd_size;
struct timeval tv;
@@ -207,4 +208,6 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
}
#endif
-libc_hidden_def(poll)
+libc_hidden_proto(poll)
+weak_alias(__libc_poll,poll)
+libc_hidden_weak(poll)
diff --git a/libc/sysdeps/linux/common/pselect.c b/libc/sysdeps/linux/common/pselect.c
index 93a85a622..3a958fcfc 100644
--- a/libc/sysdeps/linux/common/pselect.c
+++ b/libc/sysdeps/linux/common/pselect.c
@@ -23,6 +23,8 @@
#include <sys/time.h>
#include <sys/select.h>
+extern __typeof(pselect) __libc_pselect;
+
libc_hidden_proto(sigprocmask)
libc_hidden_proto(select)
@@ -34,7 +36,7 @@ libc_hidden_proto(select)
SIGMASK for this call. Returns the number of ready descriptors, or -1 for
errors. */
int
-pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+__libc_pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
const struct timespec *timeout, const sigset_t *sigmask)
{
struct timeval tval;
@@ -64,3 +66,4 @@ pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
return retval;
}
+weak_alias(__libc_pselect,pselect)
diff --git a/libc/sysdeps/linux/common/readv.c b/libc/sysdeps/linux/common/readv.c
index 040e61266..20226f39c 100644
--- a/libc/sysdeps/linux/common/readv.c
+++ b/libc/sysdeps/linux/common/readv.c
@@ -9,5 +9,10 @@
#include "syscalls.h"
#include <sys/uio.h>
-_syscall3(ssize_t, readv, int, filedes, const struct iovec *, vector,
+
+extern __typeof(readv) __libc_readv;
+
+#define __NR___libc_readv __NR_readv
+_syscall3(ssize_t, __libc_readv, int, filedes, const struct iovec *, vector,
int, count);
+weak_alias(__libc_readv,readv)
diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c
index 9a50d198a..db038107a 100644
--- a/libc/sysdeps/linux/common/select.c
+++ b/libc/sysdeps/linux/common/select.c
@@ -10,12 +10,15 @@
#include "syscalls.h"
#include <sys/select.h>
-libc_hidden_proto(select)
+extern __typeof(select) __libc_select;
#ifdef __NR__newselect
-# undef __NR_select
-# define __NR_select __NR__newselect
+# define __NR___libc_select __NR__newselect
+#else
+# define __NR___libc_select __NR_select
#endif
-_syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds,
+_syscall5(int, __libc_select, int, n, fd_set *, readfds, fd_set *, writefds,
fd_set *, exceptfds, struct timeval *, timeout);
-libc_hidden_def(select)
+libc_hidden_proto(select)
+weak_alias(__libc_select,select)
+libc_hidden_weak(select)
diff --git a/libc/sysdeps/linux/common/sigsuspend.c b/libc/sysdeps/linux/common/sigsuspend.c
index 7bc3a59c1..87054e8e0 100644
--- a/libc/sysdeps/linux/common/sigsuspend.c
+++ b/libc/sysdeps/linux/common/sigsuspend.c
@@ -9,15 +9,14 @@
#include "syscalls.h"
#include <signal.h>
-#undef sigsuspend
-libc_hidden_proto(sigsuspend)
+extern __typeof(sigsuspend) __libc_sigsuspend;
#ifdef __NR_rt_sigsuspend
# define __NR___rt_sigsuspend __NR_rt_sigsuspend
static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
-int sigsuspend(const sigset_t * mask)
+int __libc_sigsuspend(const sigset_t * mask)
{
return __rt_sigsuspend(mask, _NSIG / 8);
}
@@ -26,9 +25,11 @@ int sigsuspend(const sigset_t * mask)
static inline _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
unsigned long int, c);
-int sigsuspend(const sigset_t * set)
+int __libc_sigsuspend(const sigset_t * set)
{
return __syscall_sigsuspend(0, 0, set->__val[0]);
}
#endif
-libc_hidden_def(sigsuspend)
+libc_hidden_proto(sigsuspend)
+weak_alias(__libc_sigsuspend,sigsuspend)
+libc_hidden_weak(sigsuspend)
diff --git a/libc/sysdeps/linux/common/writev.c b/libc/sysdeps/linux/common/writev.c
index 4efff02fb..4ea9395f4 100644
--- a/libc/sysdeps/linux/common/writev.c
+++ b/libc/sysdeps/linux/common/writev.c
@@ -9,5 +9,10 @@
#include "syscalls.h"
#include <sys/uio.h>
-_syscall3(ssize_t, writev, int, filedes, const struct iovec *, vector,
+
+extern __typeof(writev) __libc_writev;
+
+#define __NR___libc_writev __NR_writev
+_syscall3(ssize_t, __libc_writev, int, filedes, const struct iovec *, vector,
int, count);
+weak_alias(__libc_writev,writev)