From 251b8ee6b0a81a6114be75492f9cd9376eaf713b Mon Sep 17 00:00:00 2001 From: Joseph Pranevich Date: Mon, 14 Dec 1998 14:38:10 +0000 Subject: [PATCH] Made more cross-platform by changing ->_fileno to fileno(). --- console/xterm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/console/xterm.c b/console/xterm.c index cb675f793b9..e76e89c41dc 100644 --- a/console/xterm.c +++ b/console/xterm.c @@ -116,9 +116,9 @@ static FILE *wine_openpty(FILE **master, FILE **slave, char *name, *slave = fds; if (term != NULL) - tcsetattr((*slave)->_fileno, TCSANOW, term); + tcsetattr(fileno(*slave), TCSANOW, term); if (winsize != NULL) - ioctl((*slave)->_fileno, TIOCSWINSZ, winsize); + ioctl(fileno(*slave), TIOCSWINSZ, winsize); if (name != NULL) strcpy(name, pts_name); @@ -143,10 +143,10 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid) return FALSE; if ((*pid=fork()) == 0) { - tcsetattr((*slave)->_fileno, TCSADRAIN, &term); - sprintf(buf, "-Sxx%d", (*master)->_fileno); + tcsetattr(fileno(*slave), TCSADRAIN, &term); + sprintf(buf, "-Sxx%d", fileno(*master)); execlp("xterm", "xterm", buf, NULL); - ERR(console, "error creating AllocConsole xterm\n"); + ERR(console, "error creating xterm\n"); exit(1); } @@ -168,7 +168,7 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid) } } term.c_lflag |= ECHO; - tcsetattr((*master)->_fileno, TCSADRAIN, &term); + tcsetattr(fileno(*master), TCSADRAIN, &term); return TRUE; }