* logwtmp.c: Provide logwtmp() prototype if needed.
* configure.in: Check for system provided getutmp(), logwtmp() and
revoke() prototypes. Check for util.h, libutil.h.
* update_wtmp.c: Provide prototype for getutmp() if needed.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13336
dc483132-0cff-0310-8789-
dd5450dbe970
2001-06-11 Ezra Peisach <epeisach@mit.edu>
- * configure.in: Check for system provided getutmp() prototype.
+ * pty-int.h: Provide revoke() prototype if system headers lacking.
- * update_wtmp.c: Provide prototype for getutmp() if needed.
+ * logwtmp.c: Provide logwtmp() prototype if needed.
+
+ * configure.in: Check for system provided getutmp(), logwtmp() and
+ revoke() prototypes. Check for util.h, libutil.h.
+
+ * update_wtmp.c: Provide prototype for getutmp() if needed.
2001-05-15 Tom Yu <tlyu@mit.edu>
AC_CHECK_TYPE(time_t, long)
AC_CHECK_FUNC(strsave,[AC_DEFINE(HAS_STRSAVE)])
AC_CHECK_FUNCS(setreuid gettosbyname setsid ttyname line_push ptsname grantpt openpty)
-AC_CHECK_HEADERS(unistd.h stdlib.h string.h pty.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(sys/wait.h)
+AC_CHECK_HEADERS(unistd.h stdlib.h string.h libutil.h pty.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h sys/wait.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h util.h)
AC_CHECK_FUNCS(waitpid)
DECLARE_SYS_ERRLIST
KRB5_SIGTYPE
#endif
],getutmp)
dnl
+#########################################
+KRB5_NEED_PROTO([#include <sys/types.h>
+#ifdef HAVE_UTMP_H
+#include <utmp.h>
+#endif
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
+#ifdef HAVE_UTIL_H
+#include <util.h>
+#endif
+],logwtmp)
+########################################
+KRB5_NEED_PROTO([#include <unistd.h>
+],revoke)
+########################################
dnl
AC_MSG_CHECKING([streams interface])
AC_CACHE_VAL(krb5_cv_has_streams,
#define PTY_STRUCT_UTMPX struct utmp
#endif
+#ifdef NEED_LOGWTMP_PROTO
+void logwtmp(const char *, const char *, const char *);
+#endif
+
long
pty_logwtmp(const char *tty, const char *user, const char *host)
{
extern void getutmpx (const struct utmp *, struct utmpx *);
#endif
+#if defined(NEED_REVOKE_PROTO)
+extern int revoke(const char *);
+#endif
+
/* Internal functions */
long ptyint_void_association(void);
long ptyint_open_ctty (char *slave, int *fd);