[PATCH] newlib/libc/ctype: Bypass _jp2uc/_uc2jp if _MB_CAPABLE is not set
Corinna Vinschen
vinschen@redhat.com
Fri Jan 23 09:49:23 GMT 2026
On Jan 20 10:40, Corinna Vinschen wrote:
> Hi Andrew,
>
> On Jan 19 12:03, andrew@andrewoates.com wrote:
> > From: Andrew Oates <andrew@andrewoates.com>
> >
> > Currently, if an application uses towctrans or towctrans_l with a newlib
> > compiled without _MB_CAPABLE, it will fail to link due to _jp2uc/_uc2jp
> > being undefined. This extends the cygwin behavior to all
> > non-_MB_CAPABLE builds.
>
> I don't think this is the right thing to do. Check with other wide-char
> functions calling _jp2uc_l, for instance, iswprint_l(). The functions
> fall back to the equivalent functions for singlebyte charsets.
>
> Since there's no `toctrans' function, we have to call toupper/tolower
> from here. We can also exlude building the touupper/toulower functions
> in the same file, which reduces the footprint of the file for not
> _MB_CAPABLE systems.
>
> So I'd propose the following patch instead:
Pushed.
Corinna
More information about the Newlib
mailing list