* libguile/iselect.h: If we do not have sys/select.h, don't provide
scm_std_select, SELECT_TYPE, FD_SET, FD_ZERO, FD_ISSET, or FD_CLR.
Guile should not be setting these macros in public API. This is an
incompatible change on mingw, but oh well.
* libguile/threads.c: Rely on gnulib's select, and use that to implement
scm_std_select.
* libguile/deprecated.h:
* libguile/deprecated.c: Only provide scm_internal_select if we have
sys/select.h.
Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
interrupts masked, we can't use the old mechanism of delivering
signals immediately when they arrive. Signals must instead be
delivered when the asyncs run *after* the end of the critical
section in scm_internal_select. But this also means after context
switch so that the signal will be delivered to a different thread.
To avoid this, I have changed the protocol of
coop_wait_for_runnable_thread and friends so that they are allowed
to return the original thread. So, if a signal arrives during
scm_internal_select, we won't any longer be forced do a context
switch, but can remain in the same thread and deliver the signal
to it.
* iselect.c: Small fixes.