This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build error for wcwidth and gcvt


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]