--- rxvt-unicode/src/logging.C 2006/01/22 00:48:13 1.36 +++ rxvt-unicode/src/logging.C 2006/01/25 11:16:09 1.41 @@ -1,4 +1,7 @@ -/*--------------------------------*-C-*---------------------------------* +// This file is part of libptytty. Do not make local modifications. +// http://software.schmorp.de/pkg/libptytty + +/*----------------------------------------------------------------------* * File: logging.C *----------------------------------------------------------------------* * @@ -15,6 +18,7 @@ * Copyright (c) 1999 D J Hawkey Jr * - lastlog support * Copyright (c) 2004-2006 Marc Lehmann + * Copyright (c) 2006 Emanuele Giaquinta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +41,14 @@ #if UTMP_SUPPORT +#include + +#include +#include +#include +#include +#include + #if HAVE_STRUCT_UTMP static int write_bsd_utmp (int utmp_pos, struct utmp *wu); static void update_wtmp (const char *fname, const struct utmp *putmp); @@ -86,7 +98,7 @@ sprintf (ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ else if (strncmp (pty, "pty", 3) && strncmp (pty, "tty", 3)) { - warn ("can't parse tty name \"%s\", not adding utmp entry.\n", pty); + ptytty_warn ("can't parse tty name \"%s\", not adding utmp entry.\n", pty); return; } #endif @@ -416,7 +428,7 @@ pwent = getpwuid (getuid ()); if (!pwent) { - warn ("no entry in password file, not updating lastlog.\n"); + ptytty_warn ("no entry in password file, not updating lastlog.\n", 0); return; } @@ -447,14 +459,11 @@ # endif /* HAVE_STRUCT_LASTLOG */ } #endif /* LASTLOG_SUPPORT */ -/* ------------------------------------------------------------------------- */ #else - void ptytty_unix::login (int cmd_pid, bool login_shell, const char *hostname) { } - #endif