Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2011 08:36:57 +1300
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        freebsd-hackers@freebsd.org
Subject:   Unsigned wchar_t
Message-ID:  <20110328083657.35507caf@fubar.geek.nz>

next in thread | raw e-mail | index | archive | help
Hello hackers@

I'm working on getting FreeBSD working with the ARM EABI. As part of
this the Procedure Call Standard for the ARM Architecture (AAPCS)
defines wchar_t as an unsigned int.

Looking at sys/sys/_types.h rune_t, wchar_t and wint_t are of type
__ct_rune_t which is an int. Furthermore as per the comment above the
typedef rune_t must be signed to hold EOF of -1 and wchar_t must be the
same type as rune_t. Because wchar_t is defined as an unsigned int
would there be any issues with moving the typedef for __wchar_t to
<machine/_types.h> and changing it from __ct_rune_t to int with the
exception of the ARM EABI case?

Along with this WCHAR_MIN and WCHAR_MAX are defined both in <wchar.h>
and <machine/_stdint.h>. I would like to remove the copy from wchar.h
and add an include to machine/_stdint.h.

Would there be any problems with either of these or is there a better
place to put the __wchar_t typedef and define WCHAR_MIN and WCHAR_MAX?

Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110328083657.35507caf>