Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/pkg
Path: blob/main/external/curl/src/curlinfo.c
2065 views
1
/***************************************************************************
2
* _ _ ____ _
3
* Project ___| | | | _ \| |
4
* / __| | | | |_) | |
5
* | (__| |_| | _ <| |___
6
* \___|\___/|_| \_\_____|
7
*
8
* Copyright (C) Daniel Stenberg, <[email protected]>, et al.
9
*
10
* This software is licensed as described in the file COPYING, which
11
* you should have received as part of this distribution. The terms
12
* are also available at https://curl.se/docs/copyright.html.
13
*
14
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
15
* copies of the Software, and permit persons to whom the Software is
16
* furnished to do so, under the terms of the COPYING file.
17
*
18
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
* KIND, either express or implied.
20
*
21
* SPDX-License-Identifier: curl
22
*
23
***************************************************************************/
24
25
/*
26
* The purpose of this tool is to figure out which, if any, features that are
27
* disabled which should otherwise exist and work. These are not visible in
28
* regular curl -V output.
29
*
30
* Disabled protocols are visible in curl_version_info() and are not included
31
* in this table.
32
*/
33
34
#include "curl_setup.h"
35
#include "multihandle.h" /* for ENABLE_WAKEUP */
36
#include "tool_xattr.h" /* for USE_XATTR */
37
#include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */
38
#include "asyn.h" /* for CURLRES_ARES */
39
#include "fake_addrinfo.h" /* for USE_FAKE_GETADDRINFO */
40
#include <stdio.h>
41
42
static const char *disabled[]={
43
"bindlocal: "
44
#ifdef CURL_DISABLE_BINDLOCAL
45
"OFF"
46
#else
47
"ON"
48
#endif
49
,
50
51
"cookies: "
52
#ifdef CURL_DISABLE_COOKIES
53
"OFF"
54
#else
55
"ON"
56
#endif
57
,
58
59
"basic-auth: "
60
#ifdef CURL_DISABLE_BASIC_AUTH
61
"OFF"
62
#else
63
"ON"
64
#endif
65
,
66
"bearer-auth: "
67
#ifdef CURL_DISABLE_BEARER_AUTH
68
"OFF"
69
#else
70
"ON"
71
#endif
72
,
73
"digest-auth: "
74
#ifdef CURL_DISABLE_DIGEST_AUTH
75
"OFF"
76
#else
77
"ON"
78
#endif
79
,
80
"negotiate-auth: "
81
#ifdef CURL_DISABLE_NEGOTIATE_AUTH
82
"OFF"
83
#else
84
"ON"
85
#endif
86
,
87
"aws: "
88
#ifdef CURL_DISABLE_AWS
89
"OFF"
90
#else
91
"ON"
92
#endif
93
,
94
"DoH: "
95
#ifdef CURL_DISABLE_DOH
96
"OFF"
97
#else
98
"ON"
99
#endif
100
,
101
"HTTP-auth: "
102
#ifdef CURL_DISABLE_HTTP_AUTH
103
"OFF"
104
#else
105
"ON"
106
#endif
107
,
108
"Mime: "
109
#ifdef CURL_DISABLE_MIME
110
"OFF"
111
#else
112
"ON"
113
#endif
114
,
115
116
"netrc: "
117
#ifdef CURL_DISABLE_NETRC
118
"OFF"
119
#else
120
"ON"
121
#endif
122
,
123
"parsedate: "
124
#ifdef CURL_DISABLE_PARSEDATE
125
"OFF"
126
#else
127
"ON"
128
#endif
129
,
130
"proxy: "
131
#ifdef CURL_DISABLE_PROXY
132
"OFF"
133
#else
134
"ON"
135
#endif
136
,
137
"shuffle-dns: "
138
#ifdef CURL_DISABLE_SHUFFLE_DNS
139
"OFF"
140
#else
141
"ON"
142
#endif
143
,
144
"typecheck: "
145
#ifdef CURL_DISABLE_TYPECHECK
146
"OFF"
147
#else
148
"ON"
149
#endif
150
,
151
"verbose-strings: "
152
#ifdef CURL_DISABLE_VERBOSE_STRINGS
153
"OFF"
154
#else
155
"ON"
156
#endif
157
,
158
"wakeup: "
159
#ifndef ENABLE_WAKEUP
160
"OFF"
161
#else
162
"ON"
163
#endif
164
,
165
"headers-api: "
166
#ifdef CURL_DISABLE_HEADERS_API
167
"OFF"
168
#else
169
"ON"
170
#endif
171
,
172
"xattr: "
173
#ifndef USE_XATTR
174
"OFF"
175
#else
176
"ON"
177
#endif
178
,
179
"form-api: "
180
#ifdef CURL_DISABLE_FORM_API
181
"OFF"
182
#else
183
"ON"
184
#endif
185
,
186
"large-time: "
187
#if (SIZEOF_TIME_T < 5)
188
"OFF"
189
#else
190
"ON"
191
#endif
192
,
193
"large-size: "
194
#if (SIZEOF_SIZE_T < 5)
195
"OFF"
196
#else
197
"ON"
198
#endif
199
,
200
"sha512-256: "
201
#ifndef CURL_HAVE_SHA512_256
202
"OFF"
203
#else
204
"ON"
205
#endif
206
,
207
208
"win32-ca-searchpath: "
209
#if !defined(_WIN32) || \
210
(defined(CURL_WINDOWS_UWP) || \
211
defined(CURL_DISABLE_CA_SEARCH) || defined(CURL_CA_SEARCH_SAFE))
212
"OFF"
213
#else
214
"ON"
215
#endif
216
,
217
"win32-ca-search-safe: "
218
#if !defined(_WIN32) || !defined(CURL_CA_SEARCH_SAFE)
219
"OFF"
220
#else
221
"ON"
222
#endif
223
,
224
225
"--libcurl: "
226
#ifdef CURL_DISABLE_LIBCURL_OPTION
227
"OFF"
228
#else
229
"ON"
230
#endif
231
,
232
"override-dns: "
233
#if defined(CURLDEBUG) && \
234
(defined(CURLRES_ARES) || defined(USE_FAKE_GETADDRINFO))
235
"ON"
236
#else
237
"OFF"
238
#endif
239
,
240
NULL
241
};
242
243
int main(int argc, char **argv)
244
{
245
int i;
246
247
(void) argc;
248
(void) argv;
249
250
for(i = 0; disabled[i]; i++)
251
printf("%s\n", disabled[i]);
252
253
return 0;
254
}
255
256