mirror of
https://github.com/curl/curl.git
synced 2026-08-04 15:06:19 +03:00
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:
parent
7fa1578471
commit
878214df44
4 changed files with 41 additions and 47 deletions
|
|
@ -28,19 +28,19 @@
|
|||
#if defined(WIN32) && !defined(MSDOS)
|
||||
|
||||
/* set in win32_init() */
|
||||
extern LARGE_INTEGER Curl_freq;
|
||||
extern bool Curl_isVistaOrGreater;
|
||||
extern LARGE_INTEGER tool_freq;
|
||||
extern bool tool_isVistaOrGreater;
|
||||
|
||||
/* In case of bug fix this function has a counterpart in timeval.c */
|
||||
struct timeval tvnow(void)
|
||||
{
|
||||
struct timeval now;
|
||||
if(Curl_isVistaOrGreater) { /* QPC timer might have issues pre-Vista */
|
||||
if(tool_isVistaOrGreater) { /* QPC timer might have issues pre-Vista */
|
||||
LARGE_INTEGER count;
|
||||
QueryPerformanceCounter(&count);
|
||||
now.tv_sec = (long)(count.QuadPart / Curl_freq.QuadPart);
|
||||
now.tv_usec = (long)((count.QuadPart % Curl_freq.QuadPart) * 1000000 /
|
||||
Curl_freq.QuadPart);
|
||||
now.tv_sec = (long)(count.QuadPart / tool_freq.QuadPart);
|
||||
now.tv_usec = (long)((count.QuadPart % tool_freq.QuadPart) * 1000000 /
|
||||
tool_freq.QuadPart);
|
||||
}
|
||||
else {
|
||||
/* Disable /analyze warning that GetTickCount64 is preferred */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue