summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-23 05:39:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-23 05:39:46 -0700
commit269044136fa1d73a6bc1a764211cc18119bc1207 (patch)
tree86aa194c0a547ee9b65b677504702900de209c1c /configure
parentf248e5ab1e0633c96c048116ba74305ec9664998 (diff)
downloadtxr-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-xconfigure4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index ef5f75ec..aa2a738e 100755
--- a/configure
+++ b/configure
@@ -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