@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.21 2008/04/03 22:33:00 tonnerre Exp $
+$NetBSD: distinfo,v 1.22 2012/07/09 19:06:21 joerg Exp $
SHA1 (rxvt-2.7.10.tar.bz2) = 16eae23c3227e28e5e7a53a58eaa3226affe65f9
RMD160 (rxvt-2.7.10.tar.bz2) = 83fab8df589e2413ba820d04bafb069e6af8c445
@@ -11,8 +11,8 @@
SHA1 (patch-af) = 6a4f5cf91bc449f7ecef51695be278074e603c8b
SHA1 (patch-ag) = 11019ed97892c8bd8834c56433573719892336c4
SHA1 (patch-ah) = 5e6fcf6b4b4fe1111b97d0b916501ab5855a755a
-SHA1 (patch-ai) = 0f3e800efc5b87243208de9fb9fafe9abde73201
SHA1 (patch-aj) = 43ca25f034e6160f3a3dabbf1488df31cdecf95b
-SHA1 (patch-ak) = 960d0bd263a6b8776df93603dc5322b685a6afae
+SHA1 (patch-ak) = 83f7ffcf91d671bd8e75e5c063fd1336c0e08ed6
SHA1 (patch-al) = 7107ec12205d0a5011a5828f8d30fbd577de41b7
SHA1 (patch-am) = db69ba3b6754454613aa4aec61c1b033d7e013ae
+SHA1 (patch-src_rxvt.h) = 86db6ffc24f1133771b6e94275a9edab07b97437
@@ -1,8 +1,8 @@
-$NetBSD: patch-ak,v 1.2 2005/06/16 10:47:43 hira Exp $
+$NetBSD: patch-ak,v 1.3 2012/07/09 19:06:22 joerg Exp $
---- src/logging.c.orig 2005-01-16 16:33:20.000000000 -0500
-+++ src/logging.c 2005-01-16 16:55:25.000000000 -0500
-@@ -66,9 +66,7 @@
+--- src/logging.c.orig 2002-12-16 00:33:04.000000000 +0000
++++ src/logging.c
+@@ -66,9 +66,7 @@ rxvt_makeutent(rxvt_t *r, const char *pt
#ifdef HAVE_STRUCT_UTMPX
struct utmpx *utx = &(r->h->utx);
#endif
@@ -12,7 +12,7 @@
char ut_id[5];
struct passwd *pwent = getpwuid(getuid());
-@@ -78,10 +76,8 @@
+@@ -78,10 +76,8 @@ rxvt_makeutent(rxvt_t *r, const char *pt
if (!STRNCMP(pty, "pty", 3) || !STRNCMP(pty, "tty", 3)) {
STRNCPY(ut_id, (pty + 3), sizeof(ut_id));
}
@@ -23,3 +23,56 @@
else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) {
rxvt_print_error("can't parse tty name \"%s\"", pty);
return;
+@@ -137,7 +133,9 @@ rxvt_makeutent(rxvt_t *r, const char *pt
+ STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+ sizeof(utx->ut_user));
+ STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
++# ifdef HAVE_UTMPX_SESSION
+ utx->ut_session = getsid(0);
++# endif
+ utx->ut_tv.tv_sec = time(NULL);
+ utx->ut_tv.tv_usec = 0;
+ utx->ut_pid = r->h->cmd_pid;
+@@ -203,7 +201,11 @@ rxvt_makeutent(rxvt_t *r, const char *pt
+ # endif
+ # endif
+ # ifdef HAVE_STRUCT_UTMPX
++# ifdef HAVE_UPDWTMPX
+ updwtmpx(RXVT_WTMPX_FILE, utx);
++# else
++ pututxline(utx);
++# endif
+ # endif
+ }
+ #endif
+@@ -254,7 +256,9 @@ rxvt_cleanutent(rxvt_t *r)
+ if ((tmputx = getutxid(utx))) /* position to entry in utmp file */
+ utx = tmputx;
+ utx->ut_type = DEAD_PROCESS;
++# ifdef HAVE_UTMPX_SESSION
+ utx->ut_session = getsid(0);
++# endif
+ utx->ut_tv.tv_sec = time(NULL);
+ utx->ut_tv.tv_usec = 0;
+ #endif
+@@ -275,7 +279,11 @@ rxvt_cleanutent(rxvt_t *r)
+ # endif
+ # endif
+ # ifdef HAVE_STRUCT_UTMPX
++# ifdef HAVE_UPDWTMPX
+ updwtmpx(RXVT_WTMPX_FILE, utx);
++# else
++ pututxline(utx);
++# endif
+ # endif
+ }
+ #endif
+@@ -327,7 +335,7 @@ rxvt_write_bsd_utmp(int utmp_pos, struct
+ /*
+ * Update a BSD style wtmp entry
+ */
+-#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP)
++#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) && defined(HAVE_STRUCT_UTMP)
+ /* INTPROTO */
+ void
+ rxvt_update_wtmp(const char *fname, const struct utmp *putmp)