Skip to content

Commit d24a669

Browse files
committed
Fix the type declaration of the sendTrace option variable for 64-bit
StackVM compiles. Add the missing command-line parser for it on Mac.
1 parent 08a50c2 commit d24a669

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

platforms/Mac OS/vm/sqMacUnixCommandLineInterface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int parseArgument(int argc, char **argv)
180180
printPhaseTime(1);
181181
return 1; }
182182
#if (STACKVM || NewspeakVM) && !COGVM
183-
else if (!strcmp(argv[0], VMOPTION("sendtrace"))) { extern sqInt sendTrace; sendTrace = 1; return 1; }
183+
else if (!strcmp(argv[0], VMOPTION("sendtrace"))) { extern volatile int sendTrace; sendTrace = 1; return 1; }
184184
#endif
185185
else if (argc > 1 && !strcmp(argv[0], VMOPTION("memory"))) {
186186
gMaxHeapSize = strtolbkmg(argv[1]);

platforms/iOS/vm/OSX/sqSqueakOSXApplication.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ - (int) parseArgument: (NSString *) argData peek: (char *) peek
254254
return 1;
255255
}
256256
#endif
257+
#if (STACKVM || NewspeakVM) && !COGVM
258+
if ([argData isEqualToString: VMOPTIONOBJ("sendtrace")]) {
259+
extern volatile int sendTrace;
260+
sendTrace = 1;
261+
return 1;
262+
}
263+
#endif
257264
#if COGVM
258265
if ([argData compare: VMOPTIONOBJ("trace") options: NSLiteralSearch range: NSMakeRange(0,VMOPTIONLEN(6))] == NSOrderedSame) {
259266
extern int traceFlags;

platforms/unix/vm/sqUnixMain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ static int vm_parseArgument(int argc, char **argv)
15581558
else if (!strcmp(argv[0], VMOPTION("aiolog"))) { aioDebugLogging = 1; return 1; }
15591559
#endif
15601560
#if (STACKVM || NewspeakVM) && !COGVM
1561-
else if (!strcmp(argv[0], VMOPTION("sendtrace"))) { extern sqInt sendTrace; sendTrace = 1; return 1; }
1561+
else if (!strcmp(argv[0], VMOPTION("sendtrace"))) { extern volatile int sendTrace; sendTrace = 1; return 1; }
15621562
#endif
15631563
else if (!strcmp(argv[0], VMOPTION("single"))) { runAsSingleInstance=1; return 1; }
15641564
/* option requires an argument */

platforms/win32/vm/sqWin32Main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ sqImageFile findEmbeddedImage(void) { return 0; }
14771477
/* sqMain */
14781478
/****************************************************************************/
14791479
#if (STACKVM || NewspeakVM) && !COGVM
1480-
extern sqInt sendTrace;
1480+
extern volatile int sendTrace;
14811481
#endif
14821482
#if STACKVM || NewspeakVM
14831483
extern sqInt checkForLeaks;
@@ -1893,7 +1893,7 @@ parseVMArgument(int argc, char *argv[])
18931893
#endif /* VISTA_SECURITY */
18941894
#if (STACKVM || NewspeakVM) && !COGVM
18951895
else if (!strcmp(argv[0], VMOPTION("sendtrace")))
1896-
{ extern sqInt sendTrace; sendTrace = 1; return 1; }
1896+
{ extern volatile int sendTrace; sendTrace = 1; return 1; }
18971897
#endif
18981898

18991899
/* parameters */

0 commit comments

Comments
 (0)