diff options
author | ckelsel <ckelsel@hotmail.com> | 2017-07-10 07:58:40 +0800 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-07-13 23:09:03 -0400 |
commit | 2999d7c0e89087f76711e914eb65af55578a6691 (patch) | |
tree | 6cfe164c90b6c31521cae5a31fd9eb475e6022cd | |
parent | 04de6a64e2f7b3b235acd4ab779bfed30e59451f (diff) | |
download | rneovim-2999d7c0e89087f76711e914eb65af55578a6691.tar.gz rneovim-2999d7c0e89087f76711e914eb65af55578a6691.tar.bz2 rneovim-2999d7c0e89087f76711e914eb65af55578a6691.zip |
vim-patch:7.4.2229
https://github.com/vim/vim/commit/f04507d132fbcb63999167ec006fc6e700b5af4f
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)
-rw-r--r-- | src/nvim/buffer.c | 3 | ||||
-rw-r--r-- | src/nvim/fileio.c | 2 | ||||
-rw-r--r-- | src/nvim/version.c | 2 | ||||
-rw-r--r-- | src/nvim/vim.h | 4 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 504be8dde6..1534af478f 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -217,6 +217,9 @@ open_buffer ( # 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) diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index dcef09e21f..41117fdd3d 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1974,7 +1974,7 @@ failed: /// Do not accept "/dev/fd/[012]", opening these may hang Vim. /// /// @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 { return STRNCMP(fname, "/dev/fd/", 8) == 0 diff --git a/src/nvim/version.c b/src/nvim/version.c index ec4a804f2e..09ee23e58f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -215,7 +215,7 @@ static const int included_patches[] = { // 2232 NA 2231, 2230, - // 2229, + 2229, 2228, 2227, 2226, diff --git a/src/nvim/vim.h b/src/nvim/vim.h index f29ccdd296..5d2c27a2f4 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -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. #define LOWEST_WIN_ID 1000 +#if defined(__FreeBSD__) && defined(S_ISCHR) +# define OPEN_CHR_FILES +#endif + #endif /* NVIM_VIM_H */ |