Portability patch for HP MPE/iX. Submitted by Mark Bixby <mark_bixby@hp.com>
[openssl.git] / crypto / des / read_pwd.c
index 9555abe3a58105064eecdea6657f5256fd4309b9..c27ec336e7b28aee5dff420e619cd6c71c677a9b 100644 (file)
@@ -271,7 +271,9 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
 #elif defined(MAC_OS_pre_X)
        tty=stdin;
 #else
+#ifndef MPE
        if ((tty=fopen("/dev/tty","r")) == NULL)
+#endif
                tty=stdin;
 #endif
 
@@ -312,8 +314,12 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
 
 #if defined(TTY_set) && !defined(VMS)
        if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
+#ifdef MPE 
+               ; /* MPE lies -- echo really has been disabled */
+#else
                return(-1);
 #endif
+#endif
 #ifdef VMS
        tty_new[0] = tty_orig[0];
        tty_new[1] = tty_orig[1] | TT$M_NOECHO;