Fixes for Windows XP

This commit is contained in:
Vladislav Vaintroub 2013-03-26 10:34:21 +01:00
parent bfac7d637f
commit db65e4f537

View File

@ -67,7 +67,8 @@ void get_tty_password_buff(const char *opt_message, char *to, size_t length)
char *pos=to,*end=to+length-1;
int i=0;
consoleinput= CreateFile("CONIN$", GENERIC_WRITE | GENERIC_READ, 0 , NULL, 0, 0, NULL);
consoleinput= CreateFile("CONIN$", GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ ,
NULL, OPEN_EXISTING, 0, NULL);
if (consoleinput == NULL || consoleinput == INVALID_HANDLE_VALUE)
{
/* This is a GUI application or service without console input, bail out. */