mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c: use ruby's opendir on mingw32.
* missing/dir.h, dir.c, Makefile: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
80b1bf4612
commit
eb3d9aa147
5 changed files with 15 additions and 10 deletions
8
dir.c
8
dir.c
|
@ -26,10 +26,10 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
#if defined HAVE_DIRENT_H && !defined NT
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#elif HAVE_DIRECT_H
|
||||
#elif defined HAVE_DIRECT_H && !defined NT
|
||||
# include <direct.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
|
@ -44,7 +44,7 @@
|
|||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
# if defined(NT) && defined(_MSC_VER)
|
||||
# if defined(NT)
|
||||
# include "missing/dir.h"
|
||||
# endif
|
||||
#endif
|
||||
|
@ -609,7 +609,7 @@ rb_glob_helper(path, flag, func, arg)
|
|||
rb_glob_helper(buf, flag, func, arg);
|
||||
free(buf);
|
||||
}
|
||||
if (stat(dir, &st) < 0) {
|
||||
if (rb_sys_stat(dir, &st) < 0) {
|
||||
free(base);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue