Closed Bug 324173 Opened 14 years ago Closed 8 years ago

Viewer No Longer Builds on the 1.8 Branch (jsint)

Categories

(Core Graveyard :: Viewer App, defect)

x86
Windows XP
defect
Not set

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: mscott, Unassigned)

Details

If you build with tests enabled (which builds the viewer app), it no longer builds on the 1.8 branch. It does build on the trunk though.

Here is the error davel and I see:

/cygdrive/c/build/trees/1.5fxdbg/mozilla/webshell/tests/viewer/JSConsole.cpp
JSConsole.cpp
../../../dist/include/js\jspubtd.h(52) : error C2146: syntax error : missing ';'
 before identifier 'jsint'
../../../dist/include/js\jspubtd.h(52) : fatal error C1004: unexpected end of fi
le found
make: *** [JSConsole.obj] Error 2
Is this due to a change in compiler or a change in code? It is unlikely that we can/want to support building the 1.8 branch with MSVC8.
I'm using VC6 on my build box.
VC6.0 here as well.
I got the same error. How can I continue the compilation process to compile TestGtkEmbed ?
I'm also getting the same error. Did anyone find solution to this error ?
I changed 2 header files to get the compilation to continue. In /dist/include/js/jspubtd.h and /dist/include/js/jsapi.h, any reference to int32 gives a "missing ';' before identifier 'jsint'" error message. To circumvent that, I changed int32 to uint32. Probably a bad thing to do, but anyway...

What you need to do is to modify jspubtd.h (52) first. Then carry on with the compilation to see the next error message and modify the next. I made 4 modifications in total.
I just saw this error on 1.5/vc6 after attempting to switch from building in a DOS command shell to building in a cygwin shell.
I suggest to use __int32 to make a quick-fix of this problem. 
uint32 changes the type from signed to unsigned that could lead to problems.
Patch is really simple, just change order of headers in JSConsole.cpp:

@@ -38,15 +38,15 @@
 //is case this is defined from the outside... MMP
 #ifdef WIN32_LEAN_AND_MEAN
 #undef WIN32_LEAN_AND_MEAN
 #endif
 
+#include "jsapi.h"
 #include "JSConsole.h"
 #include "jsconsres.h"
 #include "nsIScriptContext.h"
 #include <stdio.h>
-#include "jsapi.h"
 #include "nsReadableUtils.h"
 
 HINSTANCE JSConsole::sAppInstance = 0;
 HACCEL JSConsole::sAccelTable = 0;
 CHAR JSConsole::sDefaultCaption[] = "JavaScript Console";

Product: Core → Core Graveyard
Viewer was removed in bug 121881.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.