HAVE_UT_* -> HAVE_STRUCT_UTMP*_UT_*

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5458 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1999-03-01 09:50:29 +00:00
parent 3b3037885a
commit 84bd0825e7
4 changed files with 19 additions and 19 deletions

View File

@@ -87,7 +87,7 @@ ftpd_logwtmp(char *line, char *name, char *host)
#endif
memset(&ut, 0, sizeof(struct utmp));
#ifdef HAVE_UT_TYPE
#ifdef HAVE_STRUCT_UTMP_UT_TYPE
if(name[0])
ut.ut_type = USER_PROCESS;
else
@@ -95,10 +95,10 @@ ftpd_logwtmp(char *line, char *name, char *host)
#endif
strncpy(ut.ut_line, line, sizeof(ut.ut_line));
strncpy(ut.ut_name, name, sizeof(ut.ut_name));
#ifdef HAVE_UT_PID
#ifdef HAVE_STRUCT_UTMP_UT_PID
ut.ut_pid = getpid();
#endif
#ifdef HAVE_UT_HOST
#ifdef HAVE_STRUCT_UTMP_UT_HOST
strncpy(ut.ut_host, host, sizeof(ut.ut_host));
#endif
ut.ut_time = time(NULL);
@@ -107,7 +107,7 @@ ftpd_logwtmp(char *line, char *name, char *host)
strncpy(utx.ut_line, line, sizeof(utx.ut_line));
strncpy(utx.ut_user, name, sizeof(utx.ut_user));
strncpy(utx.ut_host, host, sizeof(utx.ut_host));
#ifdef HAVE_UT_SYSLEN
#ifdef HAVE_STRUCT_UTMPX_UT_SYSLEN
utx.ut_syslen = strlen(host) + 1;
if (utx.ut_syslen > sizeof(utx.ut_host))
utx.ut_syslen = sizeof(utx.ut_host);