]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Allow reading stdin on Windows instead of forcibly opening console
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 14 Aug 2017 09:42:41 +0000 (10:42 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 14 Aug 2017 09:51:29 +0000 (10:51 +0100)
commitd298a8b6ceb2dd57b1e1d032122329704f05ef4f
treeda4c270ff2d884f3b4ec40be12463072d230ee4a
parent0b103e8d4c7e7fb3c00e62c2fb1cf28c57e25faf
Allow reading stdin on Windows instead of forcibly opening console

This was filed against Ľubomír Carik's github project for openconnect-gui;
https://github.com/openconnect/openconnect-gui/issues/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>
main.c
www/changelog.xml