aboutsummaryrefslogtreecommitdiffstats
path: root/src/ath.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2021-11-25 02:13:17 +0000
committerNIIBE Yutaka <[email protected]>2021-11-25 02:13:17 +0000
commit8148237cb4ae20755c06a44d71761c7030973c3d (patch)
treeaaa3d581d5094f436a6ec353f390b25f902d206d /src/ath.h
parentgpgme.pc: Fix library dependency and use of includedir, libdir. (diff)
downloadgpgme-8148237cb4ae20755c06a44d71761c7030973c3d.tar.gz
gpgme-8148237cb4ae20755c06a44d71761c7030973c3d.zip
posix: Use poll instead, when available, removing use of select.
* configure.ac (HAVE_POLL_H): Add the check. * src/ath.c [!HAVE_POLL_H] (ath_select): Enable conditionally. * src/posix-io.c [HAVE_POLL_H] (_gpgme_io_select_poll): Use poll. * tests/gpg/t-cancel.c [HAVE_POLL_H] (do_select): Use poll. * tests/gpg/t-eventloop.c [HAVE_POLL_H] (do_select): Use poll. -- GnuPG-bug-id: 2385 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/ath.h')
-rw-r--r--src/ath.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ath.h b/src/ath.h
index d4c1c6fa..8243864a 100644
--- a/src/ath.h
+++ b/src/ath.h
@@ -32,12 +32,15 @@
# include <io.h>
#else /*!HAVE_W32_SYSTEM*/
-
-# ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
+# ifdef HAVE_POLL_H
+# include <poll.h>
# else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# endif
# endif
# endif
# ifdef HAVE_SYS_TYPES_H