home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.4 / 7.4.014 < prev    next >
Encoding:
Internet Message Format  |  2013-08-29  |  2.6 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.014
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.014
  11. Problem:    MS-Windows: check for writing to device does not work.
  12. Solution:   Fix #ifdefs. (Ken Takata)
  13. Files:        src/fileio.c
  14.  
  15.  
  16. *** ../vim-7.4.013/src/fileio.c    2013-08-25 17:46:05.000000000 +0200
  17. --- src/fileio.c    2013-08-30 16:56:46.000000000 +0200
  18. ***************
  19. *** 428,440 ****
  20.       }
  21.       }
  22.   
  23. - #ifdef UNIX
  24. -     /*
  25. -      * On Unix it is possible to read a directory, so we have to
  26. -      * check for it before the mch_open().
  27. -      */
  28.       if (!read_stdin && !read_buffer)
  29.       {
  30.       perm = mch_getperm(fname);
  31.       if (perm >= 0 && !S_ISREG(perm)            /* not a regular file ... */
  32.   # ifdef S_ISFIFO
  33. --- 428,440 ----
  34.       }
  35.       }
  36.   
  37.       if (!read_stdin && !read_buffer)
  38.       {
  39. + #ifdef UNIX
  40. +     /*
  41. +      * On Unix it is possible to read a directory, so we have to
  42. +      * check for it before the mch_open().
  43. +      */
  44.       perm = mch_getperm(fname);
  45.       if (perm >= 0 && !S_ISREG(perm)            /* not a regular file ... */
  46.   # ifdef S_ISFIFO
  47. ***************
  48. *** 457,464 ****
  49.           msg_scroll = msg_save;
  50.           return FAIL;
  51.       }
  52. ! # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
  53.       /*
  54.        * MS-Windows allows opening a device, but we will probably get stuck
  55.        * trying to read it.
  56. --- 457,464 ----
  57.           msg_scroll = msg_save;
  58.           return FAIL;
  59.       }
  60. ! #endif
  61. ! #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
  62.       /*
  63.        * MS-Windows allows opening a device, but we will probably get stuck
  64.        * trying to read it.
  65. ***************
  66. *** 470,478 ****
  67.           msg_scroll = msg_save;
  68.           return FAIL;
  69.       }
  70. - # endif
  71. -     }
  72.   #endif
  73.   
  74.       /* Set default or forced 'fileformat' and 'binary'. */
  75.       set_file_options(set_options, eap);
  76. --- 470,477 ----
  77.           msg_scroll = msg_save;
  78.           return FAIL;
  79.       }
  80.   #endif
  81. +     }
  82.   
  83.       /* Set default or forced 'fileformat' and 'binary'. */
  84.       set_file_options(set_options, eap);
  85. *** ../vim-7.4.013/src/version.c    2013-08-30 16:51:15.000000000 +0200
  86. --- src/version.c    2013-08-30 16:54:33.000000000 +0200
  87. ***************
  88. *** 740,741 ****
  89. --- 740,743 ----
  90.   {   /* Add new patch number below this line */
  91. + /**/
  92. +     14,
  93.   /**/
  94.  
  95. -- 
  96. Drink wet cement and get really stoned.
  97.  
  98.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  99. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  100. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  101.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  102.