]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.014 v7.4.014
authorBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2013 15:07:01 +0000 (17:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2013 15:07:01 +0000 (17:07 +0200)
Problem:    MS-Windows: check for writing to device does not work.
Solution:   Fix #ifdefs. (Ken Takata)

src/fileio.c
src/version.c

index 010d933a12693f79cbb091bd4a5bf383578753a0..233990bf502418ca155c0f23270b3329f2f1e455 100644 (file)
@@ -428,13 +428,13 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
        }
     }
 
-#ifdef UNIX
-    /*
-     * On Unix it is possible to read a directory, so we have to
-     * check for it before the mch_open().
-     */
     if (!read_stdin && !read_buffer)
     {
+#ifdef UNIX
+       /*
+        * On Unix it is possible to read a directory, so we have to
+        * check for it before the mch_open().
+        */
        perm = mch_getperm(fname);
        if (perm >= 0 && !S_ISREG(perm)             /* not a regular file ... */
 # ifdef S_ISFIFO
@@ -457,8 +457,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
            msg_scroll = msg_save;
            return FAIL;
        }
-
-# if defined(MSDOS) || defined(MSWIN) || defined(OS2)
+#endif
+#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
        /*
         * MS-Windows allows opening a device, but we will probably get stuck
         * trying to read it.
@@ -470,9 +470,8 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
            msg_scroll = msg_save;
            return FAIL;
        }
-# endif
-    }
 #endif
+    }
 
     /* Set default or forced 'fileformat' and 'binary'. */
     set_file_options(set_options, eap);
index 13ff1ca522b2734ffe950912660ba25cca3fcf5e..e8b935966a8bfb3456c9a138efc5d5bb1c4d9a14 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    14,
 /**/
     13,
 /**/