[Python-checkins] r69516 - python/trunk/Include/fileobject.h
hirokazu.yamamoto
python-checkins at python.org
Wed Feb 11 05:13:07 CET 2009
Author: hirokazu.yamamoto
Date: Wed Feb 11 05:13:06 2009
New Revision: 69516
Log:
Issue #5204: Define _PyVerify_fd on VC6 to make
test_fdopen (test_os.py) pass.
Modified:
python/trunk/Include/fileobject.h
Modified: python/trunk/Include/fileobject.h
==============================================================================
--- python/trunk/Include/fileobject.h (original)
+++ python/trunk/Include/fileobject.h Wed Feb 11 05:13:06 2009
@@ -75,6 +75,9 @@
* Visual Studio 2005
*/
int _PyVerify_fd(int fd);
+#elif defined _MSC_VER && _MSC_VER >= 1200
+/* fdopen doesn't set errno EBADF and crashes for large fd on debug build */
+#define _PyVerify_fd(fd) (_get_osfhandle(fd) >= 0)
#else
#define _PyVerify_fd(A) (1) /* dummy */
#endif
More information about the Python-checkins
mailing list