Merge change 54982 from the trunk. This fixes the test_subprocess test in the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.
diff --git a/Include/fileobject.h b/Include/fileobject.h
index ebbb521..9fd0646 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -57,6 +57,11 @@
char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *);
+/* A routine to do sanity checking on the file mode string. returns
+ non-zero on if an exception occurred
+*/
+int _PyFile_SanitizeMode(char *mode);
+
#ifdef __cplusplus
}
#endif