diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-11-06 19:03:50 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2023-11-07 20:49:09 +0300 |
commit | b4401abfb7f16501168ed5ba68e241572a7c2b35 (patch) | |
tree | bed7e3423b7aee9b5467dd3329e98ee218c2d158 /src/microhttpd/internal.h | |
parent | 0813a8b2a0d4341387ba15bababe3c32c808c4de (diff) | |
download | libmicrohttpd-b4401abfb7f16501168ed5ba68e241572a7c2b35.tar.gz libmicrohttpd-b4401abfb7f16501168ed5ba68e241572a7c2b35.zip |
internal.h: moved some macros
This is a correction for a225047802d49add197983055005f55559d7b47f
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r-- | src/microhttpd/internal.h | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 3ccc7347..bd8b9ba0 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -149,61 +149,6 @@ | |||
149 | #endif /* ! MHD_STATICSTR_LEN_ */ | 149 | #endif /* ! MHD_STATICSTR_LEN_ */ |
150 | 150 | ||
151 | 151 | ||
152 | #if defined(HAVE_POLL) && defined(EPOLL_SUPPORT) | ||
153 | /** | ||
154 | * Checks whether the @a d daemon is using select() | ||
155 | */ | ||
156 | #define MHD_D_IS_USING_SELECT_(d) \ | ||
157 | (0 == (d->options & (MHD_USE_POLL | MHD_USE_EPOLL))) | ||
158 | /** | ||
159 | * Checks whether the @a d daemon is using poll() | ||
160 | */ | ||
161 | #define MHD_D_IS_USING_POLL_(d) (0 != ((d)->options & MHD_USE_POLL)) | ||
162 | /** | ||
163 | * Checks whether the @a d daemon is using epoll | ||
164 | */ | ||
165 | #define MHD_D_IS_USING_EPOLL_(d) (0 != ((d)->options & MHD_USE_EPOLL)) | ||
166 | #elif defined(HAVE_POLL) | ||
167 | /** | ||
168 | * Checks whether the @a d daemon is using select() | ||
169 | */ | ||
170 | #define MHD_D_IS_USING_SELECT_(d) (0 == ((d)->options & MHD_USE_POLL)) | ||
171 | /** | ||
172 | * Checks whether the @a d daemon is using poll() | ||
173 | */ | ||
174 | #define MHD_D_IS_USING_POLL_(d) (0 != ((d)->options & MHD_USE_POLL)) | ||
175 | /** | ||
176 | * Checks whether the @a d daemon is using epoll | ||
177 | */ | ||
178 | #define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) | ||
179 | #elif defined(EPOLL_SUPPORT) | ||
180 | /** | ||
181 | * Checks whether the @a d daemon is using select() | ||
182 | */ | ||
183 | #define MHD_D_IS_USING_SELECT_(d) (0 == ((d)->options & MHD_USE_EPOLL)) | ||
184 | /** | ||
185 | * Checks whether the @a d daemon is using poll() | ||
186 | */ | ||
187 | #define MHD_D_IS_USING_POLL_(d) ((void) (d), 0) | ||
188 | /** | ||
189 | * Checks whether the @a d daemon is using epoll | ||
190 | */ | ||
191 | #define MHD_D_IS_USING_EPOLL_(d) (0 != ((d)->options & MHD_USE_EPOLL)) | ||
192 | #else /* select() only */ | ||
193 | /** | ||
194 | * Checks whether the @a d daemon is using select() | ||
195 | */ | ||
196 | #define MHD_D_IS_USING_SELECT_(d) ((void) (d), ! 0) | ||
197 | /** | ||
198 | * Checks whether the @a d daemon is using poll() | ||
199 | */ | ||
200 | #define MHD_D_IS_USING_POLL_(d) ((void) (d), 0) | ||
201 | /** | ||
202 | * Checks whether the @a d daemon is using epoll | ||
203 | */ | ||
204 | #define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) | ||
205 | #endif /* select() only */ | ||
206 | |||
207 | /** | 152 | /** |
208 | * Tri-state on/off/unknown | 153 | * Tri-state on/off/unknown |
209 | */ | 154 | */ |
@@ -2533,6 +2478,61 @@ struct MHD_Daemon | |||
2533 | }; | 2478 | }; |
2534 | 2479 | ||
2535 | 2480 | ||
2481 | #if defined(HAVE_POLL) && defined(EPOLL_SUPPORT) | ||
2482 | /** | ||
2483 | * Checks whether the @a d daemon is using select() | ||
2484 | */ | ||
2485 | #define MHD_D_IS_USING_SELECT_(d) \ | ||
2486 | (0 == (d->options & (MHD_USE_POLL | MHD_USE_EPOLL))) | ||
2487 | /** | ||
2488 | * Checks whether the @a d daemon is using poll() | ||
2489 | */ | ||
2490 | #define MHD_D_IS_USING_POLL_(d) (0 != ((d)->options & MHD_USE_POLL)) | ||
2491 | /** | ||
2492 | * Checks whether the @a d daemon is using epoll | ||
2493 | */ | ||
2494 | #define MHD_D_IS_USING_EPOLL_(d) (0 != ((d)->options & MHD_USE_EPOLL)) | ||
2495 | #elif defined(HAVE_POLL) | ||
2496 | /** | ||
2497 | * Checks whether the @a d daemon is using select() | ||
2498 | */ | ||
2499 | #define MHD_D_IS_USING_SELECT_(d) (0 == ((d)->options & MHD_USE_POLL)) | ||
2500 | /** | ||
2501 | * Checks whether the @a d daemon is using poll() | ||
2502 | */ | ||
2503 | #define MHD_D_IS_USING_POLL_(d) (0 != ((d)->options & MHD_USE_POLL)) | ||
2504 | /** | ||
2505 | * Checks whether the @a d daemon is using epoll | ||
2506 | */ | ||
2507 | #define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) | ||
2508 | #elif defined(EPOLL_SUPPORT) | ||
2509 | /** | ||
2510 | * Checks whether the @a d daemon is using select() | ||
2511 | */ | ||
2512 | #define MHD_D_IS_USING_SELECT_(d) (0 == ((d)->options & MHD_USE_EPOLL)) | ||
2513 | /** | ||
2514 | * Checks whether the @a d daemon is using poll() | ||
2515 | */ | ||
2516 | #define MHD_D_IS_USING_POLL_(d) ((void) (d), 0) | ||
2517 | /** | ||
2518 | * Checks whether the @a d daemon is using epoll | ||
2519 | */ | ||
2520 | #define MHD_D_IS_USING_EPOLL_(d) (0 != ((d)->options & MHD_USE_EPOLL)) | ||
2521 | #else /* select() only */ | ||
2522 | /** | ||
2523 | * Checks whether the @a d daemon is using select() | ||
2524 | */ | ||
2525 | #define MHD_D_IS_USING_SELECT_(d) ((void) (d), ! 0) | ||
2526 | /** | ||
2527 | * Checks whether the @a d daemon is using poll() | ||
2528 | */ | ||
2529 | #define MHD_D_IS_USING_POLL_(d) ((void) (d), 0) | ||
2530 | /** | ||
2531 | * Checks whether the @a d daemon is using epoll | ||
2532 | */ | ||
2533 | #define MHD_D_IS_USING_EPOLL_(d) ((void) (d), 0) | ||
2534 | #endif /* select() only */ | ||
2535 | |||
2536 | #ifdef DAUTH_SUPPORT | 2536 | #ifdef DAUTH_SUPPORT |
2537 | 2537 | ||
2538 | /** | 2538 | /** |