if ((tty=fopen("con","w+")) == NULL)
if ((tty=fopen("con","w")) == NULL)
static int open_console(UI *ui)	{	CRYPTO_w_lock(CRYPTO_LOCK_UI);	is_a_tty = 1;#ifdef OPENSSL_SYS_MSDOS	if ((tty=fopen("con","w+")) == NULL)		tty=stdin;#elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC)	tty=stdin;#else	if ((tty=fopen("/dev/tty","w+")) == NULL)		tty=stdin;#endif#if defined(TTY_get) && !defined(VMS)	if (TTY_get(fileno(tty),&tty_orig) == -1)		{#ifdef ENOTTY		if (errno == ENOTTY)			is_a_tty=0;		else#endif#ifdef EINVAL		/* Ariel Glenn ariel@columbia.edu reports that solaris		 * can return EINVAL instead.  This should be ok */		if (errno == EINVAL)			is_a_tty=0;		else#endif			return 0;		}#endif#ifdef OPENSSL_SYS_VMS	status = sys$assign(&terminal,&channel,0,0);	if (status != SS$_NORMAL)		return 0;	status=sys$qiow(0,channel,IO$_SENSEMODE,&iosb,0,0,tty_orig,12,0,0,0,0);	if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL))		return 0;#endif	return 1;	}