Mercurial > vim
changeset 21244:bc7ed647d654 v8.2.1173
patch 8.2.1173: tee doesn't build on some systems
Commit: https://github.com/vim/vim/commit/40043152924827fa8c4064951065ff507c610164
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 10 20:45:31 2020 +0200
patch 8.2.1173: tee doesn't build on some systems
Problem: Tee doesn't build on some systems.
Solution: Include header files. (Dominique Pelle, closes https://github.com/vim/vim/issues/6431)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 10 Jul 2020 21:00:03 +0200 |
parents | 671bfdceb417 |
children | 05db4f0bf880 |
files | src/tee/tee.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {