summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-04-28 20:19:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-04-28 20:19:09 -0700
commit7a0851c446dc6d128b1c49e21cc9d356bd7debc3 (patch)
treef1d76f9795e12e20e699d46cd9bfd358d6ff1ada /configure
parentd5faa2f124eff2c6f2079f6adc04cdbcc02c676e (diff)
downloadtxr-7a0851c446dc6d128b1c49e21cc9d356bd7debc3.tar.gz
txr-7a0851c446dc6d128b1c49e21cc9d356bd7debc3.tar.bz2
txr-7a0851c446dc6d128b1c49e21cc9d356bd7debc3.zip
Adding poll function.
* configure: Check for the poll function and set HAVE_POLL accordingly in config.h. * stream.h (fd_k): External declaration added. * sysif.c (poll_wrap): New function. (sysif_init): Registered poll-in, poll-out, poll-err, poll-pri, poll-rdhup, poll-nval, poll-rdband, poll-wrband variables and poll function. * txr.1: Documented poll.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure b/configure
index 6763f807..aeb7c820 100755
--- a/configure
+++ b/configure
@@ -1477,6 +1477,32 @@ else
fi
#
+# poll
+#
+
+printf "Checking for poll ... "
+
+cat > conftest.c <<!
+#include <poll.h>
+#include "config.h"
+
+int main(int argc, char **argv)
+{
+ struct pollfd fds[42] = { 0 };
+ nfds_t n = 42;
+ int err = poll(&fds, 42, 1000);
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_POLL 1\n" >> $config_h
+else
+ printf "no\n"
+fi
+
+#
# Check for fields inside struct tm
#