From 074fdfb04e84dc2646f5041b051e23ddf39fd8c3 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Fri, 14 Jul 1995 00:59:31 +0000 Subject: [PATCH] * Tell configure.in that AIX doesn't have streams; it has the header files but not a streams TTY interface that is widely used. More important, strops.h breaks _IO. * Use ptsname() before ttyname() if present; it is more likely to give what we want. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6295 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 11 +++++++++++ src/appl/bsd/configure.in | 4 ++++ src/appl/bsd/krlogind.c | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index fec8229b8..606de5fa6 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,14 @@ +Thu Jul 13 17:49:54 1995 Sam Hartman + + * configure.in : Short circuit the streams test for AIX to false + because AIX strops.h trashes definition of _IO from sys/ioctl.h. + I think this is fixed in AIX4, so the test is only bypassed for + AIX3. + +Tue Jul 11 12:50:16 1995 Sam Hartman + + * krlogind.c (getpty): Use ptsname before ttyname; it has a higher + chance of doing what we want. Fri Jul 7 15:40:42 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Remove all explcitit library handling. diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index b68eeb59f..80429e2a4 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -17,6 +17,10 @@ dnl Make our operating system-specific security checks and definitions for dnl login. dnl case $krb5_cv_host in +*-*-aix3*) # AIX has streams include files but not streams TTY +# Moreover, strops.h trashes sys/ioctl.h +krb5_cv_has_streams=no +;; alpha-dec-osf*) AC_CHECK_LIB(security,main, AC_DEFINE(HAVE_SETLUID) diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 04fd6190c..8724841fe 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -1425,11 +1425,11 @@ getpty(fd,slave) if (grantpt(*fd) || unlockpt(*fd)) return 1; #endif -#ifdef HAVE_TTYNAME - p = ttyname(*fd); -#else #ifdef HAVE_PTSNAME p = ptsname(*fd); +#else +#ifdef HAVE_TTYNAME + p = ttyname(*fd); #else /* XXX If we don't have either what do we do */ #endif -- 2.26.2