Re: Build error for wcwidth and gcvt
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl01lRMACgkQ9TYGna5E T6C3ZA/8D7BFt5jK4uBkxPSNlGbvhM+7N4YTeDhN1FHR8xMKUCHQKip/jgEeo8f8 /I2dZAfFfHYQ80atJ3l+qj4bCYl5nFOBN/QH8M1dnSpEonScI6GpUtH6gdTV1p4A jrRVT75wdm3NS/uNHj+DP5rThWlZ0pKV/DZxEyWx6fxC+BZj+NBtF9YBtWigQB0E wBg7XkuKWZOpdf+dvL48fkZtvkNUxuXdbr4Gs5kqS9JENj+nIt9c8zUD7up1AvKR lepCGnhcNkO3D3gRo4uvrP3iFOaqVm/tLgpQNJ6QLgBilofDw/IYclJrcTpUUdDW yKv7fdALeVkh4nTPT2lTkUPf9FmIRlChPPF1SXgRcNs5rLHKbLMXzCveYVgrjciH GV/bxZhrtILLjhrMnfsuHyTtd1eg86fjjSjuEF/5eyo9Gtd/NZCqwiclmzPd8kN0 jQIU1z1Bx6nrmLL8z1GYj6zE5vlx0CDMYAdtyFAXcY1n+25bNZvgMv3wxjD/hSmg Uyz4C9qka651ql8jyq3rmF7tE1u0v4IQU9Xd76aLDldhQmRKZO6F91qdAf4nKOEE xXaVTt2jZmMRRK0oWi/CIMuUCFSFvPUesTi4XJzKLozLIX66ItbZTe8wJXjfuFqn eI4maw6yezsC4qQtIR7ltUpw3Byg1T9BiJV/dOslqMZOfoSCz/g= =4MFz -----END PGP SIGNATURE-----