On Wed, 25 Dec 2002, Dan Kegel wrote:
I get the following compiler warnings in dlls/ntdll/tests/rtlstr.c:
gcc -c -I. -I. -I../../../include -I../../../include -g -O2 -Wall -mpreferred-stack-boundary=2 -fPIC -DNONAMELESSUNION -DNONAMELESSSTRUCT -D_REENTRANT -o rtlstr.o rtlstr.c rtlstr.c: In function `test_RtlInitUnicodeString': rtlstr.c:110: warning: implicit declaration of function `wcscmp' rtlstr.c: In function `test_RtlUnicodeStringToInteger': rtlstr.c:175: warning: wchar_t format, different type arg (arg 3)
[...]
- what .h file should tests/rtlstr.c include to get wcscmp? Posix says one thing, MSDN says a similar thing, but I want to get the path right.
It would be better to use strcmpW instead. AFAIK, wcslen will either be the glibc version, i.e. it takes 4 bytes chars, or it is the msvcrt implementation and thus requires that you link with msvcrt.dll. By using strcmpW you will avoid both problems (and many tests already use strlenW which comes from the same place, our wine/unicode.h).