--- rxvt-unicode/src/logging.C 2005/02/16 21:21:43 1.15 +++ rxvt-unicode/src/logging.C 2005/11/08 17:35:28 1.18 @@ -44,8 +44,11 @@ #include "logging.h" #ifdef UTMP_SUPPORT +#if HAVE_STRUCT_UTMP int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu); void rxvt_update_wtmp (const char *fname, const struct utmp *putmp); +#endif + void rxvt_update_lastlog (const char *fname, const char *pty, const char *host); /* @@ -72,7 +75,7 @@ #ifdef HAVE_UTMP_PID int i; #endif - struct passwd *pwent = getpwuid (getuid ()); + struct passwd *pwent = getpwuid (getuid ()); if (!strncmp (pty, "/dev/", 5)) pty += 5; /* skip /dev/ prefix */ @@ -175,7 +178,7 @@ if ((fd0 = fopen (TTYTAB_FILENAME, "r")) != NULL) { - char buf[256], name[256]; + char buf[256], name[256]; buf[sizeof (buf) - 1] = '\0'; for (i = 1; (fgets (buf, sizeof (buf) - 1, fd0) != NULL);) @@ -214,6 +217,8 @@ # ifdef HAVE_STRUCT_UTMPX # if HAVE_UPDWTMPX updwtmpx (RXVT_WTMPX_FILE, utx); +# else + pututxline (utx); # endif # endif } @@ -293,6 +298,8 @@ # ifdef HAVE_STRUCT_UTMPX # if HAVE_UPDWTMPX updwtmpx (RXVT_WTMPX_FILE, utx); +# else + pututxline (utx); # endif # endif } @@ -323,7 +330,6 @@ * Write a BSD style utmp entry */ #ifdef HAVE_UTMP_H -/* INTPROTO */ int rxvt_write_bsd_utmp (int utmp_pos, struct utmp *wu) { @@ -343,8 +349,7 @@ /* * Update a BSD style wtmp entry */ -#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) -/* INTPROTO */ +#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) && defined(HAVE_STRUCT_UTMP) void rxvt_update_wtmp (const char *fname, const struct utmp *putmp) { @@ -386,7 +391,6 @@ /* ------------------------------------------------------------------------- */ #ifdef LASTLOG_SUPPORT -/* INTPROTO */ void rxvt_update_lastlog (const char *fname, const char *pty, const char *host) {