From f4256c083607375714dc4bde0e9c09d18265d90a Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Thu, 8 Dec 2005 19:33:35 +0000 Subject: Implement more hidden --- libc/sysdeps/linux/common/alarm.c | 6 ++++-- libc/sysdeps/linux/common/poll.c | 1 + libc/sysdeps/linux/common/select.c | 19 +++++-------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/libc/sysdeps/linux/common/alarm.c b/libc/sysdeps/linux/common/alarm.c index eec941d07..8239cec5b 100644 --- a/libc/sysdeps/linux/common/alarm.c +++ b/libc/sysdeps/linux/common/alarm.c @@ -12,10 +12,11 @@ #include "syscalls.h" #include #ifdef __NR_alarm -_syscall1(unsigned int, alarm, unsigned int, seconds); +#define __NR___alarm __NR_alarm +attribute_hidden _syscall1(unsigned int, __alarm, unsigned int, seconds); #else #include -unsigned int alarm(unsigned int seconds) +unsigned int attribute_hidden __alarm(unsigned int seconds) { struct itimerval old, new; unsigned int retval; @@ -34,3 +35,4 @@ unsigned int alarm(unsigned int seconds) return retval; } #endif +strong_alias(__alarm,alarm) diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c index f021e0269..bbe30eed7 100644 --- a/libc/sysdeps/linux/common/poll.c +++ b/libc/sysdeps/linux/common/poll.c @@ -18,6 +18,7 @@ 02111-1307 USA. */ #define getdtablesize __getdtablesize +#define select __select #include "syscalls.h" #include diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c index 2c35c32fc..36f88229a 100644 --- a/libc/sysdeps/linux/common/select.c +++ b/libc/sysdeps/linux/common/select.c @@ -11,19 +11,10 @@ #include #ifdef __NR__newselect - -extern int _newselect(int n, fd_set * readfds, fd_set * writefds, - fd_set * exceptfds, struct timeval *timeout); -_syscall5(int, _newselect, int, n, fd_set *, readfds, fd_set *, writefds, - fd_set *, exceptfds, struct timeval *, timeout); -weak_alias(_newselect, select); - +#define __NR___select __NR__newselect #else - -//Used as a fallback if _newselect isn't available... -extern int select(int n, fd_set * readfds, fd_set * writefds, - fd_set * exceptfds, struct timeval *timeout); -_syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds, - fd_set *, exceptfds, struct timeval *, timeout); - +#define __NR___select __NR_select #endif +attribute_hidden _syscall5(int, __select, int, n, fd_set *, readfds, fd_set *, writefds, + fd_set *, exceptfds, struct timeval *, timeout); +strong_alias(__select,select) -- cgit v1.2.3