<title>curl_version_info man page</title>
<meta name="generator" content="roffit">
<STYLE type="text/css">
-P.level0 {
+pre {
+ overflow: auto;
+ margin: 0;
+}
+
+P.level0, pre.level0 {
padding-left: 2em;
}
-P.level1 {
+P.level1, pre.level1 {
padding-left: 4em;
}
-P.level2 {
+P.level2, pre.level2 {
padding-left: 6em;
}
<p class="level0"> data = curl_version_info(CURLVERSION_NOW);
<p class="level0">Applications should use this information to judge if things are possible to do or not, instead of using compile-time checks, as dynamic/DLL libraries can be changed independent of applications.
<p class="level0">The curl_version_info_data struct looks like this
-<p class="level0"><pre>
-<p class="level0">typedef struct {
- CURLversion age; /* see description below */
- <p class="level0"> /* when 'age' is 0 or higher, the members below also exist: */
- const char *version; /* human readable string */
- unsigned int version_num; /* numeric representation */
- const char *host; /* human readable string */
- int features; /* bitmask, see below */
- char *ssl_version; /* human readable string */
- long ssl_version_num; /* not used, always zero */
- const char *libz_version; /* human readable string */
- const char **protocols; /* list of protocols */
- <p class="level0"> /* when 'age' is 1 or higher, the members below also exist: */
- const char *ares; /* human readable string */
- int ares_num; /* number */
- <p class="level0"> /* when 'age' is 2 or higher, the member below also exists: */
- const char *libidn; /* human readable string */
- <p class="level0"> /* when 'age' is 3 or higher (7.16.1 or later), the members below also
- exist */
- int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
- <p class="level0"> const char *libssh_version; /* human readable string */
- <p class="level0">} curl_version_info_data;
- </pre>
+<p class="level0"><pre class="level0">
+typedef struct {
+ CURLversion age; /* see description below */
+
+ /* when 'age' is 0 or higher, the members below also exist: */
+ const char *version; /* human readable string */
+ unsigned int version_num; /* numeric representation */
+ const char *host; /* human readable string */
+ int features; /* bitmask, see below */
+ char *ssl_version; /* human readable string */
+ long ssl_version_num; /* not used, always zero */
+ const char *libz_version; /* human readable string */
+ const char * const *protocols; /* protocols */
+
+ /* when 'age' is 1 or higher, the members below also exist: */
+ const char *ares; /* human readable string */
+ int ares_num; /* number */
+
+ /* when 'age' is 2 or higher, the member below also exists: */
+ const char *libidn; /* human readable string */
+
+ /* when 'age' is 3 or higher (7.16.1 or later), the members below also
+ exist */
+ int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
+
+ const char *libssh_version; /* human readable string */
+
+} curl_version_info_data;
+</pre>
<p class="level0">
<p class="level0"><span Class="emphasis">age</span> describes what the age of this struct is. The number depends on how new the libcurl you're using is. You are however guaranteed to get a struct that you have a matching struct for in the header, as you tell libcurl your "age" with the input argument.
<p class="level1">libcurl was built with support for HTTP2. (Added in 7.33.0)
<p class="level0"><a name="CURLVERSIONUNIXSOCKETS"></a><span class="nroffip">CURL_VERSION_UNIX_SOCKETS</span>
<p class="level1">libcurl was built with support for Unix domain sockets. (Added in 7.40.0)
+<p class="level0"><a name="CURLVERSIONPSL"></a><span class="nroffip">CURL_VERSION_PSL</span>
+<p class="level1">libcurl was built with support for Mozilla's Public Suffix List. This makes libcurl ignore cookies with a domain that's on the list. (Added in 7.47.0)
<p class="level0"><span Class="emphasis">ssl_version</span> is an ASCII string for the OpenSSL version used. If libcurl has no SSL support, this is NULL.
<p class="level0"><span Class="emphasis">ssl_version_num</span> is always 0.
<p class="level0"><span Class="emphasis">libz_version</span> is an ASCII string (there is no numerical version). If libcurl has no libz support, this is NULL.