summaryrefslogtreecommitdiff
path: root/libs/libcurl
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /libs/libcurl
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'libs/libcurl')
-rw-r--r--libs/libcurl/src/curl_memory.h8
-rw-r--r--libs/libcurl/src/curl_ntlm_msgs.c22
-rw-r--r--libs/libcurl/src/curl_schannel.c10
-rw-r--r--libs/libcurl/src/http_negotiate_sspi.c6
-rw-r--r--libs/libcurl/src/memdebug.h8
-rw-r--r--libs/libcurl/src/socks_sspi.c4
6 files changed, 29 insertions, 29 deletions
diff --git a/libs/libcurl/src/curl_memory.h b/libs/libcurl/src/curl_memory.h
index e3cdc721c4..adc45cd639 100644
--- a/libs/libcurl/src/curl_memory.h
+++ b/libs/libcurl/src/curl_memory.h
@@ -119,11 +119,11 @@ extern curl_wcsdup_callback Curl_cwcsdup;
# define wcsdup(ptr) Curl_cwcsdup(ptr)
# undef _wcsdup
# define _wcsdup(ptr) Curl_cwcsdup(ptr)
-# undef _tcsdup
-# define _tcsdup(ptr) Curl_cwcsdup(ptr)
+# undef wcsdup
+# define wcsdup(ptr) Curl_cwcsdup(ptr)
# else
-# undef _tcsdup
-# define _tcsdup(ptr) Curl_cstrdup(ptr)
+# undef wcsdup
+# define wcsdup(ptr) Curl_cstrdup(ptr)
# endif
#endif
diff --git a/libs/libcurl/src/curl_ntlm_msgs.c b/libs/libcurl/src/curl_ntlm_msgs.c
index 125ce6e496..bc88feadb6 100644
--- a/libs/libcurl/src/curl_ntlm_msgs.c
+++ b/libs/libcurl/src/curl_ntlm_msgs.c
@@ -371,9 +371,9 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
if(!useranddomain.tchar_ptr)
return CURLE_OUT_OF_MEMORY;
- user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('\\'));
+ user.const_tchar_ptr = wcschr(useranddomain.const_tchar_ptr, TEXT('\\'));
if(!user.const_tchar_ptr)
- user.const_tchar_ptr = _tcschr(useranddomain.const_tchar_ptr, TEXT('/'));
+ user.const_tchar_ptr = wcschr(useranddomain.const_tchar_ptr, TEXT('/'));
if(user.tchar_ptr) {
domain.tchar_ptr = useranddomain.tchar_ptr;
@@ -387,22 +387,22 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
}
/* setup ntlm identity's user and length */
- dup_user.tchar_ptr = _tcsdup(user.tchar_ptr);
+ dup_user.tchar_ptr = wcsdup(user.tchar_ptr);
if(!dup_user.tchar_ptr) {
Curl_unicodefree(useranddomain.tchar_ptr);
return CURLE_OUT_OF_MEMORY;
}
ntlm->identity.User = dup_user.tbyte_ptr;
- ntlm->identity.UserLength = curlx_uztoul(_tcslen(dup_user.tchar_ptr));
+ ntlm->identity.UserLength = curlx_uztoul(wcslen(dup_user.tchar_ptr));
dup_user.tchar_ptr = NULL;
/* setup ntlm identity's domain and length */
- dup_domain.tchar_ptr = malloc(sizeof(TCHAR) * (domlen + 1));
+ dup_domain.tchar_ptr = malloc(sizeof(wchar_t) * (domlen + 1));
if(!dup_domain.tchar_ptr) {
Curl_unicodefree(useranddomain.tchar_ptr);
return CURLE_OUT_OF_MEMORY;
}
- _tcsncpy(dup_domain.tchar_ptr, domain.tchar_ptr, domlen);
+ wcsncpy(dup_domain.tchar_ptr, domain.tchar_ptr, domlen);
*(dup_domain.tchar_ptr + domlen) = TEXT('\0');
ntlm->identity.Domain = dup_domain.tbyte_ptr;
ntlm->identity.DomainLength = curlx_uztoul(domlen);
@@ -414,14 +414,14 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
passwd.tchar_ptr = Curl_convert_UTF8_to_tchar((char *)passwdp);
if(!passwd.tchar_ptr)
return CURLE_OUT_OF_MEMORY;
- dup_passwd.tchar_ptr = _tcsdup(passwd.tchar_ptr);
+ dup_passwd.tchar_ptr = wcsdup(passwd.tchar_ptr);
if(!dup_passwd.tchar_ptr) {
Curl_unicodefree(passwd.tchar_ptr);
return CURLE_OUT_OF_MEMORY;
}
ntlm->identity.Password = dup_passwd.tbyte_ptr;
ntlm->identity.PasswordLength =
- curlx_uztoul(_tcslen(dup_passwd.tchar_ptr));
+ curlx_uztoul(wcslen(dup_passwd.tchar_ptr));
dup_passwd.tchar_ptr = NULL;
Curl_unicodefree(passwd.tchar_ptr);
@@ -433,7 +433,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
ntlm->p_identity = NULL;
status = s_pSecFn->AcquireCredentialsHandle(NULL,
- (TCHAR *) TEXT("NTLM"),
+ (wchar_t *) TEXT("NTLM"),
SECPKG_CRED_OUTBOUND, NULL,
ntlm->p_identity, NULL, NULL,
&ntlm->handle, &tsDummy);
@@ -448,7 +448,7 @@ CURLcode Curl_ntlm_create_type1_message(const char *userp,
buf.pvBuffer = ntlmbuf;
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle, NULL,
- (TCHAR *) TEXT(""),
+ (wchar_t *) TEXT(""),
ISC_REQ_CONFIDENTIALITY |
ISC_REQ_REPLAY_DETECT |
ISC_REQ_CONNECTION,
@@ -624,7 +624,7 @@ CURLcode Curl_ntlm_create_type3_message(struct SessionHandle *data,
status = s_pSecFn->InitializeSecurityContext(&ntlm->handle,
&ntlm->c_handle,
- (TCHAR *) TEXT(""),
+ (wchar_t *) TEXT(""),
ISC_REQ_CONFIDENTIALITY |
ISC_REQ_REPLAY_DETECT |
ISC_REQ_CONNECTION,
diff --git a/libs/libcurl/src/curl_schannel.c b/libs/libcurl/src/curl_schannel.c
index 68139db586..e137e05c5a 100644
--- a/libs/libcurl/src/curl_schannel.c
+++ b/libs/libcurl/src/curl_schannel.c
@@ -120,7 +120,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
#ifdef ENABLE_IPV6
struct in6_addr addr6;
#endif
- TCHAR *host_name;
+ wchar_t *host_name;
CURLcode code;
infof(data, "schannel: SSL/TLS connection with %s port %hu (step 1/3)\n",
@@ -197,7 +197,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
memset(connssl->cred, 0, sizeof(struct curl_schannel_cred));
/* http://msdn.microsoft.com/en-us/library/windows/desktop/aa374716.aspx */
- sspi_status = s_pSecFn->AcquireCredentialsHandle(NULL, (TCHAR *)UNISP_NAME,
+ sspi_status = s_pSecFn->AcquireCredentialsHandle(NULL, (wchar_t *)UNISP_NAME,
SECPKG_CRED_OUTBOUND, NULL, &schannel_cred, NULL, NULL,
&connssl->cred->cred_handle, &connssl->cred->time_stamp);
@@ -288,7 +288,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
SecBuffer inbuf[2];
SecBufferDesc inbuf_desc;
SECURITY_STATUS sspi_status = SEC_E_OK;
- TCHAR *host_name;
+ wchar_t *host_name;
CURLcode code;
bool doread;
@@ -1075,7 +1075,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex)
SecBuffer outbuf;
SecBufferDesc outbuf_desc;
CURLcode code;
- TCHAR *host_name;
+ wchar_t *host_name;
DWORD dwshut = SCHANNEL_SHUTDOWN;
InitSecBuffer(&Buffer, SECBUFFER_TOKEN, &dwshut, sizeof(dwshut));
@@ -1257,7 +1257,7 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex)
if(result == CURLE_OK) {
if(data->set.ssl.verifyhost) {
- TCHAR cert_hostname_buff[128];
+ wchar_t cert_hostname_buff[128];
xcharp_u hostname;
xcharp_u cert_hostname;
DWORD len;
diff --git a/libs/libcurl/src/http_negotiate_sspi.c b/libs/libcurl/src/http_negotiate_sspi.c
index 1381d5292d..997e161165 100644
--- a/libs/libcurl/src/http_negotiate_sspi.c
+++ b/libs/libcurl/src/http_negotiate_sspi.c
@@ -91,7 +91,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
SecBuffer in_sec_buff;
unsigned long context_attributes;
TimeStamp lifetime;
- TCHAR *sname;
+ wchar_t *sname;
int ret;
size_t len = 0, input_token_len = 0;
bool gss = FALSE;
@@ -138,7 +138,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
if(!neg_ctx->output_token) {
PSecPkgInfo SecurityPackage;
- ret = s_pSecFn->QuerySecurityPackageInfo((TCHAR *) TEXT("Negotiate"),
+ ret = s_pSecFn->QuerySecurityPackageInfo((wchar_t *) TEXT("Negotiate"),
&SecurityPackage);
if(ret != SEC_E_OK)
return -1;
@@ -168,7 +168,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
neg_ctx->status =
s_pSecFn->AcquireCredentialsHandle(NULL,
- (TCHAR *) TEXT("Negotiate"),
+ (wchar_t *) TEXT("Negotiate"),
SECPKG_CRED_OUTBOUND, NULL, NULL,
NULL, NULL, neg_ctx->credentials,
&lifetime);
diff --git a/libs/libcurl/src/memdebug.h b/libs/libcurl/src/memdebug.h
index bd565c8dcf..c5bee0d865 100644
--- a/libs/libcurl/src/memdebug.h
+++ b/libs/libcurl/src/memdebug.h
@@ -95,11 +95,11 @@ CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);
# define wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
# undef _wcsdup
# define _wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
-# undef _tcsdup
-# define _tcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
+# undef wcsdup
+# define wcsdup(ptr) curl_dowcsdup(ptr, __LINE__, __FILE__)
# else
-# undef _tcsdup
-# define _tcsdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
+# undef wcsdup
+# define wcsdup(ptr) curl_dostrdup(ptr, __LINE__, __FILE__)
# endif
#endif
diff --git a/libs/libcurl/src/socks_sspi.c b/libs/libcurl/src/socks_sspi.c
index 0313de3334..ed5024cd27 100644
--- a/libs/libcurl/src/socks_sspi.c
+++ b/libs/libcurl/src/socks_sspi.c
@@ -141,7 +141,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
cred_handle.dwUpper = 0;
status = s_pSecFn->AcquireCredentialsHandle(NULL,
- (TCHAR *) TEXT("Kerberos"),
+ (wchar_t *) TEXT("Kerberos"),
SECPKG_CRED_OUTBOUND,
NULL,
NULL,
@@ -160,7 +160,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
/* As long as we need to keep sending some context info, and there's no */
/* errors, keep sending it... */
for(;;) {
- TCHAR *sname;
+ wchar_t *sname;
sname = Curl_convert_UTF8_to_tchar(service_name);
if(!sname)