Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Allow reading stdin on Windows instead of forcibly opening console
This was filed against Ľubomír Carik's github project for openconnect-gui; openconnect/openconnect-gui#101 It isn't perfect, as the ANSI code page on Windows can be different from the OEM code page used for the console, so fgetws() is likely to do the wrong thing — which is why we force-opened the console and used ReadConsoleW() in the first place. But perfect is the enemy of good in this case, as reading from something other than stdin is *definitely* wrong. We still use ReadConsoleW() when stdin does happen to be the console, so that part shouldn't regress. I hate Windows... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
- Loading branch information
Showing
2 changed files
with
25 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters