-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
curltime: use libcurl time functions in src and tests/server #16653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We have traditionally tried to use the |
I admit the rules guiding this didn't fully click for me, making it a bit fuzzy. Wouldn't such renaming make this PR harder to follow? (except for Or just do a macro alias? But, that's hurting grepping for function names. There also seems to be a bunch of existing functions that weren't renamed when When renaming shared ones to (It makes me think that internal sharing could be done differently, but I couldn't Either way, let me know, and I can do the renaming here. |
there was some problem having the same function name in both the tool and the library, some compilers did not like it, which led to some curlx prefixing like this and this , see #5946 discussion. i'm not sure if that's true throughout or even if it applies here but it was an issue. there's probably a better discussion of it but i can't find it atm |
Interesting, these seem to make a clone of these APIs under a different prefix, possibly to avoid issues when linking two copies of these functions to targets? I wonder if that's still an issue or something to resolve on the build level instead. Worthy to keep in mind and test if'd be touching this in the future. |
After further discussions I think we came to the conclusion that sticking to the We might in a somewhat longer term move towards extracting those functions into a separate "helper library" that then can be linked statically by both the tool, the library and test servers. Could save us from having to rebuild the same source files up to three times in a single build. |
Actually in this case,
|
fixup after rebase (in 15000)
add assert `freq != 0` timeval: reduce scope for freq
This reverts commit 1494a83. Nope.
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 curl#16653
The curl tool and tests/server used 2 parallel implementations
of libcurl's
Curl_now()
andCurl_timediff()
functions.Make them use the libcurl one.
w/o ws https://github.com/curl/curl/pull/16653/files?w=1