ut_exit.e_exit and utmpx uses ut_exit.ut_exit.
* configure.in (UT_EXIT_STRUCTURE_DIFFER): If utmpx.h exists, and
getutmpx does not exist then test if the ut_exit part of
the utmp/utmpx structure is a structure and if their types
differ. (e_exit vs. ut_exit).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9422
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri Nov 15 08:33:54 1996 Ezra Peisach <epeisach@mit.edu>
+
+ * update_utmp.c (pty_update_utmp): Handle case where utmp uses
+ ut_exit.e_exit and utmpx uses ut_exit.ut_exit.
+
+ * configure.in (UT_EXIT_STRUCTURE_DIFFER): If utmpx.h exists, and
+ getutmpx does not exist then test if the ut_exit part of
+ the utmp/utmpx structure is a structure and if their types
+ differ. (e_exit vs. ut_exit).
+
Fri Nov 8 17:45:42 1996 Theodore Y. Ts'o <tytso@mit.edu>
* update_utmp.c (pty_update_utmp): Add code which attempts to
fi
dnl
dnl
+if test $ac_cv_header_utmpx_h = yes -a $ac_cv_func_getutmpx = no; then
+AC_MSG_CHECKING([if utmpx and utmp ut_exit structures differ])
+AC_CACHE_VAL(krb5_cv_utmp_utmpx_diff_exit_struct,
+[AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <utmp.h>
+#include <utmpx.h>],[struct utmpx utx; struct utmp ut;
+utx.ut_exit.ut_exit = ut.ut_exit.e_exit],
+krb5_cv_utmp_utmpx_diff_exit_struct=yes, krb5_cv_utmp_utmpx_diff_exit_struct=no)])
+AC_MSG_RESULT($krb5_cv_utmp_utmpx_diff_exit_struct)
+if test $krb5_cv_utmp_utmpx_diff_exit_struct = yes; then
+AC_DEFINE(UT_EXIT_STRUCTURE_DIFFER)
+fi
+fi
dnl
ADD_DEF(-DKERBEROS)
AC_CONST
strncpy(utx.ut_line, ent.ut_line, sizeof(ent.ut_line));
utx.ut_pid = ent.ut_pid;
utx.ut_type = ent.ut_type;
+#ifdef UT_EXIT_STRUCTURE_DIFFER
+ utx.ut_exit.ut_exit = ent.ut_exit.e_exit;
+#else
utx.ut_exit = ent.ut_exit;
+#endif
utx.ut_tv.tv_sec = ent.ut_time;
utx.ut_tv.tv_usec = 0;
#endif