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 - SDL 1.2 hg does not compile against the 10.5 SDK
Summary: SDL 1.2 hg does not compile against the 10.5 SDK
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 1.2
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 15:55 UTC by Alexei Svitkine
Modified: 2012-01-05 16:21 UTC (History)
1 user (show)

See Also:


Attachments
Patch (937 bytes, patch)
2012-01-05 15:56 UTC, Alexei Svitkine
Details | Diff
Patch (2.63 KB, patch)
2012-01-05 16:06 UTC, Alexei Svitkine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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