From: Kenneth Whistler (email@example.com)
Date: Fri Sep 22 2006 - 19:19:52 CDT
> Ken Whistler wrote:
> > It is perfectly fine for UTF-32, if you do this correctly.
> > For example:
> > typedef unsigned short UShort16;
> > typedef unsigned int UInt32;
> > typedef UShort16 utf16char;
> > typedef UInt32 utf32char;
> Please don't do this! Please do
> #include <stdint.h>
> typedef uint16_t utf16char;
> typedef uint32_t utf32char;
> > At that point, you can safely port your entire code to *any*
> > platform, with at most one compiler-specific #ifdef in your
> > fundamental header file.
> With at most zero compiler-specific #ifdefs.
Well, sure, *if* your compilers are all completely up-to-date.
Depending on how wide you have to cast your platform portability,
and how old the compilers are that you have to use, this may
or may not be possible. Many older compilers will simply
barf on #include <stdint.h>, including two of the ones I currently
must use. ;-)
This archive was generated by hypermail 2.1.5 : Fri Sep 22 2006 - 19:21:32 CDT