GNU libmicrohttpd  0.9.72
mhd_itc_types.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2016 Karlson2k (Evgeny Grin), Christian Grothoff
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 */
20 
30 #ifndef MHD_ITC_TYPES_H
31 #define MHD_ITC_TYPES_H 1
32 #include "mhd_options.h"
33 
34 /* Force socketpair on native W32 */
35 #if defined(_WIN32) && ! defined(__CYGWIN__) && ! defined(_MHD_ITC_SOCKETPAIR)
36 #error _MHD_ITC_SOCKETPAIR is not defined on naitive W32 platform
37 #endif /* _WIN32 && !__CYGWIN__ && !_MHD_ITC_SOCKETPAIR */
38 
39 #if defined(_MHD_ITC_EVENTFD)
40 /* **************** Optimized GNU/Linux ITC implementation by eventfd ********** */
41 
45 struct MHD_itc_
46 {
47  int fd;
48 };
49 
50 #elif defined(_MHD_ITC_PIPE)
51 /* **************** Standard UNIX ITC implementation by pipe ********** */
52 
56 struct MHD_itc_
57 {
58  int fd[2];
59 };
60 
61 
62 #elif defined(_MHD_ITC_SOCKETPAIR)
63 /* **************** ITC implementation by socket pair ********** */
64 
65 #include "mhd_sockets.h"
66 
70 struct MHD_itc_
71 {
72  MHD_socket sk[2];
73 };
74 
75 #endif /* _MHD_ITC_SOCKETPAIR */
76 
77 #endif /* ! MHD_ITC_TYPES_H */
additional automatic macros for MHD_config.h
int MHD_socket
Definition: microhttpd.h:196
int fd
Definition: microhttpd.h:3195