summaryrefslogtreecommitdiffstats
path: root/win/cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/cat.c')
-rw-r--r--win/cat.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/win/cat.c b/win/cat.c
index 834461e..2cedd5d 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -10,15 +10,19 @@
*/
#include <stdio.h>
-#include <io.h>
+#ifdef __CYGWIN__
+# include <unistd.h>
+#else
+# include <io.h>
+#endif
#include <string.h>
int
-main()
-{
+main(void)
+{
char buf[1024];
int n;
- char *err;
+ const char *err;
while (1) {
n = read(0, buf, sizeof(buf));
@@ -32,4 +36,3 @@ main()
return 0;
}
-