This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++ v3 wants more libio functions now
- To: bosch at gnat dot com, briareos at lokigames dot com
- Subject: Re: libstdc++ v3 wants more libio functions now
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 26 Jul 2000 14:15:47 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org
> From: "Geert Bosch" <bosch@gnat.com>
> To: "Michael Vance" <briareos@lokigames.com>, "Mike Stump" <mrs@windriver.com>
> Date: Wed, 26 Jul 2000 08:16:21 -0400
> Reply-To: "Geert Bosch" <bosch@gnat.com>
> On Tue, 25 Jul 2000 12:06:16 -0700, Michael Vance wrote:
> Is wchar_t still defined as a four-byte quantity in GCC? If so, is
> there a document or archived mlist discussion somewhere documenting
> why this is? I know that the spec says it is
> "implementation-dependent", but every implementation I'm aware of does
> it as a 2-byte wide character. This was a nasty PITA when porting some
> SDK code during Solder of Fortune... does GCC support some locale that
> demands four-byte wide characters?
> I am just fixing the code in GNAT for interfacing with C wide
> characters. GNAT assumed that C wchar_t was a 16-bit quantity, but
> we were notified by a user that this actually was defined as
> Integer'Size in GCC.
The user's comment is too simplistic for someone to code against.
The size can be found by compiling something like:
#include <stddef.h>
int main() { printf ("%d\n", sizeof(wchar_t)); }
in C for C++. That will give either 2 or 4 on all systems I know
about (carefully excluding one that is totally broken).
Assuming you know what size it is, is wrong.
> What do the different Unices expect in their system calls?
Different answers.