Date: Thu, 7 Jun 2012 13:20:29 +0200 From: =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman@gmail.com> To: Andrew Turner <andrew@fubar.geek.nz> Cc: hackers@freebsd.org Subject: Re: Wide character types Message-ID: <CAKw7uVjLQ_E94Q=Bq3Aye9GoLjrb2qiLVej3ZOFvhGRQA7Wq5g@mail.gmail.com> In-Reply-To: <20120606220333.28686407@fubar.geek.nz> References: <20120606220333.28686407@fubar.geek.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKw7uVjLQ_E94Q=Bq3Aye9GoLjrb2qiLVej3ZOFvhGRQA7Wq5g>