summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ext/digest/defs.h8
-rw-r--r--file.c24
-rw-r--r--win32/dir.h5
-rw-r--r--win32/win32.c11
-rw-r--r--win32/win32.h8
6 files changed, 24 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index 92a7f86cd94..b15e248bfb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jan 19 21:28:06 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/digest/defs.h, win32/win3.c, win32/win32.h, file.c: remove
+ useless casts for Borland C.
+
Mon Jan 19 17:39:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* error.c (NameError::message): internal use only.
@@ -26,7 +31,7 @@ Mon Jan 19 06:49:07 2004 Tadayoshi Funaba <tadf@dotrb.org>
Mon Jan 19 01:08:39 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
- * variable.c (rb_set_class_path): do not set path if
+ * variable.c (rb_set_class_path): do not set path if
* lib/cgi.rb (CGI::QueryExtension): give extended string, not a
delegater object.
@@ -132,7 +137,7 @@ Wed Jan 14 00:58:35 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
StandardError to Exception. [ruby-talk:89782]
Tue Jan 13 18:03:02 2004 Ian Macdonald <ian@caliban.org>
-
+
* file.c (rb_stat_wr, rb_stat_ww): New functions
implementing new methods (File::Stat#world_readable?,
File::Stat#world_writable?).
@@ -147,7 +152,7 @@ Tue Jan 13 16:50:03 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: use $0 as the default application class name.
Tue Jan 13 14:48:00 2004 Ian Macdonald <ian@caliban.org>
-
+
* lib/pathname.rb: New methods (Pathname#world_readable?,
Pathname#world_writable?).
diff --git a/ext/digest/defs.h b/ext/digest/defs.h
index 5cfc77dd243..b9a3470e652 100644
--- a/ext/digest/defs.h
+++ b/ext/digest/defs.h
@@ -23,12 +23,8 @@
typedef unsigned int uint32_t;
# if SIZEOF_LONG == 8
typedef unsigned long uint64_t;
-# elif defined(__GNUC__)
- typedef unsigned long long uint64_t;
-# elif defined(_MSC_VER)
- typedef unsigned _int64 uint64_t;
-# elif defined(__BORLANDC__)
- typedef unsigned __int64 uint64_t;
+# elif SIZEOF_LONG_LONG == 8
+ typedef unsigned LONG_LONG uint64_t;
# else
# define NO_UINT64_T
# endif
diff --git a/file.c b/file.c
index 1acb858fd17..6a345aad996 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;
diff --git a/win32/dir.h b/win32/dir.h
index 1f1f66649a2..e12c6e159c0 100644
--- a/win32/dir.h
+++ b/win32/dir.h
@@ -1,3 +1,6 @@
+#ifndef RUBY_WIN32_DIR_H
+#define RUBY_WIN32_DIR_H
+
#ifdef __BORLANDC__
# ifndef WIN32_DIR_H_
# define WIN32_DIR_H_
@@ -37,3 +40,5 @@ void rb_w32_closedir(DIR *);
#define seekdir rb_w32_seekdir
#define rewinddir rb_w32_rewinddir
#define closedir rb_w32_closedir
+
+#endif /* RUBY_WIN32_DIR_H */
diff --git a/win32/win32.c b/win32/win32.c
index b1b55d34e10..4a6479bfa3a 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -583,7 +583,6 @@ isInternalCmd(const char *cmd, const char *interp)
return 1;
}
-
SOCKET
rb_w32_get_osfhandle(int fh)
{
@@ -1748,12 +1747,7 @@ setgid(int gid)
//
int
-/* ioctl(int i, unsigned int u, char *data) */
-#ifdef __BORLANDC__
- ioctl(int i, int u, ...)
-#else
- ioctl(int i, unsigned int u, long data)
-#endif
+ioctl(int i, int u, ...)
{
return -1;
}
@@ -2489,6 +2483,9 @@ rb_w32_getcwd(buffer, size)
char *bp;
#undef getcwd
+#ifndef __BORLANDC__
+#define getcwd _getcwd
+#endif
if (getcwd(buffer, size) == NULL) {
return NULL;
}
diff --git a/win32/win32.h b/win32/win32.h
index 92dd59c169e..7122ec9a208 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -57,7 +57,7 @@ extern "C++" {
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
-#if !defined(__BORLANDC__)
+#ifdef HAVE_SYS_UTIME_H
# include <sys/utime.h>
#else
# include <utime.h>
@@ -188,7 +188,7 @@ extern pid_t rb_w32_getpid(void);
#endif
#endif
-#ifdef __BORLANDC__
+#if 0 && defined __BORLANDC__
#undef S_ISDIR
#undef S_ISFIFO
#undef S_ISBLK
@@ -240,9 +240,7 @@ extern pid_t rb_w32_getpid(void);
//
// stubs
//
-#if !defined(__BORLANDC__)
-extern int ioctl (int, unsigned int, long);
-#endif
+extern int ioctl (int, int, ...);
extern UIDTYPE getuid (void);
extern UIDTYPE geteuid (void);
extern GIDTYPE getgid (void);