summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
committerH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
commitd0b3651906aa943423e430a61437a42f7dd39422 (patch)
tree9d8c8beee149c50f44406ee8cd6dee4c3913c28f /file.c
parentceade7b9268e9620b123843afeb25a7136f8a576 (diff)
new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/file.c b/file.c
index 718a38075e..33b9cc985b 100644
--- a/file.c
+++ b/file.c
@@ -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)