GNU libmicrohttpd 0.9.77
Loading...
Searching...
No Matches
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
45struct MHD_itc_
46{
47 int fd;
48};
49
53#define MHD_ITC_STATIC_INIT_INVALID { -1 }
54
55
56#elif defined(_MHD_ITC_PIPE)
57/* **************** Standard UNIX ITC implementation by pipe ********** */
58
62struct MHD_itc_
63{
64 int fd[2];
65};
66
70#define MHD_ITC_STATIC_INIT_INVALID { { -1, -1 } }
71
72
73#elif defined(_MHD_ITC_SOCKETPAIR)
74/* **************** ITC implementation by socket pair ********** */
75
76#include "mhd_sockets.h"
77
81struct MHD_itc_
82{
83 MHD_socket sk[2];
84};
85
89#define MHD_ITC_STATIC_INIT_INVALID \
90 { { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET } }
91
92#endif /* _MHD_ITC_SOCKETPAIR */
93
94#endif /* ! MHD_ITC_TYPES_H */
additional automatic macros for MHD_config.h
int MHD_socket
Definition microhttpd.h:207
int fd