aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-07-13 19:24:06 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-07-13 21:18:02 +0300
commit0078559fbc964836b92d78bd0de5312c70cd67fb (patch)
tree297bd95bb30821d6f4072ae4da6431929875cf0c
parentf4e8fc67d46e0d7c5bc5f7a90d7db78129cbdc61 (diff)
downloadlibmicrohttpd-0078559fbc964836b92d78bd0de5312c70cd67fb.tar.gz
libmicrohttpd-0078559fbc964836b92d78bd0de5312c70cd67fb.zip
Added new value MHD_FEATURE_AUTOSUPPRESS_SIGPIPE for MHD_is_feature_supported()
-rw-r--r--src/include/microhttpd.h11
-rw-r--r--src/microhttpd/daemon.c6
2 files changed, 15 insertions, 2 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index de84e5d7..c5bf9a05 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t;
126 * Current version of the library. 126 * Current version of the library.
127 * 0x01093001 = 1.9.30-1. 127 * 0x01093001 = 1.9.30-1.
128 */ 128 */
129#define MHD_VERSION 0x00095501 129#define MHD_VERSION 0x00095502
130 130
131/** 131/**
132 * MHD-internal return code for "YES". 132 * MHD-internal return code for "YES".
@@ -3452,7 +3452,14 @@ enum MHD_FEATURE
3452 * Get whether MHD support automatic detection of bind port number. 3452 * Get whether MHD support automatic detection of bind port number.
3453 * @sa #MHD_DAEMON_INFO_BIND_PORT 3453 * @sa #MHD_DAEMON_INFO_BIND_PORT
3454 */ 3454 */
3455 MHD_FEATURE_AUTODETECT_BIND_PORT = 19 3455 MHD_FEATURE_AUTODETECT_BIND_PORT = 19,
3456
3457 /**
3458 * Get whether MHD support SIGPIPE suppression.
3459 * If SIGPIPE suppression is not supported, application must handle
3460 * SIGPIPE signal by itself.
3461 */
3462 MHD_FEATURE_AUTOSUPPRESS_SIGPIPE = 20
3456}; 3463};
3457 3464
3458 3465
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 2a662af3..08fb8827 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -6552,6 +6552,12 @@ MHD_is_feature_supported(enum MHD_FEATURE feature)
6552#else 6552#else
6553 return MHD_NO; 6553 return MHD_NO;
6554#endif 6554#endif
6555 case MHD_FEATURE_AUTOSUPPRESS_SIGPIPE:
6556#if defined(MHD_WINSOCK_SOCKETS) || defined(MHD_socket_nosignal_) || defined (MSG_NOSIGNAL)
6557 return MHD_YES;
6558#else
6559 return MHD_NO;
6560#endif
6555 } 6561 }
6556 return MHD_NO; 6562 return MHD_NO;
6557} 6563}