#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include <errno.h>
static void
output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
putc(c1<<4 | c2, outfile);
}
} else {
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
if (*s == '\n')
putc('\r', outfile); /* insert CR for binary-mode write */
#endif
OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
*/
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
+#include <io.h>
#include <fcntl.h>
#endif
exit(-1);
}
} else {
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
if (encode)
fp = fopen(argv[i], "rb");
else
} /* else */
#else
fp = fopen(argv[i], "r");
-#endif /* MSDOS */
+#endif /* WIN32_NATIVE */
if (!fp) {
perror(argv[i]);
exit(-1);
}
}
}
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
if (fp == stdin) setmode(fileno(fp), O_BINARY);
-#endif /* MSDOS */
+#endif /* WIN32_NATIVE */
if (which == BASE64) {
if (encode) {
to64(fp, fpo, portablenewlines);