From eda21a5c2a9a3d08fdfdaef3d6a66fe6ad4ed265 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 14 Feb 2020 15:40:18 +0100 Subject: clean up #define mess a bit --- src/microhttpd/mhd_sockets.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/microhttpd/mhd_sockets.c') 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 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - /** * @file microhttpd/mhd_sockets.c * @brief Implementation for sockets functions * @author Karlson2k (Evgeny Grin) */ - #include "mhd_sockets.h" -#ifdef HAVE_UNISTD_H -#include -#endif /* HAVE_UNISTD_H */ -#include #ifdef MHD_WINSOCK_SOCKETS @@ -613,12 +607,10 @@ MHD_socket_create_listen_ (int pf) if (MHD_INVALID_SOCKET == fd) return MHD_INVALID_SOCKET; -#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_) +#if defined(MHD_socket_nosignal_) if ( ( (! nosigpipe_set) -#ifdef MHD_socket_nosignal_ - || (! MHD_socket_nosignal_ (fd)) -#endif /* MHD_socket_nosignal_ */ - ) && (0 == MAYBE_MSG_NOSIGNAL) ) + || (! MHD_socket_nosignal_ (fd)) ) && + (0 == MAYBE_MSG_NOSIGNAL) ) { /* SIGPIPE disable is possible on this platform * (so application expect that it will be disabled), @@ -629,7 +621,7 @@ MHD_socket_create_listen_ (int pf) MHD_socket_fset_error_ (err); return MHD_INVALID_SOCKET; } -#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */ +#endif /* defined(MHD_socket_nosignal_) */ if (! cloexec_set) (void) MHD_socket_noninheritable_ (fd); -- cgit v1.2.3