HAVE_UTMPX -> HAVE_UTMPX_H. Fix for OSF1. Some cleanup.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1713 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -39,13 +39,13 @@ RCSID("$Id$");
|
||||
# define PARENT_DOES_UTMP
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UTMPX
|
||||
#ifdef HAVE_UTMPX_H
|
||||
#include <utmpx.h>
|
||||
struct utmpx wtmp;
|
||||
#else
|
||||
#include <utmp.h>
|
||||
struct utmp wtmp;
|
||||
#endif /* HAVE_UTMPX */
|
||||
#endif /* HAVE_UTMPX_H */
|
||||
|
||||
#ifdef HAVE_UT_HOST
|
||||
int utmp_len = sizeof(wtmp.ut_host);
|
||||
@@ -348,7 +348,7 @@ static char *ptsname(int fd)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UTMPX
|
||||
#ifdef HAVE_UTMPX_H
|
||||
static char utid[32]; /* XXX larger than ut_id */
|
||||
|
||||
void
|
||||
@@ -1217,7 +1217,7 @@ void start_login(char *host, int autologin, char *name)
|
||||
{
|
||||
struct arg_val argv;
|
||||
|
||||
#ifdef HAVE_UTMPX
|
||||
#ifdef HAVE_UTMPX_H
|
||||
char id_buf[3];
|
||||
int ptynum;
|
||||
int pid = getpid();
|
||||
@@ -1237,9 +1237,7 @@ void start_login(char *host, int autologin, char *name)
|
||||
|
||||
utmpx.ut_type = LOGIN_PROCESS;
|
||||
|
||||
gettimeofday (&tmp, NULL);
|
||||
utmpx.ut_tv.tv_sec = tmp.tv_sec;
|
||||
utmpx.ut_tv.tv_usec = tmp.tv_usec;
|
||||
gettimeofday (&utmpx.ut_tv, NULL);
|
||||
if (pututxline(&utmpx) == NULL)
|
||||
fatal(net, "pututxline failed");
|
||||
#endif
|
||||
@@ -1340,7 +1338,7 @@ static int addarg(struct arg_val *argv, char *val)
|
||||
* remove the utmp entry for this person.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_UTMPX
|
||||
#ifdef HAVE_UTMPX_H
|
||||
static void
|
||||
rmut(void)
|
||||
{
|
||||
@@ -1367,13 +1365,14 @@ rmut(void)
|
||||
#ifdef _STRUCT___EXIT_STATUS
|
||||
utxp->ut_exit.__e_termination = 0;
|
||||
utxp->ut_exit.__e_exit = 0;
|
||||
#else
|
||||
#elif defined(__osf__) /* XXX */
|
||||
utxp->ut_exit.ut_termination = 0;
|
||||
utxp->ut_exit.ut_exit = 0;
|
||||
#else
|
||||
utxp->ut_exit.e_termination = 0;
|
||||
utxp->ut_exit.e_exit = 0;
|
||||
#endif
|
||||
gettimeofday(&tmp, NULL);
|
||||
utxp->ut_tv.tv_sec = tmp.tv_sec;
|
||||
utxp->ut_tv.tv_usec = tmp.tv_usec;
|
||||
gettimeofday(&utxp->ut_tv, NULL);
|
||||
pututxline(utxp);
|
||||
#ifdef WTMPX_FILE
|
||||
updwtmpx(WTMPX_FILE, utxp);
|
||||
@@ -1383,7 +1382,7 @@ rmut(void)
|
||||
} /* end of rmut */
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UTMPX) && !(defined(_CRAY) || defined(__hpux)) && BSD <= 43
|
||||
#if !defined(HAVE_UTMPX_H) && !(defined(_CRAY) || defined(__hpux)) && BSD <= 43
|
||||
static void
|
||||
rmut(void)
|
||||
{
|
||||
@@ -1440,7 +1439,7 @@ rmut(void)
|
||||
} /* end of rmut */
|
||||
#endif /* CRAY */
|
||||
|
||||
#if defined(__hpux) && !defined(HAVE_UTMPX)
|
||||
#if defined(__hpux) && !defined(HAVE_UTMPX_H)
|
||||
static void
|
||||
rmut (char *line)
|
||||
{
|
||||
@@ -1543,7 +1542,7 @@ cleanup(int sig)
|
||||
void
|
||||
cleanup(int sig)
|
||||
{
|
||||
#if defined(HAVE_UTMPX) || !defined(HAVE_LOGWTMP)
|
||||
#if defined(HAVE_UTMPX_H) || !defined(HAVE_LOGWTMP)
|
||||
rmut();
|
||||
#ifdef HAVE_VHANGUP
|
||||
vhangup(); /* XXX */
|
||||
|
Reference in New Issue
Block a user