summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/fileobject.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 56cf40a..1fed47b 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -68,6 +68,17 @@ size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *);
*/
int _PyFile_SanitizeMode(char *mode);
+#if defined _MSC_VER && _MSC_VER >= 1400
+/* A routine to check if a file descriptor is valid on Windows. Returns 0
+ * and sets errno to EBADF if it isn't. This is to avoid Assertions
+ * from various functions in the Windows CRT beginning with
+ * Visual Studio 2005
+ */
+int _PyVerify_fd(int fd);
+#else
+#define _PyVerify_fd(A) (1) /* dummy */
+#endif
+
#ifdef __cplusplus
}
#endif