зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
22c005569b
Коммит
224021104d
11
ChangeLog
11
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?).
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
24
file.c
24
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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче