no readdir_r on windows; refs #7

This commit is contained in:
Marc Wäckerlin
2013-11-07 09:45:21 +00:00
parent b57731d286
commit fe2b0f0c29

View File

@@ -361,7 +361,8 @@ namespace mrw {
static const std::string D("."), DD("..");
static dirent* fake;
# if defined(WIN32) || defined(_WIN32) || defined(__MINGW32__)
if (!(_entry.entry()=readdir(_dir))) return false;
if (!(fake=readdir(_dir))) return false;
_entry.entry()=*fake;
# else
if (readdir_r(_dir, &_entry.entry(), &fake) || !fake) return false;
# endif