aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/mhd_sockets.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-14 15:40:18 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-14 15:40:18 +0100
commiteda21a5c2a9a3d08fdfdaef3d6a66fe6ad4ed265 (patch)
tree1f0eef15fdc89919aa842baf9afe56a033996675 /src/microhttpd/mhd_sockets.c
parent902e3774f5098f90fb9ec0125b3814ce2d0ba088 (diff)
downloadlibmicrohttpd-eda21a5c2a9a3d08fdfdaef3d6a66fe6ad4ed265.tar.gz
libmicrohttpd-eda21a5c2a9a3d08fdfdaef3d6a66fe6ad4ed265.zip
clean up #define mess a bit
Diffstat (limited to 'src/microhttpd/mhd_sockets.c')
-rw-r--r--src/microhttpd/mhd_sockets.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index cda00fdd..1448341a 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -17,18 +17,12 @@
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19*/ 19*/
20
21/** 20/**
22 * @file microhttpd/mhd_sockets.c 21 * @file microhttpd/mhd_sockets.c
23 * @brief Implementation for sockets functions 22 * @brief Implementation for sockets functions
24 * @author Karlson2k (Evgeny Grin) 23 * @author Karlson2k (Evgeny Grin)
25 */ 24 */
26
27#include "mhd_sockets.h" 25#include "mhd_sockets.h"
28#ifdef HAVE_UNISTD_H
29#include <unistd.h>
30#endif /* HAVE_UNISTD_H */
31#include <fcntl.h>
32 26
33#ifdef MHD_WINSOCK_SOCKETS 27#ifdef MHD_WINSOCK_SOCKETS
34 28
@@ -613,12 +607,10 @@ MHD_socket_create_listen_ (int pf)
613 if (MHD_INVALID_SOCKET == fd) 607 if (MHD_INVALID_SOCKET == fd)
614 return MHD_INVALID_SOCKET; 608 return MHD_INVALID_SOCKET;
615 609
616#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_) 610#if defined(MHD_socket_nosignal_)
617 if ( ( (! nosigpipe_set) 611 if ( ( (! nosigpipe_set)
618#ifdef MHD_socket_nosignal_ 612 || (! MHD_socket_nosignal_ (fd)) ) &&
619 || (! MHD_socket_nosignal_ (fd)) 613 (0 == MAYBE_MSG_NOSIGNAL) )
620#endif /* MHD_socket_nosignal_ */
621 ) && (0 == MAYBE_MSG_NOSIGNAL) )
622 { 614 {
623 /* SIGPIPE disable is possible on this platform 615 /* SIGPIPE disable is possible on this platform
624 * (so application expect that it will be disabled), 616 * (so application expect that it will be disabled),
@@ -629,7 +621,7 @@ MHD_socket_create_listen_ (int pf)
629 MHD_socket_fset_error_ (err); 621 MHD_socket_fset_error_ (err);
630 return MHD_INVALID_SOCKET; 622 return MHD_INVALID_SOCKET;
631 } 623 }
632#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */ 624#endif /* defined(MHD_socket_nosignal_) */
633 if (! cloexec_set) 625 if (! cloexec_set)
634 (void) MHD_socket_noninheritable_ (fd); 626 (void) MHD_socket_noninheritable_ (fd);
635 627