From 02080280a2a10265f9ef3233159d933853019551 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Tue, 16 Apr 1996 18:16:07 +0000 Subject: [PATCH] Changes so HPUX doesn't use streams. This may break on HPUX10 depending on how you should get the name of the pts side of /dev/ptym/clone. I don't have an HPUX10 system to test on. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7816 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 7 +++++++ src/util/pty/configure.in | 3 +-- src/util/pty/getpty.c | 7 +++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index b5c6cd55e..0d40025ad 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,10 @@ +Tue Apr 16 13:43:43 1996 Sam Hartman + + * configure.in : Don't use streams on HPUX. + + * getpty.c (pty_getpty): Check /dev/ptym/clone for HPUX10, only + try /dev/ptmx if HAVE_STREAMS defined so we can bipass for HPUX9. + Sun Apr 14 00:36:33 1996 Sam Hartman * pty-int.h: Don't include sys/wait.h here. diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index 683b6b959..74fd5df7a 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -43,8 +43,7 @@ alpha-dec-osf*) AC_DEFINE(PUSH_TTCOMPAT) ;; *-*-hpux*) - AC_DEFINE(PUSH_PTEM) - AC_DEFINE(PUSH_LDTERM) + krb5_cv_has_streams=no ;; esac dnl diff --git a/src/util/pty/getpty.c b/src/util/pty/getpty.c index dd86aa6cf..008422557 100644 --- a/src/util/pty/getpty.c +++ b/src/util/pty/getpty.c @@ -63,13 +63,16 @@ close(slavefd); return 0; #else /*HAVE__GETPTY*/ - *fd = open("/dev/ptmx", O_RDWR|O_NDELAY); /* Solaris*/ + *fd = open(" /dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX*/ +#ifdef HAVE_STREAMS + if (*fd < 0) *fd = open("/dev/ptmx",O_RDWR|O_NDELAY); /*Solaris*/ +#endif if (*fd < 0) *fd = open("/dev/ptc", O_RDWR|O_NDELAY); /* AIX */ if (*fd < 0) *fd = open("/dev/pty", O_RDWR|O_NDELAY); /* sysvimp */ if (*fd >= 0) { -#ifdef HAVE_GRANTPT +#if defined(HAVE_GRANTPT)&&defined(HAVE_STREAMS) if (grantpt(*fd) || unlockpt(*fd)) return PTY_GETPTY_STREAMS; #endif -- 2.26.2