}
#endif
+/* HAVE_GLIB builds call thread_select in xgselect.c. */
+#ifdef HAVE_GLIB
+ nfds = xg_select (max_desc + 1,
+ &Available, (check_write ? &Writeok : 0),
+ NULL, &timeout, NULL);
+#else /* !HAVE_GLIB */
nfds = thread_select (
-#if defined (HAVE_NS)
+# ifdef HAVE_NS
ns_select
-#elif defined (HAVE_GLIB)
- xg_select
-#else
+# else
pselect
-#endif
+# endif
, max_desc + 1,
&Available,
(check_write ? &Writeok : 0),
NULL, &timeout, NULL);
+#endif /* !HAVE_GLIB */
#ifdef HAVE_GNUTLS
/* GnuTLS buffers data internally. In lowat mode it leaves
#include <glib.h>
#include <errno.h>
+#include "lisp.h"
#include "blockinput.h"
#include "systime.h"
int
xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
- struct timespec const *timeout, sigset_t const *sigmask)
+ struct timespec *timeout, sigset_t *sigmask)
{
fd_set all_rfds, all_wfds;
struct timespec tmo;
- struct timespec const *tmop = timeout;
+ struct timespec *tmop = timeout;
GMainContext *context;
bool have_wfds = wfds != NULL;
}
fds_lim = max_fds + 1;
- nfds = pselect (fds_lim, &all_rfds, have_wfds ? &all_wfds : NULL,
- efds, tmop, sigmask);
-
+ nfds = thread_select (pselect, fds_lim,
+ &all_rfds, have_wfds ? &all_wfds : NULL, efds,
+ tmop, sigmask);
if (nfds < 0)
retval = nfds;
else if (nfds > 0)
extern int xg_select (int max_fds,
fd_set *rfds, fd_set *wfds, fd_set *efds,
- struct timespec const *timeout,
- sigset_t const *sigmask);
+ struct timespec *timeout, sigset_t *sigmask);
#endif /* XGSELECT_H */