Date: Wed, 06 Jun 2012 22:03:33 +1200 From: Andrew Turner <andrew@fubar.geek.nz> To: hackers@freebsd.org Subject: Wide character types Message-ID: <20120606220333.28686407@fubar.geek.nz>
next in thread | raw e-mail | index | archive | help
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? Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120606220333.28686407>