fnmatch improvements
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Jul 28 09:00:30 GMT 2023
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, <unicode/uchar.h> from ICU4C, is something completely different than
> > ISO C's <uchar.h>.
>
> 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
More information about the Cygwin
mailing list