setupapi/tests: There is no strncascmp() on Windows. So we must use
msvcrt's _strnicmp() function instead.
Francois Gouget
fgouget at free.fr
Sun May 27 06:35:18 CDT 2007
---
There are other alternatives:
* we could have an #ifdef _MSC_VER to switch between strncasecmp() and
_strnicmp().
* we could reimplement _strnicmp().
* or maybe the test could be modified to not need this function at all?
dlls/setupapi/tests/Makefile.in | 4 +++-
dlls/setupapi/tests/misc.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/setupapi/tests/Makefile.in b/dlls/setupapi/tests/Makefile.in
index e629670..17195c7 100644
--- a/dlls/setupapi/tests/Makefile.in
+++ b/dlls/setupapi/tests/Makefile.in
@@ -3,7 +3,9 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = setupapi.dll
-IMPORTS = setupapi advapi32 kernel32
+IMPORTS = setupapi advapi32 kernel32 msvcrt
+MODCFLAGS = @BUILTINFLAG@
+EXTRAINCL = -I$(TOPSRCDIR)/include/msvcrt
CTESTS = \
devinst.c \
diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c
index 1c193e1..1e34e1c 100644
--- a/dlls/setupapi/tests/misc.c
+++ b/dlls/setupapi/tests/misc.c
@@ -97,7 +97,7 @@ static BOOL check_format(LPSTR path, LPSTR inf)
GetWindowsDirectory(check, MAX_PATH);
lstrcat(check, format);
- res = !strncasecmp(check, path, lstrlen(check)) &&
+ res = !_strnicmp(check, path, lstrlen(check)) &&
path[lstrlen(check)] != '\\';
return (!inf) ? res : res && (inf == path + lstrlen(check) - 3);
--
1.4.4.4
More information about the wine-patches
mailing list