lkundrak / rpms / vim

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