Commit 3588e5ab authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ntdll: Use _stricmp instead of strcasecmp.

parent 9b52a967
...@@ -1200,19 +1200,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) ...@@ -1200,19 +1200,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
while (isspace(*value)) value++; while (isspace(*value)) value++;
if ((s = strchr(value,'\n'))) if ((s = strchr(value,'\n')))
*s='\0'; *s='\0';
if (!strcasecmp(line, "CPU architecture")) if (!_stricmp(line, "CPU architecture"))
{ {
if (isdigit(value[0])) if (isdigit(value[0]))
info->Level = atoi(value); info->Level = atoi(value);
continue; continue;
} }
if (!strcasecmp(line, "CPU revision")) if (!_stricmp(line, "CPU revision"))
{ {
if (isdigit(value[0])) if (isdigit(value[0]))
info->Revision = atoi(value); info->Revision = atoi(value);
continue; continue;
} }
if (!strcasecmp(line, "features")) if (!_stricmp(line, "features"))
{ {
if (strstr(value, "vfpv3")) if (strstr(value, "vfpv3"))
user_shared_data->ProcessorFeatures[PF_ARM_VFP_32_REGISTERS_AVAILABLE] = TRUE; user_shared_data->ProcessorFeatures[PF_ARM_VFP_32_REGISTERS_AVAILABLE] = TRUE;
...@@ -1268,19 +1268,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info) ...@@ -1268,19 +1268,19 @@ static inline void get_cpuinfo(SYSTEM_CPU_INFORMATION* info)
while (isspace(*value)) value++; while (isspace(*value)) value++;
if ((s = strchr(value,'\n'))) if ((s = strchr(value,'\n')))
*s='\0'; *s='\0';
if (!strcasecmp(line, "CPU architecture")) if (!_stricmp(line, "CPU architecture"))
{ {
if (isdigit(value[0])) if (isdigit(value[0]))
info->Level = atoi(value); info->Level = atoi(value);
continue; continue;
} }
if (!strcasecmp(line, "CPU revision")) if (!_stricmp(line, "CPU revision"))
{ {
if (isdigit(value[0])) if (isdigit(value[0]))
info->Revision = atoi(value); info->Revision = atoi(value);
continue; continue;
} }
if (!strcasecmp(line, "Features")) if (!_stricmp(line, "Features"))
{ {
if (strstr(value, "crc32")) if (strstr(value, "crc32"))
user_shared_data->ProcessorFeatures[PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE] = TRUE; user_shared_data->ProcessorFeatures[PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE] = TRUE;
...@@ -2927,7 +2927,7 @@ static ULONG mhz_from_cpuinfo(void) ...@@ -2927,7 +2927,7 @@ static ULONG mhz_from_cpuinfo(void)
while ((s >= line) && isspace(*s)) s--; while ((s >= line) && isspace(*s)) s--;
*(s + 1) = '\0'; *(s + 1) = '\0';
value++; value++;
if (!strcasecmp(line, "cpu MHz")) { if (!_stricmp(line, "cpu MHz")) {
sscanf(value, " %lf", &cmz); sscanf(value, " %lf", &cmz);
break; break;
} }
......
...@@ -257,4 +257,6 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN; ...@@ -257,4 +257,6 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*); NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR); void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
/* string functions */
int __cdecl _stricmp( LPCSTR str1, LPCSTR str2 );
#endif #endif
...@@ -889,7 +889,7 @@ void RELAY_SetupDLL( HMODULE module ) ...@@ -889,7 +889,7 @@ void RELAY_SetupDLL( HMODULE module )
data->module = module; data->module = module;
data->base = exports->Base; data->base = exports->Base;
len = strlen( (char *)module + exports->Name ); 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 ); len = min( len, sizeof(data->dllname) - 1 );
memcpy( data->dllname, (char *)module + exports->Name, len ); memcpy( data->dllname, (char *)module + exports->Name, len );
data->dllname[len] = 0; data->dllname[len] = 0;
...@@ -1054,7 +1054,7 @@ void SNOOP_SetupDLL(HMODULE hmod) ...@@ -1054,7 +1054,7 @@ void SNOOP_SetupDLL(HMODULE hmod)
(*dll)->nrofordinals = exports->NumberOfFunctions; (*dll)->nrofordinals = exports->NumberOfFunctions;
strcpy( (*dll)->name, name ); strcpy( (*dll)->name, name );
p = (*dll)->name + strlen((*dll)->name) - 4; 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); size = exports->NumberOfFunctions * sizeof(SNOOP_FUN);
addr = NULL; addr = NULL;
......
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