Patch 7.4.2229
Problem:    Startup test fails on Solaris.
Solution:   Recognize a character device. (Danek Duvall)
Files:      src/buffer.c, src/fileio.c, src/proto/fileio.pro, src/vim.h


*** ../vim-7.4.2228/src/buffer.c        2016-08-14 19:08:41.838022274 +0200
--- src/buffer.c        2016-08-20 14:58:16.826642753 +0200
***************
*** 220,225 ****
--- 220,228 ----
  # ifdef S_ISSOCK
                      || S_ISSOCK(perm)
  # endif
+ # ifdef OPEN_CHR_FILES
+                     || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
+ # endif
                    ))
                read_fifo = TRUE;
        if (read_fifo)
*** ../vim-7.4.2228/src/fileio.c        2016-08-09 22:13:51.858043815 +0200
--- src/fileio.c        2016-08-20 15:00:50.941254004 +0200
***************
*** 27,36 ****
  /* Is there any system that doesn't have access()? */
  #define USE_MCH_ACCESS
  
- #if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
- # define OPEN_CHR_FILES
- static int is_dev_fd_file(char_u *fname);
- #endif
  #ifdef FEAT_MBYTE
  static char_u *next_fenc(char_u **pp);
  # ifdef FEAT_EVAL
--- 27,32 ----
***************
*** 2718,2731 ****
      return OK;
  }
  
! #ifdef OPEN_CHR_FILES
  /*
   * Returns TRUE if the file name argument is of the form "/dev/fd/\d\+",
   * which is the name of files used for process substitution output by
   * some shells on some operating systems, e.g., bash on SunOS.
   * Do not accept "/dev/fd/[012]", opening these may hang Vim.
   */
!     static int
  is_dev_fd_file(char_u *fname)
  {
      return (STRNCMP(fname, "/dev/fd/", 8) == 0
--- 2714,2727 ----
      return OK;
  }
  
! #if defined(OPEN_CHR_FILES) || defined(PROTO)
  /*
   * Returns TRUE if the file name argument is of the form "/dev/fd/\d\+",
   * which is the name of files used for process substitution output by
   * some shells on some operating systems, e.g., bash on SunOS.
   * Do not accept "/dev/fd/[012]", opening these may hang Vim.
   */
!     int
  is_dev_fd_file(char_u *fname)
  {
      return (STRNCMP(fname, "/dev/fd/", 8) == 0
*** ../vim-7.4.2228/src/proto/fileio.pro        2016-08-10 20:53:01.679116172 
+0200
--- src/proto/fileio.pro        2016-08-20 15:01:50.784721772 +0200
***************
*** 1,6 ****
--- 1,7 ----
  /* fileio.c */
  void filemess(buf_T *buf, char_u *name, char_u *s, int attr);
  int readfile(char_u *fname, char_u *sfname, linenr_T from, linenr_T 
lines_to_skip, linenr_T lines_to_read, exarg_T *eap, int flags);
+ int is_dev_fd_file(char_u *fname);
  int prep_exarg(exarg_T *eap, buf_T *buf);
  void set_file_options(int set_options, exarg_T *eap);
  void set_forced_fenc(exarg_T *eap);
*** ../vim-7.4.2228/src/vim.h   2016-08-14 19:54:16.332930147 +0200
--- src/vim.h   2016-08-20 15:01:36.068852496 +0200
***************
*** 2485,2488 ****
--- 2485,2492 ----
  #define FNE_INCL_BR   1       /* include [] in name */
  #define FNE_CHECK_START       2       /* check name starts with valid 
character */
  
+ #if (defined(sun) || defined(__FreeBSD__)) && defined(S_ISCHR)
+ # define OPEN_CHR_FILES
+ #endif
+ 
  #endif /* VIM__H */
*** ../vim-7.4.2228/src/version.c       2016-08-18 23:04:44.666592772 +0200
--- src/version.c       2016-08-20 14:57:41.510961033 +0200
***************
*** 765,766 ****
--- 765,768 ----
  {   /* Add new patch number below this line */
+ /**/
+     2229,
  /**/

-- 
Despite the cost of living, have you noticed how it remains so popular?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui