Bug 15343 - cairo-fixed-private.h: LL suffix is not supported in MSVC6
Summary: cairo-fixed-private.h: LL suffix is not supported in MSVC6
Status: RESOLVED INVALID
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.5.21
Hardware: All Windows (All)
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-03 11:40 UTC by Kazuki IWAMOTO
Modified: 2008-04-09 12:02 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for latest cairo-fixed-private.h (581 bytes, patch)
2008-04-09 11:15 UTC, Kazuki IWAMOTO
Details | Splinter Review

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.