mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 21:57:18 +00:00
Made more cross-platform by changing ->_fileno to fileno().
This commit is contained in:
parent
181fa7c54d
commit
251b8ee6b0
|
@ -116,9 +116,9 @@ static FILE *wine_openpty(FILE **master, FILE **slave, char *name,
|
||||||
*slave = fds;
|
*slave = fds;
|
||||||
|
|
||||||
if (term != NULL)
|
if (term != NULL)
|
||||||
tcsetattr((*slave)->_fileno, TCSANOW, term);
|
tcsetattr(fileno(*slave), TCSANOW, term);
|
||||||
if (winsize != NULL)
|
if (winsize != NULL)
|
||||||
ioctl((*slave)->_fileno, TIOCSWINSZ, winsize);
|
ioctl(fileno(*slave), TIOCSWINSZ, winsize);
|
||||||
|
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
strcpy(name, pts_name);
|
strcpy(name, pts_name);
|
||||||
|
@ -143,10 +143,10 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ((*pid=fork()) == 0) {
|
if ((*pid=fork()) == 0) {
|
||||||
tcsetattr((*slave)->_fileno, TCSADRAIN, &term);
|
tcsetattr(fileno(*slave), TCSADRAIN, &term);
|
||||||
sprintf(buf, "-Sxx%d", (*master)->_fileno);
|
sprintf(buf, "-Sxx%d", fileno(*master));
|
||||||
execlp("xterm", "xterm", buf, NULL);
|
execlp("xterm", "xterm", buf, NULL);
|
||||||
ERR(console, "error creating AllocConsole xterm\n");
|
ERR(console, "error creating xterm\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
term.c_lflag |= ECHO;
|
term.c_lflag |= ECHO;
|
||||||
tcsetattr((*master)->_fileno, TCSADRAIN, &term);
|
tcsetattr(fileno(*master), TCSADRAIN, &term);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue