mirror of
https://github.com/curl/curl.git
synced 2026-07-31 18:08:04 +03:00
build: check MSG_NOSIGNAL directly, drop detection and interim macro
Drop detecting it at configure time, along with the interim macro
`HAVE_MSG_NOSIGNAL`. There is no longer a reason for this workaround,
and allows to save the work at configure time and simplify.
Also say in a comment that `sys/socket.h` is defining this macro.
Follow-up to 77b3bc239d
Closes #20559
This commit is contained in:
parent
c05cd2a10e
commit
982ab7b53f
9 changed files with 4 additions and 62 deletions
|
|
@ -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 <netdb.h> header file. */
|
||||
#cmakedefine HAVE_NETDB_H 1
|
||||
|
||||
|
|
|
|||
|
|
@ -852,7 +852,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socket.h> /* 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue