add most files

This commit is contained in:
2025-06-10 12:11:08 +02:00
parent 36217e809e
commit fceffa933c
19 changed files with 2787 additions and 0 deletions

24
uselect.c Normal file
View File

@ -0,0 +1,24 @@
#include <signal.h>
#include <errno.h>
#include <stddef.h>
#include "uselect.h"
/* an uninterruptable version of select. M.Z. Oct 2008 */
int uselect(int nfds,
fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout) {
sigset_t sigmask;
struct timespec tmo, *tmoPtr;
sigfillset(&sigmask);
if (timeout) {
tmo.tv_sec = timeout->tv_sec;
tmo.tv_nsec = timeout->tv_usec * 1000;
tmoPtr = &tmo;
} else {
tmoPtr = NULL;
}
return pselect(nfds, readfds, writefds, exceptfds, tmoPtr, &sigmask);
}