summaryrefslogtreecommitdiffstats
path: root/win/cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/cat.c')
-rw-r--r--win/cat.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/win/cat.c b/win/cat.c
index cdd83a5..4804466 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -8,19 +8,23 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: cat.c,v 1.2 1998/09/14 18:40:19 stanton Exp $
+ * RCS: @(#) $Id: cat.c,v 1.3.10.1 2010/01/31 23:51:37 nijtmans Exp $
*/
#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));
@@ -34,4 +38,3 @@ main()
return 0;
}
-