From 6bcacff1a52df5818c2a12807de6e7ca896da508 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 19 Jul 2013 06:44:46 +0200 Subject: WIN32 MemoryTracking: require UNICODE for wide strdup code support --- lib/curl_memory.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/curl_memory.h') diff --git a/lib/curl_memory.h b/lib/curl_memory.h index 4bba008c9..e3cdc721c 100644 --- a/lib/curl_memory.h +++ b/lib/curl_memory.h @@ -87,7 +87,7 @@ extern curl_free_callback Curl_cfree; extern curl_realloc_callback Curl_crealloc; extern curl_strdup_callback Curl_cstrdup; extern curl_calloc_callback Curl_ccalloc; -#ifdef WIN32 +#if defined(WIN32) && defined(UNICODE) extern curl_wcsdup_callback Curl_cwcsdup; #endif @@ -114,14 +114,15 @@ extern curl_wcsdup_callback Curl_cwcsdup; #define free(ptr) Curl_cfree(ptr) #ifdef WIN32 -# undef wcsdup -# define wcsdup(ptr) Curl_cwcsdup(ptr) -# undef _wcsdup -# define _wcsdup(ptr) Curl_cwcsdup(ptr) -# undef _tcsdup # ifdef UNICODE +# undef wcsdup +# define wcsdup(ptr) Curl_cwcsdup(ptr) +# undef _wcsdup +# define _wcsdup(ptr) Curl_cwcsdup(ptr) +# undef _tcsdup # define _tcsdup(ptr) Curl_cwcsdup(ptr) # else +# undef _tcsdup # define _tcsdup(ptr) Curl_cstrdup(ptr) # endif #endif -- cgit v1.2.3