Re: wchar_t support at kernel level ?
Re: wchar_t support at kernel level ?
- Subject: Re: wchar_t support at kernel level ?
- From: Brian Bergstrand <email@hidden>
- Date: Mon, 12 Nov 2001 16:41:42 -0600
At 2:02 PM -0800 11/12/01, Godfrey van der Linden wrote:
I know our runtime support pretty well and we have done nothing in
the kernel to support C++ wchar_t. As long as you don't require
runtime support then you will be fine. All I can suggest is try
compiling a sample kext and attempt to link it and see what happens.
None of our infrastructure will understand whar_ts.
Not only that, but if you will be using wchar_t's for what most
people using them for (Unicode strings), there are two other
pitfalls. First, GCC is the only mainstream compiler that defines
wchar_t's as 32bit int's instead of 16bit ints. This will bite you in
the ass if you have code that does the following:
wchar_t ustr[] = L"Hello World";
There are other cases where this causes trouble, but the above is the
most common.
Secondly, if I remember correctly, the kernel deals with all path
names in UTF-8, so if you are using wchar_t to interact with the
filesystem layer at all, you may have to do some translation.
Godfrey
At 14:30 -0500 01-11-12, Francis Bouchard wrote:
I guess my subject makes it clear! Is there any support at kernel level for
the wchar_t type. My problem is I'm _porting_ (if I can use this term) a
driver that makes use of it. So I looked at the EC++ spec and it says that
it is a reserved keyword but not part of EC++.
--
Brian Bergstrand
<
http://www.classicalguitar.net/brian/> PGP Key ID: 0xB6C7B6A2
No! Try not. Do, or do not. There is no try. - Yoda