summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-08-26 08:30:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-08-27 14:17:42 +0200
commitad691b191afd91bb747b6bbaa04c54303c6d581a (patch)
tree9bc9d1cc2fb5730b7d53d1d1c2ede3def277a513 /lib
parent6ebe63fac23f38df911edc348e8ccc72280f9434 (diff)
downloadcurl-ad691b191afd91bb747b6bbaa04c54303c6d581a.tar.gz
configure: added --disable-get-easy-options
To allow disabling of the curl_easy_option APIs in a build. Closes #5365
Diffstat (limited to 'lib')
-rw-r--r--lib/easygetopt.c22
1 files changed, 22 insertions, 0 deletions
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