diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-09-21 11:22:30 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-09-21 11:22:30 +0300 |
commit | 33628f624579d1ecdc833e91aad3616c85623de9 (patch) | |
tree | 54b593cbc548cba9953fffb398cfda13fc054787 | |
parent | 7138f3524c1cf4660c2a990e9cd0ddd10816ea88 (diff) | |
download | libmicrohttpd-33628f624579d1ecdc833e91aad3616c85623de9.tar.gz libmicrohttpd-33628f624579d1ecdc833e91aad3616c85623de9.zip |
mhd_itc_types.h: added macro for static initialisation
-rw-r--r-- | src/microhttpd/mhd_itc_types.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_itc_types.h b/src/microhttpd/mhd_itc_types.h index 36d4218b..bb354d37 100644 --- a/src/microhttpd/mhd_itc_types.h +++ b/src/microhttpd/mhd_itc_types.h | |||
@@ -47,6 +47,12 @@ struct MHD_itc_ | |||
47 | int fd; | 47 | int fd; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | /** | ||
51 | * Static initialiser for struct MHD_itc_ | ||
52 | */ | ||
53 | #define MHD_ITC_STATIC_INIT_INVALID { -1 } | ||
54 | |||
55 | |||
50 | #elif defined(_MHD_ITC_PIPE) | 56 | #elif defined(_MHD_ITC_PIPE) |
51 | /* **************** Standard UNIX ITC implementation by pipe ********** */ | 57 | /* **************** Standard UNIX ITC implementation by pipe ********** */ |
52 | 58 | ||
@@ -58,6 +64,11 @@ struct MHD_itc_ | |||
58 | int fd[2]; | 64 | int fd[2]; |
59 | }; | 65 | }; |
60 | 66 | ||
67 | /** | ||
68 | * Static initialiser for struct MHD_itc_ | ||
69 | */ | ||
70 | #define MHD_ITC_STATIC_INIT_INVALID { -1, -1 } | ||
71 | |||
61 | 72 | ||
62 | #elif defined(_MHD_ITC_SOCKETPAIR) | 73 | #elif defined(_MHD_ITC_SOCKETPAIR) |
63 | /* **************** ITC implementation by socket pair ********** */ | 74 | /* **************** ITC implementation by socket pair ********** */ |
@@ -72,6 +83,11 @@ struct MHD_itc_ | |||
72 | MHD_socket sk[2]; | 83 | MHD_socket sk[2]; |
73 | }; | 84 | }; |
74 | 85 | ||
86 | /** | ||
87 | * Static initialiser for struct MHD_itc_ | ||
88 | */ | ||
89 | #define MHD_ITC_STATIC_INIT_INVALID { MHD_INVALID_SOCKET, MHD_INVALID_SOCKET } | ||
90 | |||
75 | #endif /* _MHD_ITC_SOCKETPAIR */ | 91 | #endif /* _MHD_ITC_SOCKETPAIR */ |
76 | 92 | ||
77 | #endif /* ! MHD_ITC_TYPES_H */ | 93 | #endif /* ! MHD_ITC_TYPES_H */ |