We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1363

Summary: SDL 1.2 hg does not compile against the 10.5 SDK
Product: SDL Reporter: Alexei Svitkine <alexei.svitkine>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 1.2   
Hardware: x86   
OS: Mac OS X 10.6   
Attachments: Patch
Patch

Description Alexei Svitkine 2012-01-05 15:55:47 UTC
Open SDL.xcodeproject and change SDK to 10.5 and try to build. It will fail.

There are two errors:

1. Incorrect SDK version check in src/cdrom/macosx/AudioFilePlayer.h, which redefines FSIORefNum. FSIORefNum is actually defined in the 10.5 SDK, but not in the 10.4 one.

2. Code in SDL_QuartzVideo.m that tries to access NSScreen's private _frame ivar, which fails to link on 64-bit. See: https://www.google.com/?q=%22_OBJC_IVAR_%24_NSScreen._frame%22 

Attached patch fixes both of these problems.
Comment 1 Alexei Svitkine 2012-01-05 15:56:12 UTC
Created attachment 762 [details]
Patch
Comment 2 Alexei Svitkine 2012-01-05 16:06:34 UTC
Created attachment 763 [details]
Patch

Here's a better patch that also puts a runtime OS version check around the code that sets NSScreen's _frame.
Comment 3 Sam Lantinga 2012-01-05 16:21:33 UTC
Great fix, thanks!
http://hg.libsdl.org/SDL/rev/6f3a2bb301d6