[tlbuild] Graphite support on cygwin

Peter Breitenlohner peb at mppmu.mpg.de
Fri Oct 2 13:43:11 CEST 2009


On Fri, 2 Oct 2009, Ken Brown wrote:

>> First question is whether your wchar_t is in fact a 16-bit type; if not, 
>> there's a configure error, and it shouldn't be trying to compile this code 
>> at all (note the #if ... #else ... #endif). But assuming sizeof(wchar_t) is 
>> indeed 2 bytes, there might be a compiler option to make it less strict 
>> about the type compatibility, or else you could add a typecast (but don't 
>> do this if the sizes don't actually match!). But this is really a Graphite 
>> issue that should be fixed upstream.
>
> The configuration test shows that sizeof(wchar_t) is 2.  So I tried a 
> typecast:
>
> --- FileFont.cpp.orig   2009-03-18 11:32:42.000000000 -0400
> +++ FileFont.cpp        2009-10-01 19:36:08.267707200 -0400
> @@ -208,7 +208,7 @@
>                        }
> //             }
> #else
> -               m_stuFaceName.assign(rgchwFace);
> +               m_stuFaceName.assign((const wchar_t*)rgchwFace);
>                // VS 2005 needs this:
>                //for (int cch16 = 0; cch16 < cchw; cch16++)
>                //      m_stuFaceName.push_back(rgchwFace[cch16]);
>
> With this cast, the build completes. ...

Hi Ken,

this might be sufficient for the moment, but ultimately there should be
a test for 'SIZEOF_WCHAR_T == 2' and some other solution when
sizeof(wchar_t) is neither 2 nor 4.

> ....  I did this before seeing Peter's 
> patches, but I don't see any point in doing more right now.

As I said, these patches are intended for post-TL2009 and their only putpose
is to avoid warnings.

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>


More information about the tlbuild mailing list