diff options
Diffstat (limited to 'repo/squeak-vm/sqVirtualMachine.patch')
-rw-r--r-- | repo/squeak-vm/sqVirtualMachine.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/repo/squeak-vm/sqVirtualMachine.patch b/repo/squeak-vm/sqVirtualMachine.patch new file mode 100644 index 0000000..37b4699 --- /dev/null +++ b/repo/squeak-vm/sqVirtualMachine.patch @@ -0,0 +1,49 @@ +--- a/Cross/vm/sqVirtualMachine.c ++++ b/Cross/vm/sqVirtualMachine.c +@@ -485,10 +485,7 @@ + /* This lives here for now but belongs somewhere else. + * platforms/Cross/vm/sqStuff.c?? + */ +-#define STDOUT_STACK_SZ 5 +-static int stdoutStackIdx = -1; +-static FILE stdoutStack[STDOUT_STACK_SZ]; +- ++ + /* N.B. As of cygwin 1.5.25 fopen("crash.dmp","a") DOES NOT WORK! crash.dmp + * contains garbled output as if the file pointer gets set to the start of the + * file, not the end. So we synthesize our own append mode. +@@ -521,10 +518,6 @@ + + FILE *output; + +- if (stdoutStackIdx + 2 >= STDOUT_STACK_SZ) { +- fprintf(stderr,"output file stack is full.\n"); +- return; +- } + switch ((unsigned)filenameOrStdioIndex) { + case STDOUT_FILENO: output = stdout; break; + case STDERR_FILENO: output = stderr; break; +@@ -536,17 +529,11 @@ + return; + } + } +- stdoutStack[++stdoutStackIdx] = *stdout; +- *stdout = *output; + } + + void + popOutputFile() + { +- if (stdoutStackIdx < 0) { +- fprintf(stderr,"output file stack is empty.\n"); +- return; +- } + fflush(stdout); + if (fileno(stdout) > STDERR_FILENO) { + /* as of Feb 2011 with fclose@@GLIBC_2.1 under e.g. CentOS 5.3, fclose +@@ -558,5 +545,4 @@ + fclose(stdout); + #endif + } +- *stdout = stdoutStack[stdoutStackIdx--]; + } |