diff options
author | Andy Wingo <wingo@pobox.com> | 2013-03-09 22:45:33 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-03-09 22:45:33 +0100 |
commit | 6ab4de612510b7c8668f0b50388258392f25b157 (patch) | |
tree | 28dd2f712440880cbbb28361cfebf82a6b7468b8 /libguile/threads.c | |
parent | d3c88f18261b78f1ca9903f2f179b7f812288e1c (diff) | |
download | guile-6ab4de612510b7c8668f0b50388258392f25b157.tar.gz |
don't provide scm_std_select on mingw and similar platforms
* 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.
Diffstat (limited to 'libguile/threads.c')
-rw-r--r-- | libguile/threads.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libguile/threads.c b/libguile/threads.c index a3aee0f17..c1b9c3982 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -45,6 +45,8 @@ # include <pthread_np.h> #endif +#include <sys/select.h> + #include <assert.h> #include <fcntl.h> #include <nproc.h> @@ -1851,9 +1853,9 @@ SCM_DEFINE (scm_condition_variable_p, "condition-variable?", 1, 0, 0, struct select_args { int nfds; - SELECT_TYPE *read_fds; - SELECT_TYPE *write_fds; - SELECT_TYPE *except_fds; + fd_set *read_fds; + fd_set *write_fds; + fd_set *except_fds; struct timeval *timeout; int result; @@ -1876,11 +1878,19 @@ do_std_select (void *args) return NULL; } +#if !SCM_HAVE_SYS_SELECT_H +static int scm_std_select (int nfds, + fd_set *readfds, + fd_set *writefds, + fd_set *exceptfds, + struct timeval *timeout); +#endif + int scm_std_select (int nfds, - SELECT_TYPE *readfds, - SELECT_TYPE *writefds, - SELECT_TYPE *exceptfds, + fd_set *readfds, + fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout) { fd_set my_readfds; |