From: Bodo Möller <bodo@openssl.org>
Date: Mon, 11 Jun 2001 15:21:33 +0000 (+0000)
Subject: For MSDOS, the tty filename still is "con", not "/dev/tty" ...
X-Git-Tag: OpenSSL_0_9_6c~182^2~112
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=508f15cdabe9c66db694efb24028cc38b9bee261;p=oweals%2Fopenssl.git

For MSDOS, the tty filename still is "con", not "/dev/tty" ...
---

diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
index 63dc3713e4..bb66291ad5 100644
--- a/crypto/ui/ui_openssl.c
+++ b/crypto/ui/ui_openssl.c
@@ -436,9 +436,14 @@ static int open_console(UI *ui)
 	tty_in=stdin;
 	tty_out=stderr;
 #else
-	if ((tty_in=fopen("/dev/tty","r")) == NULL)
+#  ifdef OPENSSL_SYS_MSDOS
+#    define DEV_TTY "con"
+#  else
+#    define DEV_TTY "/dev/tty"
+#  endif
+	if ((tty_in=fopen(DEV_TTY,"r")) == NULL)
 		tty_in=stdin;
-	if ((tty_out=fopen("/dev/tty","w")) == NULL)
+	if ((tty_out=fopen(DEV_TTY,"w")) == NULL)
 		tty_out=stderr;
 #endif