From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 9D4C138555A0; Fri, 28 Jul 2023 09:00:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D4C138555A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1690534834; bh=REcyA6qWfdzwUb8gv194Uvt5H3KtY7FIOsXvksqfiFk=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=lU8tSkUf0NxzM0QuqWfK++3IGfe+DXgfXxQ0LsOoc71eOf23Mu0LkQzo2ktVuw2Yx 7qkBk+IoQ1/329ckaL7iOkKNBzyxFUyUCL516h1uDIFOi2CwwjC/dJMPTZ98bwLfFX 7Y3ocuvtngm79biWsu1Rz0UZvgF5nZiZWwkSOFag= Received: by calimero.vinschen.de (Postfix, from userid 500) id 42CC7A80C7B; Fri, 28 Jul 2023 11:00:30 +0200 (CEST) Date: Fri, 28 Jul 2023 11:00:30 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: fnmatch improvements Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <3884636.3uDm00564X@nimes> <4813639.AzxliCZhLW@nimes> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: On Jul 27 16:17, Brian Inglis via Cygwin wrote: > On 2023-07-27 15:22, Bruno Haible wrote: > > Brian Inglis wrote: > > > It was added in C99 TR19769, integrated in C/++11 > > > > Yes. > > > > > available in libicu-devel: > > > > > > https://cplusplus.com/reference/cuchar/ > > > > > > https://open-std.org/jtc1/sc22/open/n3579.pdf > > > > > > https://open-std.org/jtc1/sc22/wg14/www/docs/n1326.pdf > > > > > > https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf#page=416 > > > > > > $ find /usr/include/ -name uchar.h > > > /usr/include/unicode/uchar.h > > > > > > $ cygcheck -f /usr/include/unicode/uchar.h > > > libicu-devel-72.1-1 > > > > This file, from ICU4C, is something completely different than > > ISO C's . > > This would then be a *newlib* AT sourceware DOT org addition so we could use > FreeBSD's: We can use FreeBSDs version as role model, but we can't use the code verbatim, given FreeBSD assumes sizeof(wchar_t) == 4. Since that's a Cygwin-only issue (2 byte wchar_t, that is), I guess we should merge the code into the Cygwin code base, rather than newlib. For mbrtoc32/c32rtomb, we can use the wirtomb/mbrtowi function I introduced for the globbing code. If we do that, I think the functions should actually be renamed accordingly and the globbing code should use uchar32_t rather than wint_t. Also, it might be helpful to add the mbrtoc8/c8rtomb extensions at one point, which are missing in FreeBSD. Either way, I'd be grateful for patches in this area. Corinna