From 878214df44a41eef49b65039ab0cdfdbf847a5fe Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 13 Apr 2020 23:46:18 +0200 Subject: 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 --- src/tool_util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/tool_util.c') diff --git a/src/tool_util.c b/src/tool_util.c index 8bbfae03e..3ca13e7cb 100644 --- a/src/tool_util.c +++ b/src/tool_util.c @@ -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 */ -- cgit v1.2.3