ntdll: Use _stricmp instead of strcasecmp.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Piotr Caban 2019-03-26 10:26:43 +01:00 committed by Alexandre Julliard
parent 9b52a967b7
commit 3588e5abd4
3 changed files with 11 additions and 9 deletions

View File

@ -1200,19 +1200,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
while (isspace(*value)) value++;
if ((s = strchr(value,'\n')))
*s='\0';
if (!strcasecmp(line, "CPU architecture"))
if (!_stricmp(line, "CPU architecture"))
{
if (isdigit(value[0]))
info->Level = atoi(value);
continue;
}
if (!strcasecmp(line, "CPU revision"))
if (!_stricmp(line, "CPU revision"))
{
if (isdigit(value[0]))
info->Revision = atoi(value);
continue;
}
if (!strcasecmp(line, "features"))
if (!_stricmp(line, "features"))
{
if (strstr(value, "vfpv3"))
user_shared_data->ProcessorFeatures[PF_ARM_VFP_32_REGISTERS_AVAILABLE] = TRUE;
@ -1268,19 +1268,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
while (isspace(*value)) value++;
if ((s = strchr(value,'\n')))
*s='\0';
if (!strcasecmp(line, "CPU architecture"))
if (!_stricmp(line, "CPU architecture"))
{
if (isdigit(value[0]))
info->Level = atoi(value);
continue;
}
if (!strcasecmp(line, "CPU revision"))
if (!_stricmp(line, "CPU revision"))
{
if (isdigit(value[0]))
info->Revision = atoi(value);
continue;
}
if (!strcasecmp(line, "Features"))
if (!_stricmp(line, "Features"))
{
if (strstr(value, "crc32"))
user_shared_data->ProcessorFeatures[PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE] = TRUE;
@ -2927,7 +2927,7 @@ static ULONG mhz_from_cpuinfo(void)
while ((s >= line) && isspace(*s)) s--;
*(s + 1) = '\0';
value++;
if (!strcasecmp(line, "cpu MHz")) {
if (!_stricmp(line, "cpu MHz")) {
sscanf(value, " %lf", &cmz);
break;
}

View File

@ -257,4 +257,6 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
/* string functions */
int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 );
#endif

View File

@ -889,7 +889,7 @@ void RELAY_SetupDLL( HMODULE module )
data->module = module;
data->base = exports->Base;
len = strlen( (char *)module + exports->Name );
if (len > 4 && !strcasecmp( (char *)module + exports->Name + len - 4, ".dll" )) len -= 4;
if (len > 4 && !_stricmp( (char *)module + exports->Name + len - 4, ".dll" )) len -= 4;
len = min( len, sizeof(data->dllname) - 1 );
memcpy( data->dllname, (char *)module + exports->Name, len );
data->dllname[len] = 0;
@ -1054,7 +1054,7 @@ void SNOOP_SetupDLL(HMODULE hmod)
(*dll)->nrofordinals = exports->NumberOfFunctions;
strcpy( (*dll)->name, name );
p = (*dll)->name + strlen((*dll)->name) - 4;
if (p > (*dll)->name && !strcasecmp( p, ".dll" )) *p = 0;
if (p > (*dll)->name && !_stricmp( p, ".dll" )) *p = 0;
size = exports->NumberOfFunctions * sizeof(SNOOP_FUN);
addr = NULL;