Re: Build error for wcwidth and gcvt
Kota Uchida <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAPTj==VWhKuAM3498KJ7P15zW1UD+nL7Tak-JtWnRMi9MwnBbg@mail.gmail.com> |
Thank you, Corinna. I fixed my patch and re-submitted it. https://sourceware.org/ml/newlib/2019/msg00330.html I also fixed a patch for compilation error of efgcvt.c following Yaakov's advice. https://sourceware.org/ml/newlib/2019/msg00329.html 2019年7月23日(火) 16:56 Corinna Vinschen <[email protected]>: > > On Jul 23 08:26, Kota Uchida wrote: > > I got understand about wchar_t data sizes. > > I fixed my patch and sent it: > > https://sourceware.org/ml/newlib/2019/msg00322.html > > > > > The header should be kept untouched, of course. > > > > The header file (wchar.h) must be fixed in order to > > match types between the header and .c file. > > No, the header needs to stick to wchar_t since that's what the standard > says. The wint_t for Cygwin is an internal implementation detail. > > > Corinna > > > > > > On Mon, Jul 22, 2019 at 7:51 PM Corinna Vinschen <[email protected]> wrote: > > > > > > On Jul 22 11:46, Thomas Wolff wrote: > > > > On 22.07.2019 11:04, Corinna Vinschen wrote: > > > > > On Jul 20 17:50, Kota Uchida wrote: > > > > > > Hi All, > > > > > > > > > > > > This is my first mail to newlib community. > > > > > > I've send this mail because I found some build errors > > > > > > on newlib's master branch. > > > > > > > > > > > > Cygwin: unbreak the build with GCC 7 > > > > > > 6b7723a83032bd355d3c529d957fe209cb35b4d9 > > > > > > > > > > > > I encountered 2 errors about wcwidth and gcvt. > > > > > > I've pushed simple patches to forked repository: > > > > > > https://github.com/uchan-nos/newlib-cygwin/commits/fix-build > > > > The first patch is not correct: > > > > - wcwidth (const wint_t wc) > > > > + wcwidth (const wchar_t wc) > > > > > > > > Note the manual page. > > > > Even if you see the wchar_t definition for Linux/POSIX, note that wchar_t > > > > has 32 bits there. > > > > On cygwin, however, wchar_t was defined to have only 16 bits, corresponding > > > > to the Windows UTF-16 encoding. > > > > The wcwidth parameter type wint_t is needed to support width enquiries for > > > > non-BMP characters; > > > > changing it would seriously deprive the function of part of its > > > > capabilities. > > > > Thomas > > > > > > We might need a generic and a Cygwin-specific definition in the source, i.e. > > > > > > #ifdef __CYGWIN__ > > > use wint_t > > > #else > > > use wchar_t > > > #endif > > > > > > The header should be kept untouched, of course. > > > > > > > > > Corinna > > > > > > -- > > > Corinna Vinschen > > > Cygwin Maintainer > > > Red Hat > > -- > Corinna Vinschen > Cygwin Maintainer > Red Hat