From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 7 11:20:36 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D03A106566C for ; Thu, 7 Jun 2012 11:20:36 +0000 (UTC) (envelope-from vhaisman@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 527FF8FC19 for ; Thu, 7 Jun 2012 11:20:36 +0000 (UTC) Received: by dadv36 with SMTP id v36so776971dad.13 for ; Thu, 07 Jun 2012 04:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=/vLu1nwYDCH+DpS+bwAEjp1xUSRk4blnD5f0nYOKbuU=; b=qv9UHoTqhRqP1/h9xofiuBHn/XL4HE3c5kyZjKZGFIFKuaonelr4KOQV7Cw0cKo8Vc CMcZlNO2U0Lmyi8yC+4CPRVsdkM1n1pFRQJOHxJXyAz6gGQv454XH4Hhr2ptimNY1a4F qQEEF0dMXcxbTwlXawq/BdI+Tll8v6FzqMlvsJNe5W6t3kJjlKap/YGvjhxfF417fS74 cekzWtNmbzZNKMTYS2jSmIm6a8+XrgVFpjYI883+yxuO20nIp3vro1FuLfjdSI/DWzAN ql0ezU0k9WW0ChRBeoQ5yAsrMAjDp90WwuMot2+8V10tl8Lp9PuJElaiLWtAvyVyVIYc 1j8w== MIME-Version: 1.0 Received: by 10.68.136.68 with SMTP id py4mr572825pbb.151.1339068029976; Thu, 07 Jun 2012 04:20:29 -0700 (PDT) Received: by 10.68.136.193 with HTTP; Thu, 7 Jun 2012 04:20:29 -0700 (PDT) In-Reply-To: <20120606220333.28686407@fubar.geek.nz> References: <20120606220333.28686407@fubar.geek.nz> Date: Thu, 7 Jun 2012 13:20:29 +0200 Message-ID: From: =?UTF-8?Q?V=C3=A1clav_Zeman?= To: Andrew Turner Content-Type: text/plain; charset=UTF-8 Cc: hackers@freebsd.org Subject: Re: Wide character types X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2012 11:20:36 -0000 On 6 June 2012 12:03, Andrew Turner wrote: > I've been working on getting the ARM EABI working with FreeBSD. > > As part of the EABI spec the Procedure Call Standard for the ARM > Architecture (AAPCS) defines wchar_t as either an unsigned int or an > unsigned short with the former as the preferred type. FreeBSD defines > wchar_t as a __wchar_t, which is defined as a __ct_rune_t, which is > defined as an int. > > wint_t and rune_t are also defined in terms of __ct_rune_t. wint_t must > be a signed type as it needs to hols a WEOF which is defined as -1. > > The type of rune_t appears to need to be the same as wint_t as the tow* > and isw* functions are defined as taking a wint_t by the documentation > but __ct_rune_t in the code and compare this value against __rune_t > values. > > My question is am I correct in thinking rune_t and wint_t should be > defined as __ct_rune_t with __ct_rune_t defined as an int while wchar_t > should be defined as an unsigned int in ARM EABI and defined as an int > elsewhere? Non-authoritative answer: I think you conclusion is correct. I think that freebsd-standards@freebsd.org would be a better audience for this kind of question. -- VZ