This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Build error for wcwidth and gcvt
- From: Thomas Wolff <towo at towo dot net>
- To: newlib at sourceware dot org
- Date: Mon, 22 Jul 2019 11:46:55 +0200
- Subject: Re: Build error for wcwidth and gcvt
- References: <CAPTj==UgGr6rja8_cYc1O7CVPxmdvHY6ira3LECUVQK9V6dmaA@mail.gmail.com> <20190722090456.GC21169@calimero.vinschen.de>
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
Please send them here in `git format-patch style.
Thanks,
Corinna