ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/logging.C
(Generate patch)

Comparing rxvt-unicode/src/logging.C (file contents):
Revision 1.40 by root, Sun Jan 22 12:23:55 2006 UTC vs.
Revision 1.41 by root, Wed Jan 25 11:16:09 2006 UTC

35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 *----------------------------------------------------------------------*/ 36 *----------------------------------------------------------------------*/
37 37
38#include "../config.h" 38#include "../config.h"
39 39
40#include "ptytty.h"
41
42#if UTMP_SUPPORT
43
40#include <cstdio> 44#include <cstdio>
41 45
42#include <sys/types.h> 46#include <sys/types.h>
43#include <sys/stat.h> 47#include <sys/stat.h>
44#include <sys/fcntl.h> 48#include <sys/fcntl.h>
45#include <unistd.h> 49#include <unistd.h>
46#include <time.h> 50#include <time.h>
47
48#include "ptytty.h"
49
50#if UTMP_SUPPORT
51 51
52#if HAVE_STRUCT_UTMP 52#if HAVE_STRUCT_UTMP
53static int write_bsd_utmp (int utmp_pos, struct utmp *wu); 53static int write_bsd_utmp (int utmp_pos, struct utmp *wu);
54static void update_wtmp (const char *fname, const struct utmp *putmp); 54static void update_wtmp (const char *fname, const struct utmp *putmp);
55#endif 55#endif
426 426
427# ifdef HAVE_STRUCT_LASTLOG 427# ifdef HAVE_STRUCT_LASTLOG
428 pwent = getpwuid (getuid ()); 428 pwent = getpwuid (getuid ());
429 if (!pwent) 429 if (!pwent)
430 { 430 {
431 ptytty_warn ("no entry in password file, not updating lastlog.\n"); 431 ptytty_warn ("no entry in password file, not updating lastlog.\n", 0);
432 return; 432 return;
433 } 433 }
434 434
435 memset (&ll, 0, sizeof (ll)); 435 memset (&ll, 0, sizeof (ll));
436 ll.ll_time = time (NULL); 436 ll.ll_time = time (NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines