public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: uchan0+newlib@gmail.com
Cc: newlib@sourceware.org
Subject: Re: Build error for wcwidth and gcvt
Date: Tue, 23 Jul 2019 07:57:00 -0000	[thread overview]
Message-ID: <20190723075655.GI21169@calimero.vinschen.de> (raw)
In-Reply-To: <CAPTj==UKBHL7eL4y3UsRHUrS1gS_TeS9nCS02vHkwesHcmsCeg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2198 bytes --]

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 <vinschen@redhat.com> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-07-23  7:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  8:50 Kota Uchida
2019-07-22  9:05 ` Corinna Vinschen
2019-07-22  9:47   ` Thomas Wolff
2019-07-22 10:51     ` Corinna Vinschen
2019-07-22 23:26       ` Kota Uchida
2019-07-23  7:57         ` Corinna Vinschen [this message]
2019-07-23 12:22           ` Kota Uchida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723075655.GI21169@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=newlib@sourceware.org \
    --cc=uchan0+newlib@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).