summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/poll.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/sysdeps/linux/common/poll.c
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/sysdeps/linux/common/poll.c')
-rw-r--r--libc/sysdeps/linux/common/poll.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index c957f1edf..c76df966f 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -17,15 +17,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define getdtablesize __getdtablesize
-#define select __select
-
#include "syscalls.h"
#include <sys/poll.h>
#ifdef __NR_poll
-#define __NR___poll __NR_poll
-attribute_hidden _syscall3(int, __poll, struct pollfd *, fds,
+_syscall3(int, poll, struct pollfd *, fds,
unsigned long int, nfds, int, timeout);
#else
@@ -37,6 +33,11 @@ attribute_hidden _syscall3(int, __poll, struct pollfd *, fds,
#include <sys/param.h>
#include <unistd.h>
+libc_hidden_proto(memcpy)
+libc_hidden_proto(memset)
+libc_hidden_proto(getdtablesize)
+libc_hidden_proto(select)
+
/* uClinux 2.0 doesn't have poll, emulate it using select */
/* Poll the file descriptors described by the NFDS structures starting at
@@ -45,7 +46,7 @@ attribute_hidden _syscall3(int, __poll, struct pollfd *, fds,
Returns the number of file descriptors with events, zero if timed out,
or -1 for errors. */
-int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
+int poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
static int max_fd_size;
struct timeval tv;
@@ -65,9 +66,9 @@ int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
/* We can't call FD_ZERO, since FD_ZERO only works with sets
of exactly __FD_SETSIZE size. */
- __memset (rset, 0, bytes);
- __memset (wset, 0, bytes);
- __memset (xset, 0, bytes);
+ memset (rset, 0, bytes);
+ memset (wset, 0, bytes);
+ memset (xset, 0, bytes);
for (f = fds; f < &fds[nfds]; ++f)
{
@@ -89,13 +90,13 @@ int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
nwset = alloca (nbytes);
nxset = alloca (nbytes);
- __memset ((char *) nrset + bytes, 0, nbytes - bytes);
- __memset ((char *) nwset + bytes, 0, nbytes - bytes);
- __memset ((char *) nxset + bytes, 0, nbytes - bytes);
+ memset ((char *) nrset + bytes, 0, nbytes - bytes);
+ memset ((char *) nwset + bytes, 0, nbytes - bytes);
+ memset ((char *) nxset + bytes, 0, nbytes - bytes);
- rset = __memcpy (nrset, rset, bytes);
- wset = __memcpy (nwset, wset, bytes);
- xset = __memcpy (nxset, xset, bytes);
+ rset = memcpy (nrset, rset, bytes);
+ wset = memcpy (nwset, wset, bytes);
+ xset = memcpy (nxset, xset, bytes);
bytes = nbytes;
}
@@ -129,9 +130,9 @@ int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
struct timeval sngl_tv;
/* Clear the original set. */
- __memset (rset, 0, bytes);
- __memset (wset, 0, bytes);
- __memset (xset, 0, bytes);
+ memset (rset, 0, bytes);
+ memset (wset, 0, bytes);
+ memset (xset, 0, bytes);
/* This means we don't wait for input. */
sngl_tv.tv_sec = 0;
@@ -148,9 +149,9 @@ int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
int n;
- __memset (sngl_rset, 0, bytes);
- __memset (sngl_wset, 0, bytes);
- __memset (sngl_xset, 0, bytes);
+ memset (sngl_rset, 0, bytes);
+ memset (sngl_wset, 0, bytes);
+ memset (sngl_xset, 0, bytes);
if (f->events & POLLIN)
FD_SET (f->fd, sngl_rset);
@@ -204,4 +205,5 @@ int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
}
#endif
-strong_alias(__poll,poll)
+libc_hidden_proto(poll)
+libc_hidden_def(poll)