confirmed working on mingw64.
- mattn
diff --git a/src/tee/tee.c b/src/tee/tee.c
index 6c85766..5103e28 100644
--- a/src/tee/tee.c
+++ b/src/tee/tee.c
@@ -29,6 +29,11 @@
#include <unistd.h>
#include <malloc.h>
#include <stdio.h>
+#include <fcntl.h>
+
+#ifdef _WIN32
+# define sysconf(x) -1
+#endif
void usage(void)
{
@@ -124,9 +129,9 @@ main(int argc, char *argv[])
exit(1);
}
}
- _fsetmode(stdin, "b");
+ setmode(fileno(stdin), O_BINARY);
fflush(stdout); /* needed for _fsetmode(stdout) */
- _fsetmode(stdout, "b");
+ setmode(fileno(stdout), O_BINARY);
while ((n = myfread(buf, sizeof(char), sizeof(buf), stdin)) > 0)
{
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.