mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* 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:
		
							parent
							
								
									22c005569b
								
							
						
					
					
						commit
						224021104d
					
				
					 6 changed files with 24 additions and 43 deletions
				
			
		|  | @ -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. | ||||
|  |  | |||
|  | @ -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); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobu
						nobu