Revision: 6489 Author: j...@google.com Date: Tue Oct 27 15:36:33 2009 Log: Switch how we get a -D macro into a C string for MSVC compatibility.
http://code.google.com/p/google-web-toolkit/source/detail?r=6489 Modified: /changes/jat/single-xpi/plugins/xpcom/Makefile /changes/jat/single-xpi/plugins/xpcom/ModuleOOPHM.cpp ======================================= --- /changes/jat/single-xpi/plugins/xpcom/Makefile Tue Oct 27 14:36:36 2009 +++ /changes/jat/single-xpi/plugins/xpcom/Makefile Tue Oct 27 15:36:33 2009 @@ -53,7 +53,7 @@ BROWSER=ff3 endif -CFLAGS += -DBROWSER='"'$(BROWSER)'"' +CFLAGS += -DBROWSER=$(BROWSER) GECKO_MINOR_VERSION= ifeq ($(BROWSER),ff2) BROWSER_VERSION = 1.8 ======================================= --- /changes/jat/single-xpi/plugins/xpcom/ModuleOOPHM.cpp Mon Oct 26 11:51:28 2009 +++ /changes/jat/single-xpi/plugins/xpcom/ModuleOOPHM.cpp Tue Oct 27 15:36:33 2009 @@ -30,6 +30,10 @@ #include "nsIClassInfoImpl.h" // 1.9 only #endif +// Allow a macro to be treated as a C string, ie -Dfoo=bar; QUOTE(foo) = "bar" +#define QUOTE_HELPER(x) #x +#define QUOTE(x) QUOTE_HELPER(x) + #ifdef _WINDOWS #include <windows.h> @@ -137,6 +141,6 @@ Debug::log(Debug::Info) << " gecko=" << gecko_version.BeginReading() << ", firefox=" << browser_version.BeginReading() << ", abi=" << os.BeginReading() << "_" << abi.BeginReading() << ", built for " - BROWSER << Debug::flush; + << QUOTE(BROWSER) << Debug::flush; return NS_NewGenericModule2(&kModuleInfo, result); } --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---