From f1a26205761b578c3f91f8204c428673a0e6264c Mon Sep 17 00:00:00 2001 From: asvitkine <> Date: Tue, 28 Dec 2010 02:50:55 +0000 Subject: [PATCH] - Add a prefix header which is used in place of SheepShaver's config.h to allow correct compilation of the Universal Binary. - Update project to work with Xcode on Snow Leopard. - Add missing #include --- .../src/MacOSX/Launcher/LauncherPrefix.h | 42 +++++++++++++++++++ .../project.pbxproj | 4 ++ .../MacOSX/Launcher/VMSettingsController.mm | 4 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 SheepShaver/src/MacOSX/Launcher/LauncherPrefix.h diff --git a/SheepShaver/src/MacOSX/Launcher/LauncherPrefix.h b/SheepShaver/src/MacOSX/Launcher/LauncherPrefix.h new file mode 100644 index 00000000..992c034d --- /dev/null +++ b/SheepShaver/src/MacOSX/Launcher/LauncherPrefix.h @@ -0,0 +1,42 @@ +/* + * LauncherPrefix.h + * + * Copyright (C) 2010 Alexei Svitkine + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef LAUNCHERPREFIX_H +#define LAUNCHERPREFIX_H + +#define CONFIG_H +#define STDC_HEADERS +#define SIZEOF_DOUBLE 8 +#define SIZEOF_FLOAT 4 +#define SIZEOF_INT 4 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_SHORT 2 + +#ifdef __LP64__ +#define SIZEOF_VOID_P 8 +#define SIZEOF_LONG 8 +#else +#define SIZEOF_VOID_P 4 +#define SIZEOF_LONG 4 +#endif + +#define loff_t off_t + +#endif /* LAUNCHERPREFIX_H */ diff --git a/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj index dc1d5b81..154fb01f 100644 --- a/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj +++ b/SheepShaver/src/MacOSX/Launcher/SheepShaverLauncher.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ /* Begin PBXFileReference section */ 084186AF0B3A0515004B1F63 /* VMSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = VMSettingsController.h; sourceTree = ""; }; 084186B00B3A0515004B1F63 /* VMSettingsController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = VMSettingsController.mm; sourceTree = ""; }; + 085339D612C9874400345D35 /* LauncherPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LauncherPrefix.h; sourceTree = SOURCE_ROOT; }; 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 08AAB16C102614D5007E1230 /* SheepShaver.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = SheepShaver.icns; path = ../SheepShaver.icns; sourceTree = SOURCE_ROOT; }; 08AAB1B11026168B007E1230 /* SheepShaver */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; name = SheepShaver; path = ../../Unix/SheepShaver; sourceTree = SOURCE_ROOT; }; @@ -115,6 +116,7 @@ 29B97314FDCFA39411CA2CEA /* SheepShaverLauncher */ = { isa = PBXGroup; children = ( + 085339D612C9874400345D35 /* LauncherPrefix.h */, 08DC90C20B67078300799A45 /* prefs.h */, 08DC90C40B67079800799A45 /* sys.h */, 08DC90C50B6707AC00799A45 /* user_strings_unix.h */, @@ -333,6 +335,8 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + GCC_PREFIX_HEADER = LauncherPrefix.h; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; diff --git a/SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm b/SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm index 14c0c6bc..e65ad6e3 100644 --- a/SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm +++ b/SheepShaver/src/MacOSX/Launcher/VMSettingsController.mm @@ -1,7 +1,7 @@ /* * VMSettingsController.mm - Preferences editing in Cocoa on Mac OS X * - * Copyright (C) 2006-2009 Alexei Svitkine + * Copyright (C) 2006-2010 Alexei Svitkine * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,8 @@ #import "VMSettingsController.h" +#include + const int CDROMRefNum = -62; // RefNum of driver #ifdef STANDALONE_PREFS