1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-02-17 05:36:59 +00:00
parent 396f32c98e
commit d019ce0ad1
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Mon Feb 17 14:36:56 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* win32/win32.c (rb_w32_opendir, rb_w32_utime): need parens.
Mon Feb 17 14:13:25 2003 NAKAMURA Usaku <usa@ruby-lang.org> Mon Feb 17 14:13:25 2003 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (link): implement with CreateHardLink(). * win32/win32.c (link): implement with CreateHardLink().

View file

@ -1243,13 +1243,13 @@ rb_w32_opendir(const char *filename)
// check to see if we've got a directory // check to see if we've got a directory
// //
if ((rb_w32_stat (filename, &sbuf) < 0 || if ((rb_w32_stat(filename, &sbuf) < 0 || (
#ifdef __BORLANDC__ #ifdef __BORLANDC__
(unsigned short)(sbuf.st_mode) (unsigned short)(sbuf.st_mode)
#else #else
sbuf.st_mode sbuf.st_mode
#endif #endif
& _S_IFDIR == 0) && & _S_IFDIR) == 0) &&
(!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' || (!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) { ((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
return NULL; return NULL;
@ -3151,7 +3151,7 @@ rb_w32_utime(const char *path, struct utimbuf *times)
if (rb_w32_stat(path, &stat)) { if (rb_w32_stat(path, &stat)) {
return -1; return -1;
} }
if (stat.st_mode & S_IFDIR == 0 || IsWin95()) { if ((stat.st_mode & S_IFDIR) == 0 || IsWin95()) {
return utime(path, times); return utime(path, times);
} }