curlx: dedupe basename copies into curlx_basename()

Also stop redefining system `basename()` symbol. Call `curlx_basename()`
instead, and map that to `basename()` if available.

Closes #20424
This commit is contained in:
Viktor Szakats 2026-01-25 05:35:00 +01:00
parent 0e2507a3c6
commit 6974bd7cc8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
7 changed files with 54 additions and 79 deletions

View file

@ -34,6 +34,7 @@
# the official API, but we reuse the code here to avoid duplication.
CURLX_CFILES = \
../lib/curlx/base64.c \
../lib/curlx/basename.c \
../lib/curlx/dynbuf.c \
../lib/curlx/fopen.c \
../lib/curlx/multibyte.c \
@ -76,7 +77,6 @@ CURL_CFILES = \
config2setopts.c \
slist_wc.c \
terminal.c \
tool_bname.c \
tool_cb_dbg.c \
tool_cb_hdr.c \
tool_cb_prg.c \
@ -122,7 +122,6 @@ CURL_HFILES = \
config2setopts.h \
slist_wc.h \
terminal.h \
tool_bname.h \
tool_cb_dbg.h \
tool_cb_hdr.h \
tool_cb_prg.h \