Closed Bug 374563 Opened 14 years ago Closed 14 years ago
MSVC preprocessor generates non distributable/compilable code from mozilla files
1.17 KB, patch
|Details | Diff | Splinter Review|
There is a problem with how the NS_IMETHOD macros are used in nsDOMScriptObjectFactory.h and nsIDOMScriptObjectFactory.h When the MSVC Preprocessor runs it concatenates the last characters of the macro (__stdcall)with the first characters right after the macro (GET...) resulting in something like "virtual nsISupports * __stdcallGetClassInfoInstance(nsDOMClassInfoID aID) = 0;". This does not seem to be an issue when compiling the code directly but if you first generate a preprocessed file (make nsDOMScriptObjectFactory.i) and then try to compile it, the compiler will spit out an error. This bug needs to be fixed in order for distcc to be able to distrbiute mozilla builds. We applied the attached patch on a checked out source tree and were able to do a distributed build of mozilla using cygwin + distcc (A mingw port is under way - don't worry!). For more info see http://zenit.senecac.on.ca/index.php/Distcc_With_MSVC.
It should be noted that the attached patch was written half by me and half by Cesar Oliveira.
Assignee: nobody → general
Component: General → DOM
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → ian
Hardware: PC → All
Comment on attachment 259058 [details] [diff] [review] patch >Index: xpcom/base/nscore.h >=================================================================== >< #define NS_IMETHOD_(type) virtual type __stdcall >--- >> #define NS_IMETHOD_(type) virtual type __stdcall This doesn't seem to change anything?
We tried to add a trailing white space to the macro definition to stop the problem at the source... it didn't work. I can drop that part.
Checked in on trunk: Checking in ./dom/public/nsIDOMScriptObjectFactory.h; /cvsroot/mozilla/dom/public/nsIDOMScriptObjectFactory.h,v <-- nsIDOMScriptObjectFactory.h new revision: 3.20; previous revision: 3.19 done Checking in ./dom/src/base/nsDOMScriptObjectFactory.h; /cvsroot/mozilla/dom/src/base/nsDOMScriptObjectFactory.h,v <-- nsDOMScriptObjectFactory.h new revision: 1.7; previous revision: 1.6 done
Assignee: general → themystic.ca
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.