aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-10-30 09:23:19 +0000
committerRon Yorston <rmy@pobox.com>2024-10-30 09:23:19 +0000
commit5ad83957fa74aafd061afbfb8da14ce3220659a9 (patch)
tree422982b78a710d1d71660b55e89b29c6d827d7cf /shell/ash.c
parente5beafdf959f0642c226483a16c0a58c4aedba37 (diff)
downloadbusybox-w32-5ad83957fa74aafd061afbfb8da14ce3220659a9.tar.gz
busybox-w32-5ad83957fa74aafd061afbfb8da14ce3220659a9.tar.bz2
busybox-w32-5ad83957fa74aafd061afbfb8da14ce3220659a9.zip
win32: drop stream i/o workaround
It seems that one of the workarounds for problems with stream i/o in MSVCRT was unnecessary. It also caused display glitches when the 32-bit binary was run on 64-bit systems. Remove it. Saves 112 bytes in the 32-bit build. (GitHub issue #472)
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 5768b6d71..1fc2a44b1 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6635,15 +6635,6 @@ redirect(union node *redir, int flags)
6635 if (!closed) { 6635 if (!closed) {
6636 /* ^^^ optimization: saving may already 6636 /* ^^^ optimization: saving may already
6637 * have closed it. If not... */ 6637 * have closed it. If not... */
6638#if ENABLE_PLATFORM_MINGW32 && !defined(_UCRT) && !defined(_WIN64)
6639 // Workaround for problems with streams in 32-bit MSVCRT
6640 if (fd == fileno(stdin))
6641 fclose(stdin);
6642 else if (fd == fileno(stdout))
6643 fclose(stdout);
6644 else if (fd == fileno(stderr))
6645 fclose(stderr);
6646#endif
6647 close(fd); 6638 close(fd);
6648 } 6639 }
6649 } else { 6640 } else {