Re: [PATCH 1/6] Add string comparison functions that respect the ignore_case variable.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 18, 2010 at 15:52, Joshua Jensen <jjensen@xxxxxxxxxxxxxxxxx> wrote:
>  ----- Original Message -----
> From: Ævar Arnfjörð Bjarmason
> Date: 8/18/2010 6:53 AM
>>
>> On Wed, Aug 18, 2010 at 12:52, Ævar Arnfjörð Bjarmason<avarab@xxxxxxxxx>
>>  wrote:
>>>
>>> On Mon, Aug 16, 2010 at 19:38, Johannes Sixt<j6t@xxxxxxxx>  wrote:
>>>>
>>>> +       return fnmatch(pattern, string, flags | (ignore_case ?
>>>> FNM_CASEFOLD : 0));
>>>
>>> On Solaris 10:
>>>
>>> dir.c: In function `fnmatch_icase':
>>> dir.c:34: error: `FNM_CASEFOLD' undeclared (first use in this function)
>>> dir.c:34: error: (Each undeclared identifier is reported only once
>>> dir.c:34: error: for each function it appears in.)
>>
>> Actually, reading the fnmatch manpage it's not just Solaris, but all
>> non-GNU systems:
>>
>>        FNM_CASEFOLD - If this flag (a GNU extension) is set, the pattern
>> is matched case-insensitively
>
> Well, that's no good.  :(
>
> Thanks for the research.  It helps tremendously.
>
> One easy way out of this situation would be to duplicate the GNU fnmatch()
> into fnmatch_icase().  I have not looked at the source code, so it may not
> be possible.  If it can be copied in, does anyone object?
>
> I'll also look for a non-GNU function that may work.

According to some further research at least FreeBSD and NetBSD have
copied this GNU extension. You may find their versions easier to
integrate.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]