From d812e98d84f3b793c0d6efdcc93e17d6f8ddcb95 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 5 Aug 1995 00:33:45 +0000 Subject: [PATCH] libpty.h (pty_cleanup): Fix argument type of pid to patch that used in the C file. Include if present. Only include if it is present. configure.in: Check for utmp.h and utmpx.h git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6422 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 8 ++++++++ src/util/pty/configure.in | 2 +- src/util/pty/libpty.h | 7 ++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index bd625eba0..fc626203a 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,11 @@ +Fri Aug 4 13:59:11 1995 Theodore Y. Ts'o + + * libpty.h (pty_cleanup): Fix argument type of pid to patch that + used in the C file. Include if present. Only + include if it is present. + + * configure.in: Check for utmp.h and utmpx.h + Fri Aug 4 00:59:20 1995 Tom Yu * Makefile.in: use libupdate so to not get multiple copies of diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index 76a611652..9282a99a4 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -40,7 +40,7 @@ AC_FUNC_CHECK(ptsname,AC_DEFINE(HAVE_PTSNAME)) AC_FUNC_CHECK(grantpt,AC_DEFINE(HAVE_GRANTPT)) AC_FUNC_CHECK(openpty,AC_DEFINE(HAVE_OPENPTY)) AC_FUNC_CHECK(logwtmp,AC_DEFINE(HAVE_LOGWTMP)) -AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h) +AC_CHECK_HEADERS(unistd.h stdlib.h string.h utmpx.h utmp.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h) AC_REPLACE_FUNCS(getdtablesize) DECLARE_SYS_ERRLIST KRB5_SIGTYPE diff --git a/src/util/pty/libpty.h b/src/util/pty/libpty.h index b24d97e3d..07b34fc38 100644 --- a/src/util/pty/libpty.h +++ b/src/util/pty/libpty.h @@ -19,7 +19,12 @@ #ifndef __LIBPTY_H__ #include +#ifdef HAVE_UTMP_H #include +#endif +#ifdef HAVE_UTMPX_H +#include +#endif #ifdef __STDC__ /* use prototypes */ @@ -35,7 +40,7 @@ long pty_update_utmp (struct utmp *ut, char *user, char *line, char *host); long pty_update_wtmp (struct utmp *ut); long pty_logwtmp (char *tty, char * user, char *host); -long pty_cleanup(char *slave, int pid, int update_utmp); +long pty_cleanup(char *slave, pid_t pid, int update_utmp); #else /*__STDC__*/ long pty_init(); long pty_getpty(); -- 2.26.2