forked from aniani/vim
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:
@@ -3138,11 +3138,7 @@ mch_isdir(char_u *name)
|
||||
return FALSE;
|
||||
if (stat((char *)name, &statb))
|
||||
return FALSE;
|
||||
#ifdef _POSIX_SOURCE
|
||||
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
|
||||
#else
|
||||
return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3159,11 +3155,7 @@ mch_isrealdir(char_u *name)
|
||||
return FALSE;
|
||||
if (mch_lstat((char *)name, &statb))
|
||||
return FALSE;
|
||||
#ifdef _POSIX_SOURCE
|
||||
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
|
||||
#else
|
||||
return ((statb.st_mode & S_IFMT) == S_IFDIR ? TRUE : FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int executable_file(char_u *name);
|
||||
|
Reference in New Issue
Block a user