]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: stop using libcurl's strdup
authorDaniel Stenberg <daniel@haxx.se>
Thu, 8 May 2025 21:29:24 +0000 (23:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 9 May 2025 08:09:00 +0000 (10:09 +0200)
It is not provided as a curlx function so should not be used outside of
libcurl.

I strongly suspect that no system we build the test suite on lack strdup
so this will not cause any harm.

The private version was added in b0936b800719f915ff2a59a for Ultrix.

Closes #17297

tests/server/Makefile.inc
tests/server/getpart.c

index e4f7d4311ca3d83ae813f22f00e9c92b6f112908..e5c6345baae19f5a868cf7d68a8378ceab213a9a 100644 (file)
@@ -38,7 +38,6 @@ CURLX_SRCS = \
   ../../lib/curlx/timeval.c \
   ../../lib/curlx/dynbuf.c \
   ../../lib/strcase.c \
-  ../../lib/strdup.c \
   ../../lib/curlx/multibyte.c \
   ../../lib/curlx/version_win32.c
 
@@ -52,7 +51,6 @@ CURLX_HDRS = \
   ../../lib/curlx/timeval.h \
   ../../lib/curlx/dynbuf.h \
   ../../lib/strcase.h \
-  ../../lib/strdup.h \
   ../../lib/curlx/multibyte.h \
   ../../lib/curlx/version_win32.h
 
index a3ea8669ddab9d69b09f1a379146494e2725964e..feebace526d74674352925f34d56369fbae08ce5 100644 (file)
@@ -51,8 +51,6 @@
 
 #if defined(UNDER_CE)
 #define system_strdup _strdup
-#elif !defined(HAVE_STRDUP)
-#define system_strdup Curl_strdup
 #else
 #define system_strdup strdup
 #endif
@@ -68,7 +66,7 @@ curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
 curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup;
 curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
 #if defined(_WIN32) && defined(UNICODE)
-curl_wcsdup_callback Curl_cwcsdup = Curl_wcsdup;
+curl_wcsdup_callback Curl_cwcsdup = NULL; /* not use in test code */
 #endif
 
 #if defined(_MSC_VER) && defined(_DLL)