|
From: | Nicholas Clifton |
Subject: | Re: wcsncasecmp undefined up to Mac OS X 10.7 |
Date: | Tue, 24 Feb 2015 09:54:55 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi Stefan,
As this function is first available starting from OS X 10.7, I tried to solve the problem using towlower and wcsncmp.
The problem with these functions is that towlower takes a wint_t argument but wcsncmp takes wchar_t arguments. A colleague of mine however pointer out that you can do:
res = towlower (awc) - towlower (bwc) and achieve the same effect as calling wcsncmp.
I do not know how to enable a HAVE_WCTYPE_H test in the corresponding configure.
Fortunately I do. :-)Please can you try out the attached patch. If it works in your environment that I will check it in. I have already checked the patch locally and it works for builds on a Linux host.
Cheers Nick
macosx.wcsncasecmp.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |