build fixes for the Mac OS X basic plugin in our plugin SDK. b=459091 sr=dougt
authorJosh Aas <joshmoz@gmail.com>
Thu, 16 Oct 2008 16:21:54 -0400
changeset 20547 b75910d0ea045e7b73e2a6504132777950169c4e
parent 20546 9753ccf7281956df1ff72ace1363137dfe7ba013
child 20548 b7253556900e26a64252f163ee6db897d3e669db
push id2954
push userjosh@mozilla.com
push dateThu, 16 Oct 2008 20:20:44 +0000
treeherdermozilla-central@b75910d0ea04 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs459091
milestone1.9.1b2pre
build fixes for the Mac OS X basic plugin in our plugin SDK. b=459091 sr=dougt
modules/plugin/sdk/samples/basic/mac/BasicPlugin.h
modules/plugin/sdk/samples/basic/mac/BasicPlugin.xcodeproj/project.pbxproj
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin.h
+++ b/modules/plugin/sdk/samples/basic/mac/BasicPlugin.h
@@ -9,18 +9,21 @@
  * (C) COPYRIGHT 2008 by the Mozilla Corporation
  * http://www.mozilla.com/
  *
  * Contributors:
  *  Josh Aas <josh@mozilla.com>
  *
  * ***** END LICENSE BLOCK ***** */
 
-// This just needs to include npapi headers, change the path to whatever works for you
-#include "npapi.h"
+// This just needs to include NPAPI headers, change the path to whatever works
+// for you. Note that "XP_MACOSX=1" is defined in the project so that the NPAPI
+// headers know we're compiling for Mac OS X.
+#include "../../../../base/public/npapi.h"
+#include "../../../../base/public/npfunctions.h"
 
 NPError NP_Initialize(NPNetscapeFuncs *browserFuncs);
 NPError NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
 void    NP_Shutdown(void);
 
 NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
 NPError NPP_Destroy(NPP instance, NPSavedData** save);
 NPError NPP_SetWindow(NPP instance, NPWindow* window);
--- a/modules/plugin/sdk/samples/basic/mac/BasicPlugin.xcodeproj/project.pbxproj
+++ b/modules/plugin/sdk/samples/basic/mac/BasicPlugin.xcodeproj/project.pbxproj
@@ -184,29 +184,31 @@
 			};
 			name = Release;
 		};
 		4FADC23808B4156C00ABE55E /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_PREPROCESSOR_DEFINITIONS = "XP_MACOSX=1";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				PREBINDING = NO;
 				SDKROOT = macosx10.5;
 			};
 			name = Debug;
 		};
 		4FADC23908B4156C00ABE55E /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_PREPROCESSOR_DEFINITIONS = "XP_MACOSX=1";
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				PREBINDING = NO;
 				SDKROOT = macosx10.5;
 			};
 			name = Release;
 		};
 /* End XCBuildConfiguration section */