Closed Bug 678423 Opened 14 years ago Closed 14 years ago

We need to conditionally define the 10.7 Cocoa symbols for 10.6 SDK and lower.

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: zbraniecki, Assigned: smichaud)

Details

Attachments

(1 file)

Spin off of bug 668953 (see bug 668953 comment 91) - we'll need to define 10.7 SDK cocoa symbols when using the 10.6 SDK or lower. - we need a way to tell which SDK we're using in compiled code
(In reply to Zbigniew Braniecki [:gandalf] from comment #0) > - we need a way to tell which SDK we're using in compiled code MAC_OS_X_VERSION_MAX_ALLOWED is exactly that, even though it's very confusingly named. We already use it, for example here: http://mxr.mozilla.org/mozilla-central/source/widget/src/cocoa/nsCocoaWindow.h#138 Using #if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 instead of #ifdef __LP64__ for the enum and interface definitions in nsChildView.h would be exactly the right thing to do here.
I now agree, Benoit. I'm about to try it out with a 10.7 SDK build on OS X 10.7. If that works (which it should), I'll post a patch and ask you to review.
> I now agree, Benoit. Oops. I now agree with both Benoit (bug 668963 comment #98) and Markus.
Attached patch FixSplinter Review
Assignee: nobody → smichaud
Attachment #552673 - Flags: review?(bgirard)
Attachment #552673 - Flags: review?(bgirard) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
> instead of > #ifdef __LP64__ As long as we continue to use the 10.5 SDK for 32-bit builds, we can't use the patch for bug 668953 in 32-bit builds -- the code compiles on 10.6, but won't link. That's why I used #ifdef __LP64__. Benoit suggested we might use MAC_OS_X_VERSION_MIN instead. But I'd feel obliged to double-check the docs and do test compiles, and we don't have time for that. I've been using __LP64__ all along, and know that it works. If we haven't replaced __LP64__ by the time we stop using the 10.5 SDK, we can just drop it -- it'll no longer be needed. There's been talk of dropping the 10.5 SDK even before we drop support for running on OS X 10.5. See bug 674655. But this might not work out.
(In reply to Steven Michaud from comment #6) > > instead of > > #ifdef __LP64__ > > As long as we continue to use the 10.5 SDK for 32-bit builds, we can't > use the patch for bug 668953 in 32-bit builds -- the code compiles on > 10.6, but won't link. Which part exactly? And why? Have you tested it? Sorry to be so inquiring, but I'd really like to understand this :)
It has to do with "blocks". See bug 668953 comment #67.
Oh, right. I had forgotten that the interface definition has blocks, too (and not only the chunk of code in nsChildView.mm). OK, thanks.
v.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: