From 2c90fe6bf145e97be44f377ce85d0e8f96ab61ea Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 22 Mar 2006 22:33:23 +0000 Subject: [PATCH] Close off warning about setAppleMenu on Mac OS X 10.4 SDK. Fixes Bugzilla #97. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401596 --- src/main/macosx/SDLMain.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/macosx/SDLMain.m b/src/main/macosx/SDLMain.m index 66e30f14b..fd5196278 100644 --- a/src/main/macosx/SDLMain.m +++ b/src/main/macosx/SDLMain.m @@ -10,6 +10,13 @@ #import /* for MAXPATHLEN */ #import +/* For some reaon, Apple removed setAppleMenu from the headers in 10.4, + but the method still is there and works. To avoid warnings, we declare + it ourselves here. */ +@interface NSApplication(SDL_Missing_Methods) +- (void)setAppleMenu:(NSMenu *)menu; +@end + /* Use this flag to determine whether we use SDLMain.nib or not */ #define SDL_USE_NIB_FILE 0 @@ -82,7 +89,7 @@ static NSString *getApplicationName(void) char parentdir[MAXPATHLEN]; CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url); - if (CFURLGetFileSystemRepresentation(url2, true, parentdir, MAXPATHLEN)) { + if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, MAXPATHLEN)) { assert ( chdir (parentdir) == 0 ); /* chdir to the binary app's parent */ } CFRelease(url);