Initial revision

git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5086 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
1999-09-08 23:56:51 +00:00
commit 03272d67da
623 changed files with 243457 additions and 0 deletions

23
lib/select.c Normal file
View File

@@ -0,0 +1,23 @@
/* select.c - bsd-games emulation of BSD select for games that need it */
/* This uses __select, which works with libc5 and libc6. This is a
* substitute for the version in libbsd from libc5, and is essentially
* equivalent. */
#include <sys/time.h>
int
select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout)
{
struct timeval timeout_copy;
struct timeval *timeout_ptr;
if (timeout) {
/* Copy to a temporary */
timeout_copy = *timeout;
timeout_ptr = &timeout_copy;
} else {
timeout_ptr = timeout;
}
return __select(nfds, readfds, writefds, exceptfds, timeout_ptr);
}