[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2015-01-29 Thread Tomasz Wasilczyk
Tomasz Wasilczyk added the comment: It seems that bug remains *not* fixed. Just like eaducac pointed out, there are cases when underlying file handle is -2, which is not a valid file handle, but *is* a valid handle (which is GetCurrentThread). Thus, provided dup solution accepts it, while

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2015-01-29 Thread Tomasz Wasilczyk
Tomasz Wasilczyk added the comment: I don't mean fixing VS, but providing a workaround in Python code, when compiled with VS2012. I know newer VS versions are fixed. Do you mean, VS2012 is not supported? If it's not - then LibreOffice team have a problem, because their official release

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2015-01-29 Thread Tomasz Wasilczyk
Tomasz Wasilczyk added the comment: In such case, I agree it's an enhancement, not a bugfix. Could go into 3.5 branch. How about changing the ifdef to the following, to avoid any issues on non-MSVS2012: #if defined(MS_WINDOWS) defined(HAVE_FSTAT) defined(_MSC_VER) _MSC_VER == 1700