From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c010h-0005GA-El for qemu-devel@nongnu.org; Fri, 28 Oct 2016 02:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c010e-0001Mw-EU for qemu-devel@nongnu.org; Fri, 28 Oct 2016 02:51:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38988) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c010e-0001Mf-8e for qemu-devel@nongnu.org; Fri, 28 Oct 2016 02:51:24 -0400 From: Markus Armbruster References: <1477568774-4817-1-git-send-email-kraxel@redhat.com> <1477583747.9075.30.camel@redhat.com> <20161027155858.GA2508@var.bordeaux.inria.fr> <20161027163656.GA6263@var.home> <20161027170232.GD6263@var.home> Date: Fri, 28 Oct 2016 08:51:20 +0200 In-Reply-To: <20161027170232.GD6263@var.home> (Samuel Thibault's message of "Thu, 27 Oct 2016 19:02:32 +0200") Message-ID: <87mvhp55lj.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] curses: build with -std=gnu99 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: Peter Maydell , Gerd Hoffmann , QEMU Developers Samuel Thibault writes: > Peter Maydell, on Thu 27 Oct 2016 17:52:17 +0100, wrote: >> On 27 October 2016 at 17:36, Samuel Thibault wrote: >> > Peter Maydell, on Thu 27 Oct 2016 17:14:52 +0100, wrote: >> >> On 27 October 2016 at 16:58, Samuel Thibault wrote: >> >> > Gerd Hoffmann, on Thu 27 Oct 2016 17:55:47 +0200, wrote: >> >> >> /home/kraxel/projects/qemu/ui/curses.c:627:18: error: universal >> >> >> character names are only valid in C++ and C99 [-Werror] >> >> >> case L'\u23bd': >> >> > >> >> > Another way could be to assume unicode encoding of wchar_t characters >> >> > (which looks very reasonable to me) and just write "case 0x23bd:". >> >> >> >> Does this still work if you're using curses on mingw32? >> > >> > Windows' wchar_t uses unicode encoding, yes (and its limitation to 16bit >> > doesn't pose problem to the values we care about). >> >> On the other hand apparently FreeBSD and Solaris have a wchar_t >> whose encoding is locale-dependent: >> >> http://www.thecodingforums.com/threads/wchar_t-is-useless.806149/#post-4398211 > > UURrgll... So we can't use L'\u23bd' on such systems, it would just not > work either, we have to use iconv to get these right... I guess we can if they actually bother to conform to C99. 6.4.3 Universal character names: The universal character name \Unnnnnnnn designates the character whose eight-digit short identifier (as specified by ISO/IEC 10646) is nnnnnnnn. Similarly, the universal character name \unnnn designates the character whose four-digit short identifier is nnnn (and whose eight-digit short identifier is 0000nnnn). Note that it doesn't say here that L'\u23bd' should be equal to 0x23bd.