From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68922 invoked by alias); 23 Jul 2019 12:22:53 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 68913 invoked by uid 89); 23 Jul 2019 12:22:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=23=e6?= X-HELO: mail-wr1-f67.google.com Received: from mail-wr1-f67.google.com (HELO mail-wr1-f67.google.com) (209.85.221.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jul 2019 12:22:51 +0000 Received: by mail-wr1-f67.google.com with SMTP id x4so42920170wrt.6 for ; Tue, 23 Jul 2019 05:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=SxJm6j8P7fRZyxiBllwpJmePsswQFA+79W2PEDA2enU=; b=hlGjDar0+wxHpt8TAcu8Hu7kMaInq3XPOXaFxfU9YWXpaR1hKzQXu+y8ieXR0IBY9g O4C6VafJ8K+TTyB/Nk7LYe7htgmrv5YJfluqB6yvjDYa9kc4W9iMJFgWrgVk4U1qKriq 2ceNisATBwGa/Fc6+F0/zJ/LbR7Ca/hWZ7UpbOLdV3uBaiYH3oL2ZSHCv9iSiByqBU11 LQpGXg+zSJsizvzcJmdcGuF2aA4/ha+t5776BSEzKdJldwBxEFe3kXVwRgzRsgqZH2kr 1pR69yaffo+3Tdet5h/hoZ0uXPAYfA7uz4xlhZoATVXr2iGlYNW2oRKBrd087VW98zue GnDg== MIME-Version: 1.0 References: <20190722090456.GC21169@calimero.vinschen.de> <20190722105059.GD21169@calimero.vinschen.de> <20190723075655.GI21169@calimero.vinschen.de> In-Reply-To: <20190723075655.GI21169@calimero.vinschen.de> From: Kota Uchida Date: Tue, 23 Jul 2019 12:22:00 -0000 Message-ID: Subject: Re: Build error for wcwidth and gcvt To: newlib@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019/txt/msg00331.txt.bz2 Thank you, Corinna. I fixed my patch and re-submitted it. https://sourceware.org/ml/newlib/2019/msg00330.html I also fixed a patch for compilation error of efgcvt.c following Yaakov's advice. https://sourceware.org/ml/newlib/2019/msg00329.html 2019=E5=B9=B47=E6=9C=8823=E6=97=A5(=E7=81=AB) 16:56 Corinna Vinschen : > > 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 = 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 w= char_t > > > > has 32 bits there. > > > > On cygwin, however, wchar_t was defined to have only 16 bits, corre= sponding > > > > to the Windows UTF-16 encoding. > > > > The wcwidth parameter type wint_t is needed to support width enquir= ies 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 sourc= e, 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