[Python-Dev] Re: test_file failing on Windows
Jeremy Hylton
jeremy@zope.com
Fri, 9 Nov 2001 14:32:42 -0500 (EST)
open_the_file() uses errno to check the return value of fopen(). On
Windows, should it use GetLastError() ?
It seems that errno usually does the right thing on Windows, in that
it's usually set to the expected error when fopen() fails. The change
I made checks for EINVAL on Unix, which means the mode argument was
invalid. It looks like Windows sets errno to 0 in this case. I
wondered if GetLastError() would provide a more helpful error code.
Jeremy