diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-23 05:39:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-23 05:39:46 -0700 |
commit | 269044136fa1d73a6bc1a764211cc18119bc1207 (patch) | |
tree | 86aa194c0a547ee9b65b677504702900de209c1c /configure | |
parent | f248e5ab1e0633c96c048116ba74305ec9664998 (diff) | |
download | txr-269044136fa1d73a6bc1a764211cc18119bc1207.tar.gz txr-269044136fa1d73a6bc1a764211cc18119bc1207.tar.bz2 txr-269044136fa1d73a6bc1a764211cc18119bc1207.zip |
sockets: connect bugfix and use poll in preference to select.
* configure: cosmetics: change HAVE_SYS_SELECT to HAVE_SELECT,
and log that the function rather than the header is being
detected.
* socket.c (fd_timeout): New function, implemented using
poll or select.
(to_connect): select logic replaced with fd_timeout. Bug
fixed: connect requires polling for writability, not
readability. If poll and select are not available,
ignore timeout argument.
(sock_accept): Use fd_timeout; fall back on non-timed-out
accept if poll or select not available.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3324,7 +3324,7 @@ else fi if [ $have_sockets ] ; then - printf "Checking whether we have <sys/select.h> ... " + printf "Checking for select ... " cat > conftest.c <<! #include <sys/select.h> @@ -3341,7 +3341,7 @@ int main(int argc, char **argv) ! if conftest; then printf "yes\n" - printf "#define HAVE_SYS_SELECT_H 1\n" >> config.h + printf "#define HAVE_SELECT 1\n" >> config.h else printf "no\n" fi |