Re: [PATCH] newlib/libc/ctype: Bypass _jp2uc/_uc2jp if _MB_CAPABLE is not set
Corinna Vinschen <[email protected]> Fri, 23 Jan 2026 10:49:23 +0100
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Jan 20 10:40, Corinna Vinschen wrote: > Hi Andrew, > > On Jan 19 12:03, [email protected] wrote: > > From: Andrew Oates <[email protected]> > > > > 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