Commit 7122c9d4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr110: Try SNAME when matching locale.

Based on patch by Daniel Lehman. Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 040d41df
...@@ -63,11 +63,13 @@ static void test_setlocale(void) ...@@ -63,11 +63,13 @@ static void test_setlocale(void)
for(i=0; i<sizeof(names)/sizeof(*names); i++) { for(i=0; i<sizeof(names)/sizeof(*names); i++) {
ret = p_setlocale(LC_ALL, names[i]); ret = p_setlocale(LC_ALL, names[i]);
todo_wine ok(!!ret, "expected success, but got NULL\n"); ok(ret != NULL, "expected success, but got NULL\n");
if(ret) ok(!strcmp(ret, names[i]), ok(!strcmp(ret, names[i]), "expected %s, got %s\n", names[i], ret);
"expected %s, got %s\n", names[i], ret);
} }
ret = p_setlocale(LC_ALL, "en-us.1250");
ok(!ret, "setlocale(en-us.1250) succeeded (%s)\n", ret);
p_setlocale(LC_ALL, "C"); p_setlocale(LC_ALL, "C");
} }
......
...@@ -245,7 +245,7 @@ int _setmbcp_l(int cp, LCID lcid, MSVCRT_pthreadmbcinfo mbcinfo) ...@@ -245,7 +245,7 @@ int _setmbcp_l(int cp, LCID lcid, MSVCRT_pthreadmbcinfo mbcinfo)
if(lcid == -1) { if(lcid == -1) {
sprintf(bufA, format, newcp); sprintf(bufA, format, newcp);
mbcinfo->mblcid = MSVCRT_locale_to_LCID(bufA, NULL); mbcinfo->mblcid = MSVCRT_locale_to_LCID(bufA, NULL, NULL);
} else { } else {
mbcinfo->mblcid = lcid; mbcinfo->mblcid = lcid;
} }
......
...@@ -264,7 +264,8 @@ struct __thread_data { ...@@ -264,7 +264,8 @@ struct __thread_data {
frame_info *frame_info_head; frame_info *frame_info_head;
void *unk8[6]; void *unk8[6];
LCID cached_lcid; LCID cached_lcid;
int unk9[3]; BOOL cached_sname;
int unk9[2];
DWORD cached_cp; DWORD cached_cp;
char cached_locale[131]; char cached_locale[131];
void *unk10[100]; void *unk10[100];
...@@ -277,7 +278,7 @@ typedef struct __thread_data thread_data_t; ...@@ -277,7 +278,7 @@ typedef struct __thread_data thread_data_t;
extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN; extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
LCID MSVCRT_locale_to_LCID(const char*, unsigned short*) DECLSPEC_HIDDEN; LCID MSVCRT_locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN;
extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN; extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN;
extern unsigned int MSVCRT___lc_codepage; extern unsigned int MSVCRT___lc_codepage;
extern int MSVCRT___lc_collate_cp; extern int MSVCRT___lc_collate_cp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment