mirror of
https://github.com/curl/curl.git
synced 2026-01-26 15:03:21 +00:00
tests/server: sync memory callbacks with lib/easy.c
Cherry-picked from #15000 Closes #16699
This commit is contained in:
parent
2283e40fc3
commit
533ba0089b
@ -50,6 +50,14 @@
|
||||
#define show(x) Curl_nop_stmt
|
||||
#endif
|
||||
|
||||
#if defined(UNDER_CE)
|
||||
#define system_strdup _strdup
|
||||
#elif !defined(HAVE_STRDUP)
|
||||
#define system_strdup Curl_strdup
|
||||
#else
|
||||
#define system_strdup strdup
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_DLL)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4232) /* MSVC extension, dllimport identity */
|
||||
@ -58,10 +66,10 @@
|
||||
curl_malloc_callback Curl_cmalloc = (curl_malloc_callback)malloc;
|
||||
curl_free_callback Curl_cfree = (curl_free_callback)free;
|
||||
curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
|
||||
curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)strdup;
|
||||
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_callback)_wcsdup;
|
||||
curl_wcsdup_callback Curl_cwcsdup = Curl_wcsdup;
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_DLL)
|
||||
|
||||
@ -25,6 +25,8 @@
|
||||
***************************************************************************/
|
||||
#include "server_setup.h"
|
||||
|
||||
#include "strdup.h"
|
||||
|
||||
#define GPE_NO_BUFFER_SPACE -2
|
||||
#define GPE_OUT_OF_MEMORY -1
|
||||
#define GPE_OK 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user