set cairo endianness macros in a sane way

RESOLVED FIXED

Status

()

Core
Graphics
--
major
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: dbaron, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

I fixed bug 364794 in a very hacky way to get Mac builds working again.  This is a bug to fix it properly.  In bug 364794 comment 7, I wrote:

I just checked in a hack fix to cairo-platform.h for this yesterday evening,
while bugzilla was down.

The basic problem is that nothing is responsible for defining any of
the endianness macros that cairo uses.  There's a standard autoconf
macro for WORDS_BIGENDIAN, but it makes cross-compilation harder for
some people doing a cross-compile (which includes universal builds
on Mac).  There's a custom autoconf macro in the cairo tree for
FLOAT_WORDS_BIGENDIAN.  Somehow cairo worked (enough) on Mac PPC
even though WORDS_BIGENDIAN was not defined, but the latest update
requires FLOAT_WORDS_BIGENDIAN to be correct for _cairo_lround.  Or
something like that -- I was debugging relatively quickly.

We could probably just make our cairo depend on prcpucfg.h, which
defines IS_BIG_ENDIAN.

But for now I checked in a really quick hack, since the Mac compiler
defines __BIG_ENDIAN__.

But we really need a long term solution for defining WORDS_BIGENDIAN
and FLOAT_WORDS_BIGENDIAN.

Comment 1

11 years ago
Created attachment 253585 [details] [diff] [review]
Patch v1

The endian issue also exists in the SPARC platform for the MACRO isn't defined for it(Bug 367094). And it's a bug for all the BIG_ENDIAN platforms actually.

This patch goes with the choice to include prcpucfg.h.
Attachment #253585 - Flags: review?(vladimir)

Comment 2

11 years ago
The Firefox SPARC build is blocked by this issue. If we can fix it before the code freeze of Firefox 3.0a2, that will be great.

Ask for blocking1.9.
Flags: blocking1.9?
Comment on attachment 253585 [details] [diff] [review]
Patch v1

Looks fine to me, thanks!
Attachment #253585 - Flags: review?(vladimir) → review+

Comment 4

11 years ago
Checking in gfx/cairo/cairo/src/cairo-platform.h;
/cvsroot/mozilla/gfx/cairo/cairo/src/cairo-platform.h,v  <--  cairo-platform.h
new revision: 1.13; previous revision: 1.12
done
Doesn't this patch want to be committed to gfx/cairo?

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Flags: blocking1.9?
Resolution: --- → FIXED

Updated

11 years ago
Duplicate of this bug: 367094
You need to log in before you can comment on or make changes to this bug.