curltime: use libcurl time functions in src and tests/server

The curl tool and tests/server used 2 parallel implementations
of libcurl's `Curl_now()` and `Curl_timediff()` functions.

Make them use the libcurl one.

Closes #16653
This commit is contained in:
Viktor Szakats 2025-03-09 13:14:31 +01:00
parent b1faac8039
commit 436d4a360a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
20 changed files with 129 additions and 292 deletions

View file

@ -32,7 +32,8 @@
# libcurl sources to include in curltool lib we use for test binaries
CURLTOOL_LIBCURL_CFILES = \
../lib/base64.c \
../lib/dynbuf.c
../lib/dynbuf.c \
../lib/timeval.c
# libcurl has sources that provide functions named curlx_* that are not part of
# the official API, but we reuse the code here to avoid duplication.
@ -44,6 +45,7 @@ CURLX_CFILES = \
../lib/strparse.c \
../lib/strcase.c \
../lib/timediff.c \
../lib/timeval.c \
../lib/version_win32.c \
../lib/warnless.c
@ -56,6 +58,7 @@ CURLX_HFILES = \
../lib/strparse.h \
../lib/strcase.h \
../lib/timediff.h \
../lib/timeval.h \
../lib/version_win32.h \
../lib/warnless.h