46 #elif !defined (Q_OS_VXWORKS) 47 # if !defined(Q_OS_HPUX) || defined(__ia64) 48 # include <sys/select.h> 50 # include <sys/time.h> 52 # include <selectLib.h> 58 #include <mach/mach_time.h> 63 static inline bool time_update(
struct timeval *tv,
const struct timeval &start,
64 const struct timeval &timeout)
69 *tv = timeout + start - now;
70 return tv->tv_sec >= 0;
73 int qt_safe_select(
int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
74 const struct timeval *orig_timeout)
84 timeval timeout = *orig_timeout;
89 ret =
::select(nfds, fdread, fdwrite, fdexcept, &timeout);
90 if (ret != -1 ||
errno != EINTR)
#define QT_END_NAMESPACE
This macro expands to.
#define EINTR_LOOP(var, cmd)
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
#define QT_BEGIN_NAMESPACE
This macro expands to.
int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept, const struct timeval *orig_timeout)
static bool time_update(struct timeval *tv, const struct timeval &start, const struct timeval &timeout)
#define forever
This macro is provided for convenience for writing infinite loops.