summaryrefslogtreecommitdiff
path: root/lib/curl_multibyte.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-04-13 22:55:51 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2020-05-14 18:13:27 +0200
commita55c835e6b99f96e595ad11888a2714447998378 (patch)
tree2fe89e663917b6746b8ff3f994a901507400042e /lib/curl_multibyte.c
parent600a8cded447cd7118ed50142c576567c0cf5158 (diff)
downloadcurl-a55c835e6b99f96e595ad11888a2714447998378.tar.gz
curl_multibyte: add to curlx
This will also be needed in the tool and tests. Ref: https://github.com/curl/curl/pull/3758#issuecomment-482197512 Closes https://github.com/curl/curl/pull/3784
Diffstat (limited to 'lib/curl_multibyte.c')
-rw-r--r--lib/curl_multibyte.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/lib/curl_multibyte.c b/lib/curl_multibyte.c
index e3843449b..2cf70e325 100644
--- a/lib/curl_multibyte.c
+++ b/lib/curl_multibyte.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -20,24 +20,21 @@
*
***************************************************************************/
-#include "curl_setup.h"
-
-#include <curl/curl.h>
+/*
+ * This file is 'mem-include-scan' clean. See test 1132.
+ */
-#if defined(USE_WIN32_IDN) || ((defined(USE_WINDOWS_SSPI) || \
- defined(USE_WIN32_LDAP)) && defined(UNICODE))
+#include "curl_setup.h"
- /*
- * MultiByte conversions using Windows kernel32 library.
- */
+#if defined(WIN32)
#include "curl_multibyte.h"
-#include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
+/*
+ * MultiByte conversions using Windows kernel32 library.
+ */
-wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8)
+wchar_t *curlx_convert_UTF8_to_wchar(const char *str_utf8)
{
wchar_t *str_w = NULL;
@@ -59,7 +56,7 @@ wchar_t *Curl_convert_UTF8_to_wchar(const char *str_utf8)
return str_w;
}
-char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
+char *curlx_convert_wchar_to_UTF8(const wchar_t *str_w)
{
char *str_utf8 = NULL;
@@ -81,4 +78,4 @@ char *Curl_convert_wchar_to_UTF8(const wchar_t *str_w)
return str_utf8;
}
-#endif /* USE_WIN32_IDN || ((USE_WINDOWS_SSPI || USE_WIN32_LDAP) && UNICODE) */
+#endif /* WIN32 */