vim-patch:8.1.0268: file type checking has too many #ifdef (#13182)

Problem:    File type checking has too many #ifdef.
Solution:   Always define the S_IF macros. (Ken Takata, closes vim/vim#3306)
d569bb0299
This commit is contained in:
tamago324
2020-11-07 07:59:28 +09:00
committed by GitHub
parent d17e508796
commit 40a742725c
7 changed files with 65 additions and 95 deletions

View File

@@ -220,13 +220,8 @@ int open_buffer(
int perm;
perm = os_getperm((const char *)curbuf->b_ffname);
if (perm >= 0 && (0
# ifdef S_ISFIFO
|| S_ISFIFO(perm)
# endif
# ifdef S_ISSOCK
if (perm >= 0 && (0 || S_ISFIFO(perm)
|| S_ISSOCK(perm)
# endif
# ifdef OPEN_CHR_FILES
|| (S_ISCHR(perm)
&& is_dev_fd_file(curbuf->b_ffname))