gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 10/10: internal.h: added macros for polling mode detecti


From: gnunet
Subject: [libmicrohttpd] 10/10: internal.h: added macros for polling mode detection
Date: Wed, 01 Nov 2023 11:52:25 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 75e2addd08c4e73873d8e3511accb25a01e7e4d8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Nov 1 13:36:43 2023 +0300

    internal.h: added macros for polling mode detection
---
 src/microhttpd/internal.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index e9020cf9..adcc43da 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -149,6 +149,61 @@
 #endif /* ! MHD_STATICSTR_LEN_ */
 
 
+#if defined(HAVE_POLL) && defined(EPOLL_SUPPORT)
+/**
+ * Checks whether the @a d daemon is using select()
+ */
+#define MHD_D_USING_SELECT_(d) \
+  (0 == (d->options & (MHD_USE_POLL | MHD_USE_EPOLL)))
+/**
+ * Checks whether the @a d daemon is using poll()
+ */
+#define MHD_D_USING_POLL_(d) (0 != (d->options & MHD_USE_POLL))
+/**
+ * Checks whether the @a d daemon is using epoll
+ */
+#define MHD_D_USING_EPOLL_(d) (0 != (d->options & MHD_USE_EPOLL))
+#elif defined(HAVE_POLL)
+/**
+ * Checks whether the @a d daemon is using select()
+ */
+#define MHD_D_USING_SELECT_(d) (0 == (d->options & MHD_USE_POLL))
+/**
+ * Checks whether the @a d daemon is using poll()
+ */
+#define MHD_D_USING_POLL_(d) (0 != (d->options & MHD_USE_POLL))
+/**
+ * Checks whether the @a d daemon is using epoll
+ */
+#define MHD_D_USING_EPOLL_(d) (0)
+#elif defined(EPOLL_SUPPORT)
+/**
+ * Checks whether the @a d daemon is using select()
+ */
+#define MHD_D_USING_SELECT_(d) (0 == (d->options & MHD_USE_EPOLL))
+/**
+ * Checks whether the @a d daemon is using poll()
+ */
+#define MHD_D_USING_POLL_(d) (0)
+/**
+ * Checks whether the @a d daemon is using epoll
+ */
+#define MHD_D_USING_EPOLL_(d) (0 != (d->options & MHD_USE_EPOLL))
+#else  /* select() only */
+/**
+ * Checks whether the @a d daemon is using select()
+ */
+#define MHD_D_USING_SELECT_(d) (! 0)
+/**
+ * Checks whether the @a d daemon is using poll()
+ */
+#define MHD_D_USING_POLL_(d) (0)
+/**
+ * Checks whether the @a d daemon is using epoll
+ */
+#define MHD_D_USING_EPOLL_(d) (0)
+#endif /* select() only */
+
 /**
  * Tri-state on/off/unknown
  */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]