diff options
Diffstat (limited to 'win/cat.c')
| -rw-r--r-- | win/cat.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -9,16 +9,27 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ +#ifdef TCL_BROKEN_MAINARGS +/* On mingw32 and cygwin this doesn't work */ +# undef UNICODE +# undef _UNICODE +#endif + #include <stdio.h> -#include <io.h> +#ifdef __CYGWIN__ +# include <unistd.h> +#else +# include <io.h> +#endif #include <string.h> +#include <tchar.h> int -main() -{ +_tmain(void) +{ char buf[1024]; int n; - char *err; + const char *err; while (1) { n = read(0, buf, sizeof(buf)); @@ -32,4 +43,3 @@ main() return 0; } - |
