[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 34/411: socketpair: allow CURL_DISABLE_SOCKETPAIR
From: |
gnunet |
Subject: |
[gnurl] 34/411: socketpair: allow CURL_DISABLE_SOCKETPAIR |
Date: |
Wed, 13 Jan 2021 01:17:29 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit d854572ccc5f524ba48a158c2c26614def9e39e5
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Fri Aug 14 15:45:08 2020 +0200
socketpair: allow CURL_DISABLE_SOCKETPAIR
... to completely disable the use of socketpair
Closes #5850
---
configure.ac | 18 ++++++++++++++++++
docs/CURL-DISABLE.md | 5 +++++
lib/multihandle.h | 4 ++--
lib/socketpair.c | 4 ++--
4 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 918003e02..0d3e4e103 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4686,6 +4686,24 @@ AC_HELP_STRING([--disable-cookies],[Disable cookies
support]),
AC_MSG_RESULT(yes)
)
+dnl ************************************************************
+dnl disable socketpair
+dnl
+AC_MSG_CHECKING([whether to support socketpair])
+AC_ARG_ENABLE(socketpair,
+AC_HELP_STRING([--enable-socketpair],[Enable socketpair support])
+AC_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support])
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
dnl ************************************************************
dnl disable HTTP authentication support
dnl
diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md
index 83436b473..2dd250c7f 100644
--- a/docs/CURL-DISABLE.md
+++ b/docs/CURL-DISABLE.md
@@ -97,6 +97,11 @@ Disable the SMB(S) protocols
Disable the SMTP(S) protocols
+## CURL_DISABLE_SOCKETPAIR
+
+Disable the use of socketpair internally to allow waking up and canceling
+curl_multi_poll().
+
## CURL_DISABLE_TELNET
Disable the TELNET protocol
diff --git a/lib/multihandle.h b/lib/multihandle.h
index 0c9ce7f74..46eb12146 100644
--- a/lib/multihandle.h
+++ b/lib/multihandle.h
@@ -67,11 +67,11 @@ typedef enum {
#define CURLPIPE_ANY (CURLPIPE_MULTIPLEX)
-#if defined(USE_SOCKETPAIR) && !defined(USE_BLOCKING_SOCKETS)
+#if defined(USE_SOCKETPAIR) && !defined(USE_BLOCKING_SOCKETS) && \
+ !defined(CURL_DISABLE_SOCKETPAIR)
#define ENABLE_WAKEUP
#endif
-
/* value for MAXIMUM CONCURRENT STREAMS upper limit */
#define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1)
diff --git a/lib/socketpair.c b/lib/socketpair.c
index 1ec0d75a4..9e1f9ef4c 100644
--- a/lib/socketpair.c
+++ b/lib/socketpair.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2019 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
#include "curl_setup.h"
#include "socketpair.h"
-#ifndef HAVE_SOCKETPAIR
+#if !defined(HAVE_SOCKETPAIR) && !defined(CURL_DISABLE_SOCKETPAIR)
#ifdef WIN32
/*
* This is a socketpair() implementation for Windows.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 03/411: dist: add missing CMake Find modules to the distribution, (continued)
- [gnurl] 03/411: dist: add missing CMake Find modules to the distribution, gnunet, 2021/01/12
- [gnurl] 01/411: tls: provide the CApath verbose log on its own line, gnunet, 2021/01/12
- [gnurl] 07/411: Makefile.m32: add ability to override zstd libs [ci skip], gnunet, 2021/01/12
- [gnurl] 06/411: runtests: avoid 'fail to start' repeated messages in attempt loops, gnunet, 2021/01/12
- [gnurl] 08/411: KNOWN_BUGS: 'no_proxy' string-matches IPv6 numerical addreses, gnunet, 2021/01/12
- [gnurl] 33/411: curl_get_line: build only if cookies or alt-svc are enabled, gnunet, 2021/01/12
- [gnurl] 04/411: TODO: Virtual external sockets, gnunet, 2021/01/12
- [gnurl] 25/411: multi: expand pre-check for socket readiness, gnunet, 2021/01/12
- [gnurl] 14/411: curl: support XDG_CONFIG_HOME to find .curlrc, gnunet, 2021/01/12
- [gnurl] 20/411: docs: --output-dir is added in 7.73.0, nothing else, gnunet, 2021/01/12
- [gnurl] 34/411: socketpair: allow CURL_DISABLE_SOCKETPAIR,
gnunet <=
- [gnurl] 22/411: select: fix poll-based check not detecting connect failure, gnunet, 2021/01/12
- [gnurl] 21/411: select.h: make socket validation macros test for INVALID_SOCKET, gnunet, 2021/01/12
- [gnurl] 23/411: select: reduce duplication of Curl_poll in Curl_socket_check, gnunet, 2021/01/12
- [gnurl] 28/411: winbuild/README.md: make <options> visible, gnunet, 2021/01/12
- [gnurl] 31/411: git: ignore libtests in 3XXX area, gnunet, 2021/01/12
- [gnurl] 26/411: lib1560: verify "redirect" to double-slash leading URL, gnunet, 2021/01/12
- [gnurl] 17/411: sftp: add the option CURLKHSTAT_FINE_REPLACE, gnunet, 2021/01/12
- [gnurl] 19/411: curl: add --output-dir, gnunet, 2021/01/12
- [gnurl] 30/411: doh: add error message for DOH_DNS_NAME_TOO_LONG, gnunet, 2021/01/12
- [gnurl] 29/411: ngtcp2: adapt to the new pkt_info arguments, gnunet, 2021/01/12