cabinet: Include wine/port.h for strcasecmp().

Dmitry Timoshkov dmitry at codeweavers.com
Sun Feb 3 06:04:02 CST 2008


"Kirill K. Smirnov" <lich at math.spbu.ru> wrote:

>>The rules are as follows:
> 
>> * For case insensitive comparisons of 'windows strings', a Windows 
>>   function must be used (stricmp() or similar).
> 
> and
> 
>>In this case, KERNEL32 lstrcmpiA() would be more appropriate. In
>>general, using stricmp() in Win32 code should be discouraged since it
>>may cause unnecessary dependency on MSVCRT.
> 
> Wine lstrcmpi is broken (bug #10767). There are cases GLIBC strcasecmp and 
> Windows lstrcmpi handle correctly but wine not. Should we fix this first?

The bug 10767 is a corner case, and nothing prevents using kernel32 APIs
to perform string comparisons in Wine (which we do). I don't think that
you want to use glibc string comparison functions to compare for instance
cyrillic strings in CP1251 (Wine) and UTF-8 (Linux) encodings. Still, the bug
10767 has an explanation for an incompatibility, so the problem should be
either solved on unicode.org side, or by patching libs/wine/cpmap.pl.

-- 
Dmitry.



More information about the wine-devel mailing list