summaryrefslogtreecommitdiff
path: root/lib/curl_memory.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-07-19 06:44:46 +0200
committerYang Tse <yangsita@gmail.com>2013-07-19 12:33:10 +0200
commit6bcacff1a52df5818c2a12807de6e7ca896da508 (patch)
tree9b32191db1fdcf2f3a78df13b4c3ee732b51b088 /lib/curl_memory.h
parent12d01cb6fa914519d1ced0223cd9ff96a2634de9 (diff)
downloadcurl-6bcacff1a52df5818c2a12807de6e7ca896da508.tar.gz
WIN32 MemoryTracking: require UNICODE for wide strdup code support
Diffstat (limited to 'lib/curl_memory.h')
-rw-r--r--lib/curl_memory.h13
1 files changed, 7 insertions, 6 deletions
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