[Bug 26914] New: setvbuf() breaks iostream input (msvcrt/msvcp)
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Apr 23 18:59:28 CDT 2011
http://bugs.winehq.org/show_bug.cgi?id=26914
Summary: setvbuf() breaks iostream input (msvcrt/msvcp)
Product: Wine
Version: 1.3.17
Platform: x86
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
AssignedTo: wine-bugs at winehq.org
ReportedBy: UncombedCoconut at gmail.com
This bug affects Stockfish, a chess engine. I've made a simplified test case.
This C++ program copies a line from stdin to stdout, or complains on EOF.
It works on WinXP, but under Wine 1.2.2 or 1.3.17 it says "No input". (You do
have to type a line before it will terminate.)
Here's the code and build command. The exe is attached.
$ cat setvbuf-test.cpp
#include <iostream>
#include <cstdio>
#include <string>
int main() {
std::string input;
setvbuf(stdin,NULL,_IONBF,0);
setvbuf(stdout,NULL,_IONBF,0);
if (std::getline(std::cin, input))
std::cout << "Input was: " << input << "\n";
else
std::cout << "No input\n";
return 0;
}
$ i686-w64-mingw32-g++ -o setvbuf-test.exe -static-libgcc setvbuf-test.cpp
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list