diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -179,7 +179,11 @@ static VALUE rb_stat_mode(self) VALUE self; { - return UINT2NUM(get_stat(self)->st_mode); +#ifdef __BORLANDC__ + return UINT2NUM((unsigned short)(get_stat(self)->st_mode)); +#else + return UINT2NUM(get_stat(self)->st_mode); +#endif } static VALUE @@ -544,6 +548,14 @@ test_l(obj, fname) #ifndef S_ISLNK # ifdef _S_ISLNK # define S_ISLNK(m) _S_ISLNK(m) +# elif defined __BORLANDC__ +# ifdef _S_IFLNK +# define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == _S_IFLNK) +# else +# ifdef S_IFLNK +# define S_ISLNK(m) (((unsigned short)(m) & S_IFMT) == S_IFLNK) +# endif +# endif # else # ifdef _S_IFLNK # define S_ISLNK(m) ((m & S_IFMT) == _S_IFLNK) @@ -573,6 +585,14 @@ test_S(obj, fname) #ifndef S_ISSOCK # ifdef _S_ISSOCK # define S_ISSOCK(m) _S_ISSOCK(m) +# elif defined __BORLANDC__ +# ifdef _S_IFSOCK +# define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == _S_IFSOCK) +# else +# ifdef S_IFSOCK +# define S_ISSOCK(m) (((unsigned short)(m) & S_IFMT) == S_IFSOCK) +# endif +# endif # else # ifdef _S_IFSOCK # define S_ISSOCK(m) ((m & S_IFMT) == _S_IFSOCK) |