diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 4282fed7ff3..1e057113deb 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -97,7 +97,7 @@ static void remap_synonym(char *name) unsigned int i; for (i = 0; i < ARRAY_SIZE(_country_synonyms); i += 2) { - if (!strcasecmp(_country_synonyms[i],name)) + if (!MSVCRT__stricmp(_country_synonyms[i],name)) { TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]); strcpy(name, _country_synonyms[i+1]); @@ -140,7 +140,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOO /* Partial matches are only allowed on language/country names */ len = strlen(cmp); if(exact || len<=3) - return !strcasecmp(cmp, buff); + return !MSVCRT__stricmp(cmp, buff); else return !strncasecmp(cmp, buff, len); } @@ -264,7 +264,7 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s if(!search.search_country[0] && !search.search_codepage[0]) remap_synonym(search.search_language); - if(!strcasecmp(search.search_country, "China")) + if(!MSVCRT__stricmp(search.search_country, "China")) strcpy(search.search_country, "People's Republic of China"); EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING, @@ -291,10 +291,10 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s memcpy(search.found_codepage,search.search_codepage,MAX_ELEM_LEN); else { /* Special codepage values: OEM & ANSI */ - if (!strcasecmp(search.search_codepage,"OCP")) { + if (!MSVCRT__stricmp(search.search_codepage,"OCP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE, search.found_codepage, MAX_ELEM_LEN); - } else if (!strcasecmp(search.search_codepage,"ACP")) { + } else if (!MSVCRT__stricmp(search.search_codepage,"ACP")) { GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, search.found_codepage, MAX_ELEM_LEN); } else diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 918fff80eed..bc528f1b230 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -123,7 +123,7 @@ static inline int u_strcmp( const unsigned char *s1, const unsigned char *s2 ) static inline int u_strcasecmp( const unsigned char *s1, const unsigned char *s2 ) { - return strcasecmp( (const char*)s1, (const char*)s2 ); + return MSVCRT__stricmp( (const char*)s1, (const char*)s2 ); } static inline int u_strncmp( const unsigned char *s1, const unsigned char *s2, MSVCRT_size_t len ) diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index ed12deeaee8..10f3dc1b97c 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1148,6 +1148,7 @@ int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t); int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t); int __cdecl MSVCRT__towupper_l(MSVCRT_wint_t,MSVCRT__locale_t); int __cdecl MSVCRT__towlower_l(MSVCRT_wint_t,MSVCRT__locale_t); +int __cdecl MSVCRT__stricmp(const char*, const char*); int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t); int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t); diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 219ce501099..17eee1c2cc9 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -641,7 +641,7 @@ int CDECL MSVCRT__stricoll_l( const char* str1, const char* str2, MSVCRT__locale locinfo = locale->locinfo; if(!locinfo->lc_handle[MSVCRT_LC_COLLATE]) - return strcasecmp(str1, str2); + return MSVCRT__stricmp(str1, str2); return CompareStringA(locinfo->lc_handle[MSVCRT_LC_COLLATE], NORM_IGNORECASE, str1, -1, str2, -1)-CSTR_EQUAL; }