Closed Bug 297162 Opened 19 years ago Closed 19 years ago

Fix non-neutral endian code in mac gfx font code

Categories

(Core Graveyard :: GFX: Mac, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

Details

Attachments

(1 file, 1 obsolete file)

This fix was provided by Apple in a set of patches for building and running
Firefox on Intel-based Macs. We have some font code that assumes big endian, and
this patch fixes that.
Attached patch Apple fix v1.0 (obsolete) — Splinter Review
Attachment #185751 - Flags: superreview?(sfraser_bugs)
Attachment #185751 - Flags: review+
Attachment #185751 - Flags: superreview?(sfraser_bugs) → superreview+
Attachment #185751 - Flags: approval1.8b3?
Comment on attachment 185751 [details] [diff] [review]
Apple fix v1.0

a=chofmann
Attachment #185751 - Flags: approval1.8b3? → approval1.8b3+
landed on trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I backed this out because it doesn't build pre-tiger; the byte-swap routines are
not available.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Those routines should be available, but they're in a header that's apparently
not included by default on Jaguar or Panther.  (I didn't test Tiger either, but
I assume Apple did.)

Their patch will probably work as-is with #include <libkern/OSByteOrder.h>.

The PR_* macros are a more circuitous way to eventually wind up at the same
OSSwap*, which uses inline asm where necessary.
The PR_* guys are functions, not macros - best to use OSSwap* directly.
Forget that, bringing in libkern brings in parts of the kernel ABI.  We don't
need that pain in the butt.  Let's use CFSwapInt16BigToHost, which also gives us
inline asm swapping where needed.  Tested with SDK 10.2.7.  Will have it in
patch form later.
This is functionally identical but works on all supported build platforms.
Attachment #187304 - Flags: superreview?(sfraser_bugs)
Attachment #187304 - Flags: review?(joshmoz)
Attachment #187304 - Flags: approval1.8b3?
Attachment #187304 - Flags: superreview?(sfraser_bugs) → superreview+
Attachment #187304 - Flags: review?(joshmoz) → review+
Attachment #185751 - Attachment is obsolete: true
Attachment #187304 - Flags: approval1.8b3? → approval1.8b3+
landed on trunk
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: