Re: Build error for wcwidth and gcvt

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl02vccACgkQ9TYGna5E
T6A/yA/+KrlBP2Px4nu3n9RilJKsKODMX6Ne9SPLHAuxnkA3rxFKufnWPhuQkh+F
xonvqcuQqoD2aPW+yKqB7lT9qoSzv4HBeaw8o11lCqMT3Ry9OsqGgIZlPXm4HKYi
0/9mtYNbBrHYIOpw7BOg/vfK/4MG4gBPwYjnOmH9IbCcpLQSh+4V6rHeRXvIpeTr
2wFjzxgBDe6CE+TItBSAphMmhPMjIv1o4mO6LXy/F0ybPWckX2os053WqEq1t/c9
jETfSPVCAUhuku7dceMl4ctPCUlO3j1C/ynXUj8yT0YdAFi6fZ8gI5MVss031X1B
02E8Ljz13xKr5qbBzWSCZGrmB6TKDz7tkfqozGgS8G5bcaSrcXt9vW4FoEXtmbB7
bLCKrszXWeVN3iW367iNaz3AH/hDyqsWGh6Cjwc5x6/fZ77HojVGZ2vR/x+xC8A+
W7Pm4x9rpmako23CrUXZwHPKkheJniwXI4u8oj+NhnEanaHoO3nA4AVF5uZzet/6
mrld0nJAW2hW57Ca2K19GrnhfGwqY04I0o2+MFxl04a+PXGo8X1qY/5sBDzkJ+zl
NgMSNZCsqpWWyZi8yP9OELzGBiBxcFJyUsMkkMyypC/mE/w8DaYR8SQ+Cu17p04d
sQc/jtlWD7C9HU0iBZ6lKCbDna5lOdvdZjcHlbkEJqmnhzYLXFU=
=xsVA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.