mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
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:
@@ -216,6 +216,9 @@ open_buffer (
|
||||
# endif
|
||||
# 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;
|
||||
|
@@ -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
|
||||
|
@@ -215,7 +215,7 @@ static const int included_patches[] = {
|
||||
// 2232 NA
|
||||
2231,
|
||||
2230,
|
||||
// 2229,
|
||||
2229,
|
||||
2228,
|
||||
2227,
|
||||
2226,
|
||||
|
@@ -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 */
|
||||
|
Reference in New Issue
Block a user