summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_openssl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 3555ae6275..abf223b5d1 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -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;