[cairo] Patches for MSVC.NET

Bill Baxter wbaxter at gmail.com
Wed Dec 14 20:34:48 PST 2005


Hi there.  Replies below.

On 12/15/05, Christian Biesinger <cbiesinger at web.de> wrote:
>
> Bill Baxter wrote:
> > The other thing I wasn't sure about was what to do about FontConfig
> stuff.
> > I just ifdef'ed it out for MSVC, because as far as I can tell there
> isn't a
> > version of fontconfig for Win32.  Not sure if that will have any ill
> > effects.  Not even really sure what fontconfig does.
>
> Why are you building those files if you ifdef them out anyway?


So things like cairo-ft are not necessary on Windows?  I was thinking
cairo-ft was the main font handling code.  There aren't many comments in the
code to give one an idea of which bits are supposed to work on which
platforms, so I just tried to compile it all at first, and anything that
seemed obviously wrong I removed (like Atsui, e.g.).  Those font files
_almost_ work on Windows with the exception of fontconfig calls, so I just
assumed someone had been sloppy about portability issues there.

Some notes on the patches:
> +++ test/cairo-test.c   14 Dec 2005 23:44:11 -0000
> -    if (access (ref_name, F_OK) != 0) {
> +#ifndef _WIN32
> +    if (access (ref_name, F_OK) != 0)
> +#endif
> +    {
>
> Seems like you could use _access (similar to _sprintf):
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__access.2c_._waccess.asp


Ah, ok.  I'll admit I was rather slipshod with my mods on the test
programs.  I wasn't really thinking to have those included back in.  For
instance I arbitrarily changed the delay parameter on glitz the test program
to be tenths of seconds rather than whole seconds because I got tired of
waiting 1second for every test.

src/cairo-font-subset.c
> -static inline unsigned short
> +static __inline unsigned short
>
> Why not INLINE from cairoint.h? Although it seems to me like this file
> can currently only be used with Fontconfig.


Yeh, good catch I think that was one of the first files I modified, before I
realized the __inline__ thing was so widespread and before I found there was
an INLINE macro used elsewhere.

--bb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20051215/294419e7/attachment.html


More information about the cairo mailing list