From 224021104d13cbb060cdf87914361503226e4adf Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 19 Jan 2004 12:28:14 +0000 Subject: * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: remove useless casts for Borland C. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 1acb858fd1..6a345aad99 100644 --- a/file.c +++ b/file.c @@ -231,11 +231,7 @@ static VALUE rb_stat_mode(self) VALUE self; { -#ifdef __BORLANDC__ - return UINT2NUM((unsigned short)(get_stat(self)->st_mode)); -#else return UINT2NUM(get_stat(self)->st_mode); -#endif } /* @@ -838,14 +834,6 @@ 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) @@ -882,14 +870,6 @@ 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) @@ -1046,7 +1026,7 @@ test_wr(obj, fname) if (rb_stat(fname, &st) < 0) return Qnil; if ((st.st_mode & (S_IROTH)) == S_IROTH) { - return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO)); + return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO)); } #endif return Qnil; @@ -1109,7 +1089,7 @@ test_ww(obj, fname) if (rb_stat(fname, &st) < 0) return Qfalse; if ((st.st_mode & (S_IWOTH)) == S_IWOTH) { - return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO)); + return UINT2NUM(st.st_mode & (S_IRUGO|S_IWUGO|S_IXUGO)); } #endif return Qnil; -- cgit v1.2.3