[Python-Dev] RE: test_file failing on Windows

Tim Peters tim.one@home.com
Mon, 12 Nov 2001 12:12:18 -0500


[Jack Jansen]
> Ah. Then, shouldn't we have an option WITHOUT_STDIO_ERRNO or 
> somesuch, and ignore the errno values if it is defined?

We already have NO_FOPEN_ERRNO; the comment says "Metroworks [sic] only".

> "Cannot open file" doesn't say much,  but it's better than "Errno 0".

#ifdef NO_FOPEN_ERRNO
		/* Metroworks only, not testable, so unchanged */
		if (errno == 0) {
			PyErr_SetString(PyExc_IOError, "Cannot open file");
			return NULL;
		}
#endif

So it's not saying "Errno 0" in that case.

> If I'm right in guessing that configure is only used on unix (am I?)

Yes.

> then adding support for this option to configure isn't needed, I guess.

I'm not clear on what you would like beyond NO_FOPEN_ERRNO.