mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:23:44 +03:00
ipfs: add options to disable
- CPPFLAGS: `-DCURL_DISABLE_IPFS` - configure: `--disable-ipfs` - cmake: `-DCURL_DISABLE_IPFS=ON` Fixes #14824 Closes #14827
This commit is contained in:
parent
8b42df3eb1
commit
ce7d0d4137
12 changed files with 71 additions and 4 deletions
|
|
@ -331,6 +331,7 @@ void tool_version_info(void)
|
|||
printf("Release-Date: %s\n", LIBCURL_TIMESTAMP);
|
||||
#endif
|
||||
if(built_in_protos[0]) {
|
||||
#ifndef CURL_DISABLE_IPFS
|
||||
const char *insert = NULL;
|
||||
/* we have ipfs and ipns support if libcurl has http support */
|
||||
for(builtin = built_in_protos; *builtin; ++builtin) {
|
||||
|
|
@ -345,16 +346,19 @@ void tool_version_info(void)
|
|||
insert = *builtin;
|
||||
}
|
||||
}
|
||||
#endif /* !CURL_DISABLE_IPFS */
|
||||
printf("Protocols:");
|
||||
for(builtin = built_in_protos; *builtin; ++builtin) {
|
||||
/* Special case: do not list rtmp?* protocols.
|
||||
They may only appear together with "rtmp" */
|
||||
if(!curl_strnequal(*builtin, "rtmp", 4) || !builtin[0][4])
|
||||
printf(" %s", *builtin);
|
||||
#ifndef CURL_DISABLE_IPFS
|
||||
if(insert && insert == *builtin) {
|
||||
printf(" ipfs ipns");
|
||||
insert = NULL;
|
||||
}
|
||||
#endif /* !CURL_DISABLE_IPFS */
|
||||
}
|
||||
puts(""); /* newline */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue