diff lib-src/mmencode.c @ 410:de805c49cfc1 r21-2-35

Import from CVS: tag r21-2-35
author cvs
date Mon, 13 Aug 2007 11:19:21 +0200
parents 74fd4e045ea6
children 697ef44129c6
line wrap: on
line diff
--- a/lib-src/mmencode.c	Mon Aug 13 11:18:12 2007 +0200
+++ b/lib-src/mmencode.c	Mon Aug 13 11:19:21 2007 +0200
@@ -385,7 +385,7 @@
                         putc(c1<<4 | c2, outfile);
                     }
                 } else {
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
                     if (*s == '\n')
                         putc('\r', outfile);	/* insert CR for binary-mode write */
 #endif
@@ -442,7 +442,8 @@
 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
 
@@ -487,7 +488,7 @@
                     exit(-1);
             }
         } else {
-#ifdef MSDOS
+#ifdef WIN32_NATIVE
             if (encode)
                 fp = fopen(argv[i], "rb");
             else
@@ -497,16 +498,16 @@
             } /* 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);