diff options
author | martin <martin@pkgsrc.org> | 2002-09-30 21:20:06 +0000 |
---|---|---|
committer | martin <martin@pkgsrc.org> | 2002-09-30 21:20:06 +0000 |
commit | 812f50663f2f9ed18202cc4eefdc27b14ad43190 (patch) | |
tree | 664b0095e8dad230ba95dd00006a188fefc120f7 /x11/rxvt/patches | |
parent | e7be3d72c39966ad53bb513552f062f440eb3c77 (diff) | |
download | pkgsrc-812f50663f2f9ed18202cc4eefdc27b14ad43190.tar.gz |
Make configure find our utmpx file.
Add lastlogx support (XXX someone check this please, XXX need a autoconfig
check for this?)
This avoids the previous brute-force hack that disabled utmpx support
on NetBSD completely.
Diffstat (limited to 'x11/rxvt/patches')
-rw-r--r-- | x11/rxvt/patches/patch-ac | 13 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-af | 41 |
2 files changed, 40 insertions, 14 deletions
diff --git a/x11/rxvt/patches/patch-ac b/x11/rxvt/patches/patch-ac index fa6de8a108a..fe897069ec1 100644 --- a/x11/rxvt/patches/patch-ac +++ b/x11/rxvt/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.4 2001/07/16 22:06:03 martin Exp $ +$NetBSD: patch-ac,v 1.5 2002/09/30 21:20:06 martin Exp $ --- configure.orig Sun Mar 26 09:47:39 2000 -+++ configure Tue Jul 17 00:01:45 2001 ++++ configure Mon Sep 30 22:27:36 2002 @@ -4163,6 +4163,7 @@ cat > conftest.$ac_ext <<EOF #line 4165 "configure" @@ -10,6 +10,15 @@ $NetBSD: patch-ac,v 1.4 2001/07/16 22:06:03 martin Exp $ #include <stdio.h> #include <utmp.h> #include <errno.h> +@@ -4337,7 +4338,7 @@ + #ifdef UTMPX_FILE + UTMPX_FILE, + #endif +- "/var/adm/utmpx", "/etc/utmpx", NULL }; ++ "/var/run/utmpx", "/var/adm/utmpx", "/etc/utmpx", NULL }; + FILE *a, *f=fopen("conftestval", "w"); + struct stat statu, statux; + if (!f) exit(1); @@ -5047,7 +5048,7 @@ EOF diff --git a/x11/rxvt/patches/patch-af b/x11/rxvt/patches/patch-af index 40dd0bfdf10..48522ec7761 100644 --- a/x11/rxvt/patches/patch-af +++ b/x11/rxvt/patches/patch-af @@ -1,14 +1,31 @@ -$NetBSD: patch-af,v 1.3 2002/09/30 12:29:12 martin Exp $ +$NetBSD: patch-af,v 1.4 2002/09/30 21:20:06 martin Exp $ +--- src/logging.c.orig Mon Sep 30 22:44:27 2002 ++++ src/logging.c Mon Sep 30 23:00:46 2002 +@@ -130,6 +130,17 @@ + void + rxvt_update_lastlog(const char *fname, const char *pty, const char *host) + { ++# ifdef RXVT_UTMP_AS_UTMPX ++ struct lastlogx ll; ++ char filename[FILENAME_MAX]; ++ ++ MEMSET(&ll, 0, sizeof(ll)); ++ gettimeofday(&ll.ll_tv, NULL); ++ STRNCPY(ll.ll_line, pty, sizeof(ll.ll_line)); ++ STRNCPY(ll.ll_host, host, sizeof(ll.ll_host)); ++ ++ updlastlogx(RXVT_UTMPX_FILE, geteuid(), &ll); ++# else + # ifdef HAVE_STRUCT_LASTLOG + int fd; + struct passwd *pwent; +@@ -165,6 +176,7 @@ + } + # endif /* LASTLOG_IS_DIR */ + # endif /* HAVE_STRUCT_LASTLOG */ ++# endif /* RXVT_UTMP_AS_UTMPX */ + } + #endif /* LASTLOG_SUPPORT */ + /* ------------------------------------------------------------------------- */ ---- src/logging.h.orig Mon Sep 30 14:18:57 2002 -+++ src/logging.h Mon Sep 30 14:19:25 2002 -@@ -32,7 +32,7 @@ - # include <utmpx.h> - # else - # include <utmp.h> --# ifdef HAVE_SETUTENT -+# if defined(HAVE_SETUTENT) && !defined(__NetBSD__) - # define USE_SYSV_UTMP - # else - # undef USE_SYSV_UTMP |