From d2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 15 Jun 2022 20:02:02 +0100 Subject: added deps for qemu --- repo/squeak-vm/sqVirtualMachine.patch | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 repo/squeak-vm/sqVirtualMachine.patch (limited to 'repo/squeak-vm/sqVirtualMachine.patch') 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--]; + } -- cgit v1.2.1