mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
Use S_IS* macros instead of S_IF*, which are non-posix
darcs-hash:20060801002411-ac50b-e5afcbfe4adfc54333c982b43309091c1cbcc1c9.gz
This commit is contained in:
parent
8e6dbe245c
commit
03f6656af6
|
@ -81,7 +81,7 @@ static int my_env_set( const wchar_t *key, array_list_t *val, int scope )
|
|||
show_perror = 1;
|
||||
}
|
||||
|
||||
if( !( S_IFDIR & buff.st_mode ) )
|
||||
if( !( S_ISDIR(buff.st_mode) ) )
|
||||
{
|
||||
error = 1;
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ static int test_flags( wchar_t *filename,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if( S_IFDIR & buf.st_mode )
|
||||
if( S_ISDIR( buf.st_mode ) )
|
||||
return 1;
|
||||
|
||||
if( flags & EXECUTABLES_ONLY )
|
||||
|
@ -684,7 +684,7 @@ int wildcard_expand( const wchar_t *wc,
|
|||
|
||||
if( !stat_res )
|
||||
{
|
||||
if( buf.st_mode & S_IFDIR )
|
||||
if( S_ISDIR(buf.st_mode) )
|
||||
{
|
||||
new_len = wcslen( new_dir );
|
||||
new_dir[new_len] = L'/';
|
||||
|
|
Loading…
Reference in New Issue
Block a user