* win32/win32.c: use ruby's opendir on mingw32.
* win32/dir.h, dir.c, Makefile: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8de229963c
commit
2ed9c79bbb
@ -1,3 +1,9 @@
|
|||||||
|
Mon Apr 2 01:16:24 2001 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c: use ruby's opendir on mingw32.
|
||||||
|
|
||||||
|
* win32/dir.h, dir.c, Makefile: ditto.
|
||||||
|
|
||||||
Sat Mar 31 04:47:55 2001 Shugo Maeda <shugo@ruby-lang.org>
|
Sat Mar 31 04:47:55 2001 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/imap.rb: add document and example code.
|
* lib/net/imap.rb: add document and example code.
|
||||||
|
@ -231,7 +231,7 @@ dl_os2.@OBJEXT@: $(srcdir)/missing/dl_os2.c
|
|||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dl_os2.c
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dl_os2.c
|
||||||
|
|
||||||
win32.@OBJEXT@: $(srcdir)/win32/win32.c
|
win32.@OBJEXT@: $(srcdir)/win32/win32.c
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/win32/win32.c
|
$(CC) $(CFLAGS) $(CPPFLAGS) -I$(srcdir)/win32 -c $(srcdir)/win32/win32.c
|
||||||
|
|
||||||
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
6
dir.c
6
dir.c
@ -26,10 +26,10 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_DIRENT_H
|
#if defined HAVE_DIRENT_H && !defined NT
|
||||||
# include <dirent.h>
|
# include <dirent.h>
|
||||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||||
#elif HAVE_DIRECT_H
|
#elif defined HAVE_DIRECT_H && !defined NT
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||||
#else
|
#else
|
||||||
@ -44,7 +44,7 @@
|
|||||||
# if HAVE_NDIR_H
|
# if HAVE_NDIR_H
|
||||||
# include <ndir.h>
|
# include <ndir.h>
|
||||||
# endif
|
# endif
|
||||||
# if defined(NT) && defined(_MSC_VER)
|
# if defined(NT)
|
||||||
# include "win32/dir.h"
|
# include "win32/dir.h"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -1321,7 +1321,6 @@ NtMakeCmdVector (char *cmdline, char ***vec, int InputCmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if !defined __MINGW32__
|
|
||||||
//
|
//
|
||||||
// UNIX compatible directory access functions for NT
|
// UNIX compatible directory access functions for NT
|
||||||
//
|
//
|
||||||
@ -1350,7 +1349,7 @@ opendir(const char *filename)
|
|||||||
// check to see if we\'ve got a directory
|
// check to see if we\'ve got a directory
|
||||||
//
|
//
|
||||||
|
|
||||||
if ((stat (filename, &sbuf) < 0 ||
|
if ((win32_stat (filename, &sbuf) < 0 ||
|
||||||
sbuf.st_mode & _S_IFDIR == 0) &&
|
sbuf.st_mode & _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)) {
|
||||||
@ -1507,7 +1506,6 @@ closedir(DIR *dirp)
|
|||||||
free(dirp->start);
|
free(dirp->start);
|
||||||
free(dirp);
|
free(dirp);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user