mirror of
https://github.com/curl/curl.git
synced 2026-04-14 18:21:40 +03:00
build: tidy up and dedupe strdup functions
- de-dupe lib/src strdup/memdup functions into curlx. - introduce `CURLX_STRDUP_LOW()` for mapping `strdup()`, and to do it at one place within the code, in `curl_setup.h`. - tests/server: use `curlx_strdup()`. (Also to fix building without a system `strdup()`.) - curlx/curlx.h: shorten and tidy up. - adjust Windows build path to not need `HAVE_STRDUP`. - build: stop detecting `HAVE_STRDUP` on Windows. Closes #20497
This commit is contained in:
parent
e39650c984
commit
31a4f415af
50 changed files with 171 additions and 333 deletions
|
|
@ -1607,9 +1607,7 @@ check_function_exists("getrlimit" HAVE_GETRLIMIT)
|
|||
check_function_exists("setlocale" HAVE_SETLOCALE)
|
||||
check_function_exists("setrlimit" HAVE_SETRLIMIT)
|
||||
|
||||
if(WIN32)
|
||||
set(HAVE_STRDUP 1) # to not define local implementation. curl uses _strdup() on Windows.
|
||||
else()
|
||||
if(NOT WIN32)
|
||||
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h
|
||||
check_function_exists("realpath" HAVE_REALPATH)
|
||||
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue