mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0268: file type checking has too many #ifdef
Problem: File type checking has too many #ifdef. Solution: Always define the S_IF macros. (Ken Takata, closes #3306)
This commit is contained in:
@@ -550,7 +550,7 @@ staterr:
|
||||
}
|
||||
|
||||
/* if filename is a directory, append the cscope database name to it */
|
||||
if ((statbuf.st_mode & S_IFMT) == S_IFDIR)
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
{
|
||||
fname2 = (char *)alloc((unsigned)(strlen(CSCOPE_DBFILE) + strlen(fname) + 2));
|
||||
if (fname2 == NULL)
|
||||
@@ -581,12 +581,7 @@ staterr:
|
||||
|
||||
i = cs_insert_filelist(fname2, ppath, flags, &statbuf);
|
||||
}
|
||||
#if defined(UNIX)
|
||||
else if (S_ISREG(statbuf.st_mode) || S_ISLNK(statbuf.st_mode))
|
||||
#else
|
||||
/* WIN32 - substitute define S_ISREG from os_unix.h */
|
||||
else if (((statbuf.st_mode) & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
{
|
||||
i = cs_insert_filelist(fname, ppath, flags, &statbuf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user