summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-15 03:44:58 (GMT)
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-15 03:44:58 (GMT)
commit5570dba96fe017692a5790a176619234301ff3cb (patch)
tree2506a4d43c50d5cad021347c5bde984bac566598 /dir.c
parentea3211720d1634f39e40c3d1f56d924502bddb0c (diff)
nogvl readdir make SEGV on Windows
* dir.c (readdir_without_gvl): workaround for Windows. [Bug #14108] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index d8a7800..519a3fc 100644
--- a/dir.c
+++ b/dir.c
@@ -743,6 +743,7 @@ to_be_skipped(const struct dirent *dp)
return FALSE;
}
+#ifndef _WIN32
static void *
nogvl_readdir(void *ptr)
{
@@ -756,6 +757,9 @@ readdir_without_gvl(struct dir_data *dirp)
{
return rb_thread_call_without_gvl(nogvl_readdir, dirp, RUBY_UBF_IO, 0);
}
+#else
+#define readdir_without_gvl(dirp) READDIR((dirp)->dir, (dirp)->enc)
+#endif
/*
* call-seq: