aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_itc.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:20:50 +0000
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2016-10-11 15:20:50 +0000
commitb6ae5bf9b70c867664daced6f24b6ba28ebc6c82 (patch)
treec00d1deea1e973ec182cf9e0233b6121cd57012b /src/microhttpd/mhd_itc.h
parent992b827ada904941972fe455c795f7b60853c33e (diff)
downloadlibmicrohttpd-b6ae5bf9b70c867664daced6f24b6ba28ebc6c82.tar.gz
libmicrohttpd-b6ae5bf9b70c867664daced6f24b6ba28ebc6c82.zip
Add 'configure' parameter to control ITC type
Diffstat (limited to 'src/microhttpd/mhd_itc.h')
-rw-r--r--src/microhttpd/mhd_itc.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/microhttpd/mhd_itc.h b/src/microhttpd/mhd_itc.h
index 163a4d5f..49909516 100644
--- a/src/microhttpd/mhd_itc.h
+++ b/src/microhttpd/mhd_itc.h
@@ -34,14 +34,19 @@
34#define MHD_ITC_H 1 34#define MHD_ITC_H 1
35#include "mhd_options.h" 35#include "mhd_options.h"
36 36
37/* Force socketpair on native W32 */
38#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(_MHD_ITC_SOCKETPAIR)
39#error _MHD_ITC_SOCKETPAIR is not defined on naitive W32 platform
40#endif /* _WIN32 && !__CYGWIN__ && !_MHD_ITC_SOCKETPAIR */
41
37#ifdef HAVE_UNISTD_H 42#ifdef HAVE_UNISTD_H
38#include <unistd.h> 43#include <unistd.h>
39#endif /* HAVE_UNISTD_H */ 44#endif /* HAVE_UNISTD_H */
40#include <fcntl.h> 45#include <fcntl.h>
41 46
42#ifdef HAVE_SYS_EVENTFD_H 47#if defined(_MHD_ITC_EVENTFD)
43
44#include <sys/eventfd.h> 48#include <sys/eventfd.h>
49
45/* **************** Optimized eventfd PIPE implementation ********** */ 50/* **************** Optimized eventfd PIPE implementation ********** */
46 51
47/** 52/**
@@ -114,14 +119,7 @@ MHD_pipe_write_ (struct MHD_Pipe pip,
114#define MHD_itc_nonblocking_(pip) (!0) 119#define MHD_itc_nonblocking_(pip) (!0)
115 120
116 121
117#else 122#elif defined(_MHD_ITC_PIPE)
118
119/* Force don't use pipes on W32 */
120#if defined(_WIN32) && !defined(MHD_DONT_USE_PIPES)
121#define MHD_DONT_USE_PIPES 1
122#endif /* defined(_WIN32) && !defined(MHD_DONT_USE_PIPES) */
123
124#ifndef MHD_DONT_USE_PIPES
125 123
126/* **************** STANDARD UNIX PIPE implementation ********** */ 124/* **************** STANDARD UNIX PIPE implementation ********** */
127 125
@@ -201,7 +199,7 @@ MHD_itc_nonblocking_ (struct MHD_Pipe fd);
201 199
202/* **************** END OF STANDARD UNIX PIPE implementation ********** */ 200/* **************** END OF STANDARD UNIX PIPE implementation ********** */
203 201
204#else /* MHD_DONT_USE_PIPES */ 202#elif defined(_MHD_ITC_SOCKETPAIR)
205 203
206/* **************** PIPE EMULATION by socket pairs ********** */ 204/* **************** PIPE EMULATION by socket pairs ********** */
207 205
@@ -266,8 +264,6 @@ struct MHD_Pipe
266 264
267/* **************** END OF PIPE EMULATION by socket pairs ********** */ 265/* **************** END OF PIPE EMULATION by socket pairs ********** */
268 266
269#endif /* MHD_DONT_USE_PIPES */ 267#endif /* _MHD_ITC_SOCKETPAIR */
270
271#endif /* HAVE_SYS_EVENTFD_H */
272 268
273#endif /* MHD_ITC_H */ 269#endif /* MHD_ITC_H */