setupapi/tests: There is no strncasecmp() on Windows. So use CompareString() instead. (take 2)

Francois Gouget fgouget at free.fr
Sun May 27 18:12:12 CDT 2007


---

This time using CompareString() as suggested by Dmitry, which is much 
much better.

 dlls/setupapi/tests/misc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c
index 1c193e1..f8750b6 100644
--- a/dlls/setupapi/tests/misc.c
+++ b/dlls/setupapi/tests/misc.c
@@ -25,6 +25,7 @@
 
 #include "windef.h"
 #include "winbase.h"
+#include "winnls.h"
 #include "winuser.h"
 #include "winreg.h"
 #include "setupapi.h"
@@ -97,7 +98,7 @@ static BOOL check_format(LPSTR path, LPSTR inf)
 
     GetWindowsDirectory(check, MAX_PATH);
     lstrcat(check, format);
-    res = !strncasecmp(check, path, lstrlen(check)) &&
+    res = CompareString(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, check, -1, path, lstrlen(check)) == CSTR_EQUAL &&
           path[lstrlen(check)] != '\\';
 
     return (!inf) ? res : res && (inf == path + lstrlen(check) - 3);
-- 
1.4.4.4




More information about the wine-patches mailing list