summaryrefslogtreecommitdiff
path: root/xconsole.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-24 08:14:32 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-02-24 08:15:40 -0800
commit22a09b77093970423e721ebd8004a593d5f88a21 (patch)
treef152af54203c4a5306bf02a032bce8e4b7ae364a /xconsole.c
parent676edb80c54ac5ace45e641a3dde17751a3ab224 (diff)
unifdef -ULynx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xconsole.c')
-rw-r--r--xconsole.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/xconsole.c b/xconsole.c
index 65b1a1d..c29237e 100644
--- a/xconsole.c
+++ b/xconsole.c
@@ -175,7 +175,7 @@ static XrmOptionDescRec options[] = {
# include <sys/strredir.h>
# endif
# endif
-# if defined(TIOCCONS) || defined(SRIOCSREDIR) || defined(Lynx)
+# if defined(TIOCCONS) || defined(SRIOCSREDIR)
# define USE_PTY
static int tty_fd, pty_fd;
static char ttydev[64], ptydev[64];
@@ -217,16 +217,6 @@ static int child_pid;
#endif /* !__hpux */
#endif /* !PTYCHAR2 */
-#ifdef Lynx
-static void
-RestoreConsole(void)
-{
- int fd;
- if ((fd = open("/dev/con", O_RDONLY)) >= 0)
- newconsole(fd);
-}
-#endif
-
static void
OpenConsole(void)
{
@@ -236,7 +226,7 @@ OpenConsole(void)
if (!strcmp (app_resources.file, "console"))
{
/* must be owner and have read/write permission */
-#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(Lynx)
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
struct stat sbuf;
# if !defined (linux)
if (!stat("/dev/console", &sbuf) &&
@@ -260,7 +250,6 @@ OpenConsole(void)
if (ioctl (tty_fd, TIOCCONS, (char *) &on) != -1)
input = fdopen (pty_fd, "r");
# else
-# ifndef Lynx
int consfd = open("/dev/console", O_RDONLY);
if (consfd >= 0)
{
@@ -268,15 +257,6 @@ OpenConsole(void)
input = fdopen (pty_fd, "r");
close(consfd);
}
-# else
- if (newconsole(tty_fd) < 0)
- perror("newconsole");
- else
- {
- input = fdopen (pty_fd, "r");
- atexit(RestoreConsole);
- }
-# endif
# endif
}
#endif /* USE_PTY */