version: show only the libpsl version, not its dependencies

The libpsl version output otherwise also includes version number for its
dependencies, like IDN lib, but since libcurl does not use libpsl's IDN
functionality those components are not important.

Ref: https://github.com/curl/curl-for-win/issues/63
Closes #12700
This commit is contained in:
Daniel Stenberg 2024-01-14 17:54:51 +01:00
parent e3b386f86f
commit 72bd88adde
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -211,8 +211,12 @@ char *curl_version(void)
#endif
#ifdef USE_LIBPSL
msnprintf(psl_version, sizeof(psl_version), "libpsl/%s", psl_get_version());
src[i++] = psl_version;
{
int num = psl_check_version_number(0);
msnprintf(psl_version, sizeof(psl_version), "libpsl/%d.%d.%d",
num >> 16, (num >> 8) & 0xff, num & 0xff);
src[i++] = psl_version;
}
#endif
#ifdef USE_SSH