diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index 9f59e0dc81..650a42d8bd 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -50,19 +50,6 @@ if(NOT DEFINED HAVE_STRUCT_SOCKADDR_STORAGE) cmake_pop_check_state() endif() -if(NOT WIN32) - set(_source_epilogue "#undef inline") - curl_add_header_include(HAVE_SYS_TYPES_H "sys/types.h") - check_c_source_compiles("${_source_epilogue} - #include - int main(void) - { - int flag = MSG_NOSIGNAL; - (void)flag; - return 0; - }" HAVE_MSG_NOSIGNAL) -endif() - set(_source_epilogue "#undef inline") check_c_source_compiles("${_source_epilogue} #ifdef _MSC_VER diff --git a/CMake/unix-cache.cmake b/CMake/unix-cache.cmake index bdde5f6a3d..5e26d12096 100644 --- a/CMake/unix-cache.cmake +++ b/CMake/unix-cache.cmake @@ -179,7 +179,6 @@ if(APPLE OR else() set(HAVE_MEMRCHR 1) endif() -set(HAVE_MSG_NOSIGNAL 1) set(HAVE_NETDB_H 1) if(ANDROID) set(HAVE_NETINET_IN6_H 1) diff --git a/CMake/win32-cache.cmake b/CMake/win32-cache.cmake index 218d873b7d..60d638f2d9 100644 --- a/CMake/win32-cache.cmake +++ b/CMake/win32-cache.cmake @@ -125,7 +125,6 @@ set(HAVE_LINUX_TCP_H 0) set(HAVE_LOCALE_H 1) set(HAVE_LOCALTIME_R 0) set(HAVE_MEMRCHR 0) -set(HAVE_MSG_NOSIGNAL 0) set(HAVE_NETDB_H 0) set(HAVE_NETINET_IN6_H 0) set(HAVE_NETINET_IN_H 0) diff --git a/acinclude.m4 b/acinclude.m4 index 0f88afd2de..646074fb65 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -703,45 +703,6 @@ AC_DEFUN([CURL_CHECK_FUNC_SEND], [ fi ]) -dnl CURL_CHECK_MSG_NOSIGNAL -dnl ------------------------------------------------- -dnl Check for MSG_NOSIGNAL - -AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ - AC_CHECK_HEADERS(sys/types.h) - AC_CACHE_CHECK([for MSG_NOSIGNAL], [curl_cv_msg_nosignal], [ - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - #undef inline - #ifdef _WIN32 - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #endif - #include - #else - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #include - #endif - ]],[[ - int flag = MSG_NOSIGNAL; - (void)flag; - ]]) - ],[ - curl_cv_msg_nosignal="yes" - ],[ - curl_cv_msg_nosignal="no" - ]) - ]) - case "$curl_cv_msg_nosignal" in - yes) - AC_DEFINE_UNQUOTED(HAVE_MSG_NOSIGNAL, 1, - [Define to 1 if you have the MSG_NOSIGNAL flag.]) - ;; - esac -]) - dnl CURL_CHECK_STRUCT_TIMEVAL dnl ------------------------------------------------- diff --git a/configure.ac b/configure.ac index 7697cdb154..4e08eafa42 100644 --- a/configure.ac +++ b/configure.ac @@ -4127,7 +4127,6 @@ CURL_CHECK_FUNC_SELECT CURL_CHECK_FUNC_RECV CURL_CHECK_FUNC_SEND -CURL_CHECK_MSG_NOSIGNAL CURL_CHECK_FUNC_ALARM CURL_CHECK_FUNC_BASENAME diff --git a/lib/curl_config-cmake.h.in b/lib/curl_config-cmake.h.in index e35b372ff1..f135f51be7 100644 --- a/lib/curl_config-cmake.h.in +++ b/lib/curl_config-cmake.h.in @@ -400,9 +400,6 @@ /* Define to 1 if you have the 'suseconds_t' data type. */ #cmakedefine HAVE_SUSECONDS_T 1 -/* Define to 1 if you have the MSG_NOSIGNAL flag. */ -#cmakedefine HAVE_MSG_NOSIGNAL 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_NETDB_H 1 diff --git a/lib/curl_setup.h b/lib/curl_setup.h index eee3f3d09e..478c94ead5 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -852,7 +852,7 @@ #endif #ifndef _WIN32 -#include +#include /* also for MSG_NOSIGNAL */ #endif #include "functypes.h" @@ -880,7 +880,7 @@ struct timeval { * If we have the MSG_NOSIGNAL define, make sure we use * it as the fourth argument of function send() */ -#ifdef HAVE_MSG_NOSIGNAL +#ifdef MSG_NOSIGNAL #define SEND_4TH_ARG MSG_NOSIGNAL #else #define SEND_4TH_ARG 0 diff --git a/lib/multi.c b/lib/multi.c index 20f4de2e62..9420e3f940 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1852,7 +1852,7 @@ static void set_in_callback(struct Curl_multi *multi, bool value) */ static void multi_posttransfer(struct Curl_easy *data) { -#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL) +#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL) /* restore the signal handler for SIGPIPE before we get back */ if(!data->set.no_signal) signal(SIGPIPE, data->state.prev_signal); diff --git a/lib/transfer.c b/lib/transfer.c index e25fe94a2a..32c31c6e93 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -535,7 +535,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) * different ports! */ data->state.allow_port = TRUE; -#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(HAVE_MSG_NOSIGNAL) +#if defined(HAVE_SIGNAL) && defined(SIGPIPE) && !defined(MSG_NOSIGNAL) /************************************************************* * Tell signal handler to ignore SIGPIPE *************************************************************/