aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_sockets.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/mhd_sockets.h')
-rw-r--r--src/microhttpd/mhd_sockets.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h
index d160dbcd..6b3261c3 100644
--- a/src/microhttpd/mhd_sockets.h
+++ b/src/microhttpd/mhd_sockets.h
@@ -339,6 +339,36 @@
339# else /* MHD_WINSOCK_SOCKETS */ 339# else /* MHD_WINSOCK_SOCKETS */
340# define MHD_sys_poll_ WSAPoll 340# define MHD_sys_poll_ WSAPoll
341# endif /* MHD_WINSOCK_SOCKETS */ 341# endif /* MHD_WINSOCK_SOCKETS */
342
343# ifdef POLLPRI
344# define MHD_POLLPRI_OR_ZERO POLLPRI
345# else /* ! POLLPRI */
346# define MHD_POLLPRI_OR_ZERO 0
347# endif /* ! POLLPRI */
348# ifdef POLLRDBAND
349# define MHD_POLLRDBAND_OR_ZERO POLLRDBAND
350# else /* ! POLLRDBAND */
351# define MHD_POLLRDBAND_OR_ZERO 0
352# endif /* ! POLLRDBAND */
353# ifdef POLLNVAL
354# define MHD_POLLNVAL_OR_ZERO POLLNVAL
355# else /* ! POLLNVAL */
356# define MHD_POLLNVAL_OR_ZERO 0
357# endif /* ! POLLNVAL */
358
359/* MHD_POLL_EVENTS_ERR_DISC is 'events' mask for errors and disconnect.
360 * Note: Out-of-band data is treated as error. */
361# if defined(_WIN32)
362# define MHD_POLL_EVENTS_ERR_DISC POLLRDBAND
363# elif defined(__linux__)
364# define MHD_POLL_EVENTS_ERR_DISC POLLPRI
365# else /* ! __linux__ */
366# define MHD_POLL_EVENTS_ERR_DISC (MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO)
367# endif /* ! __linux__ */
368/* MHD_POLL_REVENTS_ERR_DISC is 'revents' mask for errors and disconnect.
369 * Note: Out-of-band data is treated as error. */
370# define MHD_POLL_REVENTS_ERR_DISC \
371 (MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO | MHD_POLLNVAL_OR_ZERO | POLLERR | POLLHUP)
342#endif /* HAVE_POLL */ 372#endif /* HAVE_POLL */
343 373
344#define MHD_SCKT_MISSING_ERR_CODE_ 31450 374#define MHD_SCKT_MISSING_ERR_CODE_ 31450