[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.
- [libmicrohttpd] branch master updated (90fcf2fc -> 75e2addd), gnunet, 2023/11/01
- [libmicrohttpd] 03/10: daemon.c: cosmetics, gnunet, 2023/11/01
- [libmicrohttpd] 04/10: daemon: muted possible compiler warning, gnunet, 2023/11/01
- [libmicrohttpd] 02/10: Upgraded connection: cosmetics, gnunet, 2023/11/01
- [libmicrohttpd] 01/10: digestauth: added asserts, fixed internal doxy, gnunet, 2023/11/01
- [libmicrohttpd] 07/10: configure: warn if building without threads, gnunet, 2023/11/01
- [libmicrohttpd] 09/10: Adjusted default value of maximum connections, gnunet, 2023/11/01
- [libmicrohttpd] 06/10: configure: cosmetics, gnunet, 2023/11/01
- [libmicrohttpd] 10/10: internal.h: added macros for polling mode detection,
gnunet <=
- [libmicrohttpd] 08/10: configure: added detection of FD_SETSIZE value and ability to override it, gnunet, 2023/11/01
- [libmicrohttpd] 05/10: microhttpd.h: updated doxy for MHD_USE_PEDANTIC_CHECKS, gnunet, 2023/11/01