5#include <QtCore/private/qglobal_p.h>
12# include <sys/syscall.h>
18#include <mach/mach_time.h>
27# define PATH_MAX 1024*1024
33 while (
len ==
buf.size()) {
41 buf.resize(
buf.size() * 2);
52#if defined(Q_PROCESSOR_X86_32) && defined(__GLIBC__)
53# if !__GLIBC_PREREQ(2, 22)
59int qt_open64(
const char *pathname,
int flags, mode_t
mode)
61 return syscall(SYS_open, pathname,
flags | O_LARGEFILE,
mode);
66#ifndef QT_BOOTSTRAPPED
71 clockid_t clk = CLOCK_REALTIME;
72#if defined(CLOCK_MONOTONIC_RAW)
73 clk = CLOCK_MONOTONIC_RAW;
74#elif defined(CLOCK_MONOTONIC)
75 clk = CLOCK_MONOTONIC;
78 clock_gettime(clk, &ts);
96#if QT_CONFIG(poll_pollts)
101 const struct timespec &
timeout)
107 return tv->tv_sec >= 0;
110#if QT_CONFIG(poll_poll)
111static inline int timespecToMillisecs(
const struct timespec *ts)
113 return (ts == NULL) ? -1 :
114 (ts->tv_sec * 1000) + (ts->tv_nsec / 1000000);
119int qt_poll(
struct pollfd *
fds, nfds_t nfds,
const struct timespec *timeout_ts);
121static inline int qt_ppoll(
struct pollfd *
fds, nfds_t nfds,
const struct timespec *timeout_ts)
123#if QT_CONFIG(poll_ppoll) || QT_CONFIG(poll_pollts)
124 return ::ppoll(
fds, nfds, timeout_ts,
nullptr);
125#elif QT_CONFIG(poll_poll)
126 return ::poll(
fds, nfds, timespecToMillisecs(timeout_ts));
127#elif QT_CONFIG(poll_select)
152 timespec
timeout = *timeout_ts;
157 if (
ret != -1 || errno != EINTR)
EGLint EGLint EGLint EGLint int int int int * fds
Combined button and popup list for selecting options.
constexpr Initialization Uninitialized
int qt_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
QT_BEGIN_NAMESPACE QByteArray qt_readlink(const char *path)
static void do_gettime(qint64 *sec, qint64 *frac)
struct timespec qt_gettime() noexcept
static int qt_ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
int qt_safe_poll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts)
static bool time_update(struct timespec *tv, const struct timespec &start, const struct timespec &timeout)
#define EINTR_LOOP(var, cmd)
GLbitfield GLuint64 timeout
[4]
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei const GLchar *const * path