3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.014
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.014
3ef2ca
Problem:    MS-Windows: check for writing to device does not work.
3ef2ca
Solution:   Fix #ifdefs. (Ken Takata)
3ef2ca
Files:	    src/fileio.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.013/src/fileio.c	2013-08-25 17:46:05.000000000 +0200
3ef2ca
--- src/fileio.c	2013-08-30 16:56:46.000000000 +0200
3ef2ca
***************
3ef2ca
*** 428,440 ****
3ef2ca
  	}
3ef2ca
      }
3ef2ca
  
3ef2ca
- #ifdef UNIX
3ef2ca
-     /*
3ef2ca
-      * On Unix it is possible to read a directory, so we have to
3ef2ca
-      * check for it before the mch_open().
3ef2ca
-      */
3ef2ca
      if (!read_stdin && !read_buffer)
3ef2ca
      {
3ef2ca
  	perm = mch_getperm(fname);
3ef2ca
  	if (perm >= 0 && !S_ISREG(perm)		    /* not a regular file ... */
3ef2ca
  # ifdef S_ISFIFO
3ef2ca
--- 428,440 ----
3ef2ca
  	}
3ef2ca
      }
3ef2ca
  
3ef2ca
      if (!read_stdin && !read_buffer)
3ef2ca
      {
3ef2ca
+ #ifdef UNIX
3ef2ca
+ 	/*
3ef2ca
+ 	 * On Unix it is possible to read a directory, so we have to
3ef2ca
+ 	 * check for it before the mch_open().
3ef2ca
+ 	 */
3ef2ca
  	perm = mch_getperm(fname);
3ef2ca
  	if (perm >= 0 && !S_ISREG(perm)		    /* not a regular file ... */
3ef2ca
  # ifdef S_ISFIFO
3ef2ca
***************
3ef2ca
*** 457,464 ****
3ef2ca
  	    msg_scroll = msg_save;
3ef2ca
  	    return FAIL;
3ef2ca
  	}
3ef2ca
! 
3ef2ca
! # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
3ef2ca
  	/*
3ef2ca
  	 * MS-Windows allows opening a device, but we will probably get stuck
3ef2ca
  	 * trying to read it.
3ef2ca
--- 457,464 ----
3ef2ca
  	    msg_scroll = msg_save;
3ef2ca
  	    return FAIL;
3ef2ca
  	}
3ef2ca
! #endif
3ef2ca
! #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
3ef2ca
  	/*
3ef2ca
  	 * MS-Windows allows opening a device, but we will probably get stuck
3ef2ca
  	 * trying to read it.
3ef2ca
***************
3ef2ca
*** 470,478 ****
3ef2ca
  	    msg_scroll = msg_save;
3ef2ca
  	    return FAIL;
3ef2ca
  	}
3ef2ca
- # endif
3ef2ca
-     }
3ef2ca
  #endif
3ef2ca
  
3ef2ca
      /* Set default or forced 'fileformat' and 'binary'. */
3ef2ca
      set_file_options(set_options, eap);
3ef2ca
--- 470,477 ----
3ef2ca
  	    msg_scroll = msg_save;
3ef2ca
  	    return FAIL;
3ef2ca
  	}
3ef2ca
  #endif
3ef2ca
+     }
3ef2ca
  
3ef2ca
      /* Set default or forced 'fileformat' and 'binary'. */
3ef2ca
      set_file_options(set_options, eap);
3ef2ca
*** ../vim-7.4.013/src/version.c	2013-08-30 16:51:15.000000000 +0200
3ef2ca
--- src/version.c	2013-08-30 16:54:33.000000000 +0200
3ef2ca
***************
3ef2ca
*** 740,741 ****
3ef2ca
--- 740,743 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     14,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
Drink wet cement and get really stoned.
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///