vim-patch:7.4.2229

f04507d132

Author: Bram Moolenaar <Bram@vim.org>
Date:   Sat Aug 20 15:05:39 2016 +0200

    patch 7.4.2229
    Problem:    Startup test fails on Solaris.
    Solution:   Recognize a character device. (Danek Duvall)
This commit is contained in:
ckelsel
2017-07-10 07:58:40 +08:00
committed by James McCoy
parent 04de6a64e2
commit 2999d7c0e8
4 changed files with 9 additions and 2 deletions

View File

@@ -216,6 +216,9 @@ open_buffer (
# endif # endif
# ifdef S_ISSOCK # ifdef S_ISSOCK
|| S_ISSOCK(perm) || S_ISSOCK(perm)
# endif
# ifdef OPEN_CHR_FILES
|| (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname))
# endif # endif
)) ))
read_fifo = TRUE; read_fifo = TRUE;

View File

@@ -1974,7 +1974,7 @@ failed:
/// Do not accept "/dev/fd/[012]", opening these may hang Vim. /// Do not accept "/dev/fd/[012]", opening these may hang Vim.
/// ///
/// @param fname file name to check /// @param fname file name to check
static bool is_dev_fd_file(char_u *fname) bool is_dev_fd_file(char_u *fname)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{ {
return STRNCMP(fname, "/dev/fd/", 8) == 0 return STRNCMP(fname, "/dev/fd/", 8) == 0

View File

@@ -215,7 +215,7 @@ static const int included_patches[] = {
// 2232 NA // 2232 NA
2231, 2231,
2230, 2230,
// 2229, 2229,
2228, 2228,
2227, 2227,
2226, 2226,

View File

@@ -319,4 +319,8 @@ enum { FOLD_TEXT_LEN = 51 }; //!< buffer size for get_foldtext()
// Lowest number used for window ID. Cannot have this many windows per tab. // Lowest number used for window ID. Cannot have this many windows per tab.
#define LOWEST_WIN_ID 1000 #define LOWEST_WIN_ID 1000
#if defined(__FreeBSD__) && defined(S_ISCHR)
# define OPEN_CHR_FILES
#endif
#endif /* NVIM_VIM_H */ #endif /* NVIM_VIM_H */