提交 b49a5b2d 编写于 作者: D Dr. Stephen Henson

Fix for new UI functions under Win32.

For some unknown reason fopen("con", "w") is the
only way to make this work. Using "r+" and "w+"
causes the fopen call to fail and the fallback
(using stdin) doesn't work because writing to stdin
fails.
上级 713f2261
......@@ -430,7 +430,10 @@ static int open_console(UI *ui)
is_a_tty = 1;
#ifdef OPENSSL_SYS_MSDOS
if ((tty=fopen("con","w+")) == NULL)
/* For some bizarre reason this call to fopen() on Windows
* fails if the mode is "w+" or "r+", whereas "w" works fine.
*/
if ((tty=fopen("con","w")) == NULL)
tty=stdin;
#elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)
tty=stdin;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册