Bug 15343

Summary: cairo-fixed-private.h: LL suffix is not supported in MSVC6
Product: cairo Reporter: Kazuki IWAMOTO <iwm>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED INVALID QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.5.21   
Hardware: All   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch for latest cairo-fixed-private.h

Description Kazuki IWAMOTO 2008-04-03 11:40:20 UTC
In cairo-fixed-private.h(104), 'LL' is used as 64-bit integer-suffix.
But 'LL' is not supported in MSVC6.
We must use 'i64' suffix in MSVC.

I suggest the following macro.
#ifdef _MSC_VER
# define CAIRO_MAGIC_NUMBER_FIXED ((1i64 << (52 - CAIRO_FIXED_FRAC_BITS)) * 1.5)
#else
# define CAIRO_MAGIC_NUMBER_FIXED ((1LL << (52 - CAIRO_FIXED_FRAC_BITS)) * 1.5)
#endif
Comment 1 Kazuki IWAMOTO 2008-04-09 11:15:30 UTC
Created attachment 15787 [details] [review]
patch for latest cairo-fixed-private.h
Comment 2 Carl Worth 2008-04-09 11:57:53 UTC
Here's what cairo/README says about MSVC versions prior to 7.1:

            MSVC versions earlier than 7.1 are known to miscompile
            parts of cairo and pixman, and so should be avoided. MSVC
            7.1 or later, including the free Microsoft Visual Studio
            Express editions, produce correct code.

So there are known problems that will cause big failures. Given that,
I consider MSVC6 as officially unsupported for cairo, and not worth
putting in non-standard things like 1i64.

If we did decide to start supporting this compiler, I'd definitely
prefer to see a change that did it without duplicating any code. And
if you can come up with something like that, I'd even be willing to
accept it in spite of the larger bugs with MSVC6, (but I thought you
should be aware of them).

-Carl

Comment 3 Carl Worth 2008-04-09 12:02:48 UTC
Closing as INVALID.

-Carl

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.