[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 39/411: configure: added --disable-get-easy-options
From: |
gnunet |
Subject: |
[gnurl] 39/411: configure: added --disable-get-easy-options |
Date: |
Wed, 13 Jan 2021 01:17:34 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit ad691b191afd91bb747b6bbaa04c54303c6d581a
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Wed Aug 26 08:30:38 2020 +0200
configure: added --disable-get-easy-options
To allow disabling of the curl_easy_option APIs in a build.
Closes #5365
---
configure.ac | 18 ++++++++++++++++++
docs/CURL-DISABLE.md | 5 +++++
lib/easygetopt.c | 22 ++++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/configure.ac b/configure.ac
index 0d3e4e103..78e0c4f4f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4830,6 +4830,24 @@ AC_HELP_STRING([--disable-dnsshuffle],[Disable DNS
shuffling]),
AC_MSG_RESULT(yes)
)
+dnl ************************************************************
+dnl disable the curl_easy_options API
+dnl
+AC_MSG_CHECKING([whether to support curl_easy_option*])
+AC_ARG_ENABLE(get-easy-option,
+AC_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
+AC_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
+[ case "$enableval" in
+ no)
+ AC_MSG_RESULT(no)
+ AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
+ ;;
+ *) AC_MSG_RESULT(yes)
+ ;;
+ esac ],
+ AC_MSG_RESULT(yes)
+)
+
dnl ************************************************************
dnl switch on/off alt-svc
dnl
diff --git a/docs/CURL-DISABLE.md b/docs/CURL-DISABLE.md
index 2dd250c7f..f90acda2c 100644
--- a/docs/CURL-DISABLE.md
+++ b/docs/CURL-DISABLE.md
@@ -24,6 +24,11 @@ Disable the FILE protocol
Disable the FTP (and FTPS) protocol
+## CURL_DISABLE_GETOPTIONS
+
+Disable the `curl_easy_options` API calls that lets users get information
+about existing options to `curl_easy_setopt`.
+
## CURL_DISABLE_GOPHER
Disable the GOPHER protocol.
diff --git a/lib/easygetopt.c b/lib/easygetopt.c
index 8cfd49977..c4c6f631c 100644
--- a/lib/easygetopt.c
+++ b/lib/easygetopt.c
@@ -24,6 +24,8 @@
#include "strcase.h"
#include "easyoptions.h"
+#ifndef CURL_DISABLE_GETOPTIONS
+
/* Lookups easy options at runtime */
static struct curl_easyoption *lookup(const char *name, CURLoption id)
{
@@ -71,3 +73,23 @@ curl_easy_option_next(const struct curl_easyoption *prev)
return NULL;
}
+#else
+const struct curl_easyoption *curl_easy_option_by_name(const char *name)
+{
+ (void)name;
+ return NULL;
+}
+
+const struct curl_easyoption *curl_easy_option_by_id (CURLoption id)
+{
+ (void)id;
+ return NULL;
+}
+
+const struct curl_easyoption *
+curl_easy_option_next(const struct curl_easyoption *prev)
+{
+ (void)prev;
+ return NULL;
+}
+#endif
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 35/411: openssl: Fix wincrypt symbols conflict with BoringSSL, (continued)
- [gnurl] 35/411: openssl: Fix wincrypt symbols conflict with BoringSSL, gnunet, 2021/01/12
- [gnurl] 18/411: configure: fix pkg-config detecting wolfssl, gnunet, 2021/01/12
- [gnurl] 32/411: schannel: fix memory leak when using get_cert_location, gnunet, 2021/01/12
- [gnurl] 10/411: CURLE_PROXY: new error code, gnunet, 2021/01/12
- [gnurl] 43/411: buildconf: invoke 'autoreconf -fi' instead, gnunet, 2021/01/12
- [gnurl] 49/411: multi: handle connection state winsock events, gnunet, 2021/01/12
- [gnurl] 57/411: ntlm: fix condition for curl_ntlm_core usage, gnunet, 2021/01/12
- [gnurl] 68/411: cmdline-opts/gen.pl: generate nicer "See Also" in curl.1, gnunet, 2021/01/12
- [gnurl] 42/411: lib: make Curl_gethostname accept a const pointer, gnunet, 2021/01/12
- [gnurl] 66/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 39/411: configure: added --disable-get-easy-options,
gnunet <=
- [gnurl] 53/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 65/411: mqtt: enable by default, gnunet, 2021/01/12
- [gnurl] 58/411: tests/getpart: use MIME::Base64 instead of home-cooked, gnunet, 2021/01/12
- [gnurl] 63/411: url: remove funny embedded comments in Curl_disonnect calls, gnunet, 2021/01/12
- [gnurl] 46/411: docs: SSLCERTS: fix English syntax, gnunet, 2021/01/12
- [gnurl] 70/411: lib/Makefile.am: bump VERSIONINFO due to new functions, gnunet, 2021/01/12
- [gnurl] 71/411: test971: show test mismatches "inline", gnunet, 2021/01/12
- [gnurl] 44/411: curl.1: fix typo invokved -> invoked, gnunet, 2021/01/12
- [gnurl] 54/411: select: simplify return code handling for poll and select, gnunet, 2021/01/12
- [gnurl] 69/411: optiontable: use DEBUGBUILD, gnunet, 2021/01/12