NON-WORKING python with an older version of the MinGW patch.
[fedora-mingw.git] / python / python-2.5.1-listdir.patch
diff --git a/python/python-2.5.1-listdir.patch b/python/python-2.5.1-listdir.patch
new file mode 100644 (file)
index 0000000..1c4fc3f
--- /dev/null
@@ -0,0 +1,18 @@
+--- Python-2.5.1/Modules/posixmodule.c.orig    2007-04-04 14:30:56.000000000 -0400
++++ Python-2.5.1/Modules/posixmodule.c 2008-06-14 17:35:47.000000000 -0400
+@@ -2160,7 +2160,6 @@
+       struct dirent *ep;
+       int arg_is_unicode = 1;
+-      errno = 0;
+       if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
+               arg_is_unicode = 0;
+               PyErr_Clear();
+@@ -2176,6 +2175,7 @@
+               return NULL;
+       }
+       for (;;) {
++              errno = 0;
+               Py_BEGIN_ALLOW_THREADS
+               ep = readdir(dirp);
+               Py_END_ALLOW_THREADS