version: add a feature names array to curl_version_info_data

Field feature_names contains a null-terminated sorted array of feature
names. Bitmask field features is deprecated.

Documentation is updated. Test 1177 and tests/version-scan.pl updated to
match new documentation format and extended to check feature names too.

Closes #9583
This commit is contained in:
Patrick Monnerat 2022-11-09 00:27:32 +01:00 committed by Daniel Stenberg
parent 00ea0aaf46
commit e780aae77a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 307 additions and 144 deletions

View file

@ -2952,6 +2952,7 @@ typedef enum {
CURLVERSION_EIGHTH,
CURLVERSION_NINTH,
CURLVERSION_TENTH,
CURLVERSION_ELEVENTH,
CURLVERSION_LAST /* never actually use this */
} CURLversion;
@ -2960,7 +2961,7 @@ typedef enum {
meant to be a built-in version number for what kind of struct the caller
expects. If the struct ever changes, we redefine the NOW to another enum
from above. */
#define CURLVERSION_NOW CURLVERSION_TENTH
#define CURLVERSION_NOW CURLVERSION_ELEVENTH
struct curl_version_info_data {
CURLversion age; /* age of the returned struct */
@ -3016,6 +3017,10 @@ struct curl_version_info_data {
/* These fields were added in CURLVERSION_TENTH */
const char *gsasl_version; /* human readable string. */
/* These fields were added in CURLVERSION_ELEVENTH */
/* feature_names is terminated by an entry with a NULL feature name */
const char * const *feature_names;
};
typedef struct curl_version_info_data curl_version_info_data;