summaryrefslogtreecommitdiff
path: root/gnome-pty-helper
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2003-05-19 22:48:58 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2003-05-19 22:48:58 +0000
commit03b492bb77735482d33094bd0e038ec8e3173506 (patch)
tree708624fae081e40c98ae08cce087c24dcc196044 /gnome-pty-helper
parent7253cf3dbbb732d67699c3f69484e859f34fd102 (diff)
remove comma from end of enum declaration (#111925). don't use
* src/iso2022.c, src/keymap.c, src/mev.c, src/vtebg.h, src/vteglyph.h: remove comma from end of enum declaration (#111925). * src/vtetc.c: don't use parameter-as-array-size compiler extension (#111925). * src/ssfe.c: don't assume that the compiler interprets \e correctly, use %c with value of 27 instead (#111925). * doc/reference/Makefile.am: obey CPPFLAGS and LDFLAGS (#111925). * gnome-pty-helper/gnome-utmp.c: only include <utmp.h> if HAVE_UTMP_H was defined (#111925). * src/keymap.c, src/ssfe.c: unconditionally include <term.h> if we defined HAVE_CURSES or HAVE_NCURSES, as having the header is a precondition for defining either (#111925). * src/iso2022.c: make each array have at least one element (#111925). * src/pty.c, src/gnome-login-support.c: try to open /dev/ptc if opening /dev/ptmx fails due to ENOENT (#111925).
Diffstat (limited to 'gnome-pty-helper')
-rw-r--r--gnome-pty-helper/gnome-login-support.c5
-rw-r--r--gnome-pty-helper/gnome-utmp.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gnome-pty-helper/gnome-login-support.c b/gnome-pty-helper/gnome-login-support.c
index 9112736..bf7fe88 100644
--- a/gnome-pty-helper/gnome-login-support.c
+++ b/gnome-pty-helper/gnome-login-support.c
@@ -191,6 +191,11 @@ pty_open_master (char *pty_name, int *used_bsd)
pty_master = open (pty_name, O_RDWR);
+ if ((pty_master == -1) && (errno == ENOENT)) {
+ strcpy (pty_name, "/dev/ptc"); /* AIX */
+ pty_master = open (pty_name, O_RDWR);
+ }
+
/*
* Try BSD open, this is needed for Linux which
* might have Unix98 devices but no kernel support
diff --git a/gnome-pty-helper/gnome-utmp.c b/gnome-pty-helper/gnome-utmp.c
index 87e7b96..d18b1b0 100644
--- a/gnome-pty-helper/gnome-utmp.c
+++ b/gnome-pty-helper/gnome-utmp.c
@@ -33,8 +33,6 @@
# endif
#endif
-#include <utmp.h>
-
#if defined(HAVE_LASTLOG_H)
# include <lastlog.h>
#endif
@@ -43,6 +41,10 @@
# include <paths.h>
#endif
+#if defined(HAVE_UTMP_H)
+# include <utmp.h>
+#endif
+
#if defined(HAVE_UTMPX_H)
# include <utmpx.h>
#endif