Fix warnings using Win32 Unicode functions instead of ANSI functions in curl lib

This commit is contained in:
David Capello 2013-11-10 12:36:26 -03:00
parent 01d79ddf9b
commit e3b594fc67
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ char *GetEnv(const char *variable)
char *temp = getenv(variable);
env[0] = '\0';
if(temp != NULL)
ExpandEnvironmentStrings(temp, env, sizeof(env));
ExpandEnvironmentStringsA(temp, env, sizeof(env));
return (env[0] != '\0')?strdup(env):NULL;
#else
char *env = getenv(variable);

View File

@ -630,8 +630,8 @@ const char *Curl_strerror(struct connectdata *conn, int err)
strncpy(buf, strerror(err), max);
else {
if(!get_winsock_error(err, buf, max) &&
!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, (DWORD)max, NULL))
!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, (DWORD)max, NULL))
snprintf(buf, max, "Unknown error %d (%#x)", err, err);
}
#endif