tool: do not declare functions with Curl_ prefix

To avoid collision risks with private libcurl symbols when linked with
static versions (or just versions not hiding internal symbols).

Reported-by: hydra3333 on github
Fixes #5219
Closes #5234
This commit is contained in:
Daniel Stenberg 2020-04-13 23:46:18 +02:00
parent 7fa1578471
commit 878214df44
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 41 additions and 47 deletions

View file

@ -697,8 +697,8 @@ cleanup:
return slist;
}
LARGE_INTEGER Curl_freq;
bool Curl_isVistaOrGreater;
LARGE_INTEGER tool_freq;
bool tool_isVistaOrGreater;
CURLcode win32_init(void)
{
@ -713,13 +713,13 @@ CURLcode win32_init(void)
VER_SET_CONDITION(mask, VER_MINORVERSION, op);
if(VerifyVersionInfoA(&osvi, (VER_MAJORVERSION | VER_MINORVERSION), mask))
Curl_isVistaOrGreater = true;
tool_isVistaOrGreater = true;
else if(GetLastError() == ERROR_OLD_WIN_VERSION)
Curl_isVistaOrGreater = false;
tool_isVistaOrGreater = false;
else
return CURLE_FAILED_INIT;
QueryPerformanceFrequency(&Curl_freq);
QueryPerformanceFrequency(&tool_freq);
return CURLE_OK;
}