diff options
author | minskim <minskim> | 2004-09-15 18:29:20 +0000 |
---|---|---|
committer | minskim <minskim> | 2004-09-15 18:29:20 +0000 |
commit | 3e2a8b82d001b89a1509960eecb0533b8ca014c9 (patch) | |
tree | 5a945c33b47052ab55928ac62ddbc8d47ec99e71 /x11/rxvt/patches | |
parent | bcb17301f9d7e2aa273ef5608eeb5efec96a9eec (diff) | |
download | pkgsrc-3e2a8b82d001b89a1509960eecb0533b8ca014c9.tar.gz |
Make this package build on Interix. Based on patches submitted by
Hiramatsu Yoshifumi in PR pkg/26962.
- Use ut_session only when it is available in struct utmpx.
- If updwtmpx is not available, use pututxline instead.
- Bulid functions using struct utmp only when the struct utmp is available.
Diffstat (limited to 'x11/rxvt/patches')
-rw-r--r-- | x11/rxvt/patches/patch-ac | 27 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-af | 80 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-ag | 22 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-ai | 57 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-aj | 10 |
5 files changed, 190 insertions, 6 deletions
diff --git a/x11/rxvt/patches/patch-ac b/x11/rxvt/patches/patch-ac index 6d88bbcd502..212e03de783 100644 --- a/x11/rxvt/patches/patch-ac +++ b/x11/rxvt/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.7 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-ac,v 1.8 2004/09/15 18:29:20 minskim Exp $ ---- autoconf/configure.in.orig 2003-03-06 20:32:27.000000000 -0600 +--- autoconf/configure.in.orig Thu Mar 6 20:32:27 2003 +++ autoconf/configure.in @@ -393,6 +393,7 @@ AC_CHECK_HEADERS( \ sys/ioctl.h \ @@ -10,3 +10,26 @@ $NetBSD: patch-ac,v 1.7 2004/09/15 17:55:53 minskim Exp $ sys/strredir.h \ sys/time.h \ utmp.h \ +@@ -588,6 +589,7 @@ AC_CHECK_FUNCS( \ + on_exit \ + nanosleep \ + updwtmp \ ++ updwtmpx \ + ttyslot \ + ) + dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in +@@ -648,6 +650,14 @@ AC_CACHE_CHECK(for host in utmpx struct, + rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)]) + if test x$rxvt_cv_struct_utmpx_host = xyes; then + AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) ++fi ++AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session, ++[AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmpx.h>], ++[struct utmpx utx; utx.ut_session;], ++rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)]) ++if test x$rxvt_cv_struct_utmpx_session = xyes; then ++ AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) + fi + ) dnl# AC_CHECK_HEADER(utmpx.h + diff --git a/x11/rxvt/patches/patch-af b/x11/rxvt/patches/patch-af index 7ffa5e213ad..7e6c58055ef 100644 --- a/x11/rxvt/patches/patch-af +++ b/x11/rxvt/patches/patch-af @@ -1,6 +1,6 @@ -$NetBSD: patch-af,v 1.8 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-af,v 1.9 2004/09/15 18:29:20 minskim Exp $ ---- configure.orig 2003-03-26 00:07:26.000000000 -0600 +--- configure.orig Wed Mar 26 00:07:26 2003 +++ configure @@ -9481,6 +9481,7 @@ fi @@ -18,3 +18,79 @@ $NetBSD: patch-af,v 1.8 2004/09/15 17:55:53 minskim Exp $ sys/strredir.h \ sys/time.h \ utmp.h \ +@@ -12964,6 +12966,7 @@ for ac_func in \ + on_exit \ + nanosleep \ + updwtmp \ ++ updwtmpx \ + ttyslot \ + + do +@@ -13577,6 +13580,67 @@ if test x$rxvt_cv_struct_utmpx_host = xy + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UTMPX_HOST 1 ++_ACEOF ++ ++fi ++echo "$as_me:$LINENO: checking for session in utmpx struct" >&5 ++echo $ECHO_N "checking for session in utmpx struct... $ECHO_C" >&6 ++if test "${rxvt_cv_struct_utmpx_session+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include <sys/types.h> ++#include <utmpx.h> ++int ++main () ++{ ++struct utmpx utx; utx.ut_session; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ rxvt_cv_struct_utmpx_session=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++rxvt_cv_struct_utmpx_session=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $rxvt_cv_struct_utmpx_session" >&5 ++echo "${ECHO_T}$rxvt_cv_struct_utmpx_session" >&6 ++if test x$rxvt_cv_struct_utmpx_session = xyes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_UTMPX_SESSION 1 + _ACEOF + + fi diff --git a/x11/rxvt/patches/patch-ag b/x11/rxvt/patches/patch-ag index a7a6a1e66ec..9ff221b264f 100644 --- a/x11/rxvt/patches/patch-ag +++ b/x11/rxvt/patches/patch-ag @@ -1,6 +1,6 @@ -$NetBSD: patch-ag,v 1.3 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-ag,v 1.4 2004/09/15 18:29:20 minskim Exp $ ---- autoconf/config.h.in.orig 2003-02-19 18:35:55.000000000 -0600 +--- autoconf/config.h.in.orig Wed Feb 19 18:35:55 2003 +++ autoconf/config.h.in @@ -123,6 +123,9 @@ /* Define to 1 if you have the <sys/strredir.h> header file. */ @@ -12,3 +12,21 @@ $NetBSD: patch-ag,v 1.3 2004/09/15 17:55:53 minskim Exp $ /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H +@@ -150,11 +153,17 @@ + /* Define to 1 if you have the `updwtmp' function. */ + #undef HAVE_UPDWTMP + ++/* Define to 1 if you have the `updwtmpx' function. */ ++#undef HAVE_UPDWTMPX ++ + /* Define to 1 if you have the <utmpx.h> header file. */ + #undef HAVE_UTMPX_H + + /* Define if struct utmpx contains ut_host */ + #undef HAVE_UTMPX_HOST ++ ++/* Define if struct utmpx contains ut_session */ ++#undef HAVE_UTMPX_SESSION + + /* Define to 1 if you have the <utmp.h> header file. */ + #undef HAVE_UTMP_H diff --git a/x11/rxvt/patches/patch-ai b/x11/rxvt/patches/patch-ai new file mode 100644 index 00000000000..f3230a80199 --- /dev/null +++ b/x11/rxvt/patches/patch-ai @@ -0,0 +1,57 @@ +$NetBSD: patch-ai,v 1.1 2004/09/15 18:29:20 minskim Exp $ + +--- src/logging.c.orig Sun Dec 15 18:33:04 2002 ++++ src/logging.c +@@ -137,7 +137,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 +205,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 +260,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 +283,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 +339,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) diff --git a/x11/rxvt/patches/patch-aj b/x11/rxvt/patches/patch-aj new file mode 100644 index 00000000000..fe7c32ee8f0 --- /dev/null +++ b/x11/rxvt/patches/patch-aj @@ -0,0 +1,10 @@ +$NetBSD: patch-aj,v 1.1 2004/09/15 18:29:20 minskim Exp $ + +--- src/logging.intpro.orig Wed Mar 26 00:12:28 2003 ++++ src/logging.intpro +@@ -1,3 +1,5 @@ ++#ifdef HAVE_STRUCT_UTMP + int rxvt_write_bsd_utmp __PROTO((int utmp_pos, struct utmp *wu)); + void rxvt_update_wtmp __PROTO((const char *fname, const struct utmp *putmp)); ++#endif + void rxvt_update_lastlog __PROTO((const char *fname, const char *pty, const char *host)); |