Unsigned wchar_t

Stefan Farfeleder stefan at fafoe.narf.at
Sun Mar 27 20:22:50 UTC 2011


On Mon, Mar 28, 2011 at 08:36:57AM +1300, Andrew Turner wrote:
> 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?

The C standard specifies that both <wchar.h> and <stdint.h> shall define
WCHAR_MIN and WCHAR_MAX. You cannot simply include <machine/_stdint.h>
from <wchar.h> because the former contains a lot of other macros.

Stefan


More information about the freebsd-hackers mailing list