summaryrefslogtreecommitdiff
path: root/src/tee
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-10 20:45:31 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-10 20:45:31 +0200
commit40043152924827fa8c4064951065ff507c610164 (patch)
tree155451aeb7a158df9fd1ae36bd3921c70be394ee /src/tee
parent08fc48492acc07259d91293df12bf66447819443 (diff)
downloadvim-git-40043152924827fa8c4064951065ff507c610164.tar.gz
patch 8.2.1173: tee doesn't build on some systemsv8.2.1173
Problem: Tee doesn't build on some systems. Solution: Include header files. (Dominique Pelle, closes #6431)
Diffstat (limited to 'src/tee')
-rw-r--r--src/tee/tee.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tee/tee.c b/src/tee/tee.c
index c668d2d1e..ba0e4abd7 100644
--- a/src/tee/tee.c
+++ b/src/tee/tee.c
@@ -32,6 +32,8 @@
#endif
#include <malloc.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <fcntl.h>
#ifdef _WIN32
@@ -132,9 +134,11 @@ main(int argc, char *argv[])
exit(1);
}
}
+#ifdef _WIN32
setmode(fileno(stdin), O_BINARY);
fflush(stdout); /* needed for _fsetmode(stdout) */
setmode(fileno(stdout), O_BINARY);
+#endif
while ((n = myfread(buf, sizeof(char), sizeof(buf), stdin)) > 0)
{