From 495284d5df678b94d25ea9f88b73da04c7bba058 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Feb 2005 21:21:43 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 9 +++++++ autoconf/config.h.in | 6 +++++ autoconf/configure.in | 11 +++++++- configure | 62 +++++++++++++++++++++++++++++++++++++++++++ src/logging.C | 8 ++++++ 5 files changed, 95 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 5b6c8c5b..ce62b317 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +TODO: http://cvs.sourceforge.net/viewcvs.py/rxvt/rxvt/src/init.c?r1=1.123&r2=1.124&sortby=date + http://cvs.sourceforge.net/viewcvs.py/rxvt/rxvt/src/scrollbar.c?r1=1.44&r2=1.45&sortby=date + Pull more events to all windows so that we don't miss out in + certain occassions, SourceForge bug #954654, patch from + Chris Schoeneman (crs23@sourceforge) TODO: manpage 900mb update TODO: safer command: keymap processing. TODO: "slow" rendering mode for bidi and scripts @@ -15,6 +20,10 @@ WISH: just for fun, do shade and tint with XRender. of no use currently (and -embed is a better way to embed rxvt-unicode). - get rid of the intpro files. + - SYNCCVS. backported bugfixes done to rxvt + (sourceforge bugs #1028739, #1028732), except for + pts/%s fix as it seems to collide with freebsd, + and sourceforge bug #954654, which is unreproducible. 5.1 Tue Feb 15 17:13:27 CET 2005 - fix a bug when parsing fontnames and another one diff --git a/autoconf/config.h.in b/autoconf/config.h.in index 0c73fe83..89921e5e 100644 --- a/autoconf/config.h.in +++ b/autoconf/config.h.in @@ -109,6 +109,9 @@ /* Define if you have the updwtmp function. */ #undef HAVE_UPDWTMP +/* Define if you have the updwtmpx function. */ +#undef HAVE_UPDWTMPX + /* Define if you have the header file. */ #undef HAVE_X11_XFT_XFT_H @@ -268,6 +271,9 @@ /* Define if struct utmpx contains ut_host */ #undef HAVE_UTMPX_HOST +/* Define if struct utmpx contains ut_session */ +#undef HAVE_UTMPX_SESSION + /* Define if utmp.h or lastlog.h has struct lastlog */ #undef HAVE_STRUCT_LASTLOG diff --git a/autoconf/configure.in b/autoconf/configure.in index 06943124..5299ec63 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -709,6 +709,7 @@ AC_CHECK_FUNCS( \ on_exit \ nanosleep \ updwtmp \ + updwtmpx \ ttyslot \ ) dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in @@ -761,8 +762,16 @@ AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host, if test x$rxvt_cv_struct_utmpx_host = xyes; then AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) fi -) dnl# AC_CHECK_HEADER(utmpx.h +AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session, +[AC_TRY_COMPILE([#include +#include ], +[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 dnl# -------------------------------------------------------------------------- dnl# check for struct lastlog diff --git a/configure b/configure index 5c29eec6..bfb7b9d9 100755 --- a/configure +++ b/configure @@ -9661,6 +9661,7 @@ esac + for ac_func in \ atexit \ revoke \ @@ -9679,6 +9680,7 @@ for ac_func in \ on_exit \ nanosleep \ updwtmp \ + updwtmpx \ ttyslot \ do @@ -10368,8 +10370,68 @@ _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 +#include +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_cxx_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 + +fi echo "$as_me:$LINENO: checking for struct lastlog" >&5 diff --git a/src/logging.C b/src/logging.C index 91a1641f..0844ee86 100644 --- a/src/logging.C +++ b/src/logging.C @@ -139,7 +139,9 @@ rxvt_term::makeutent (const char *pty, const char *hostname) 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)); +# if 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 = cmd_pid; @@ -210,7 +212,9 @@ rxvt_term::makeutent (const char *pty, const char *hostname) # endif # endif # ifdef HAVE_STRUCT_UTMPX +# if HAVE_UPDWTMPX updwtmpx (RXVT_WTMPX_FILE, utx); +# endif # endif } #endif @@ -264,7 +268,9 @@ rxvt_term::cleanutent () if ((tmputx = getutxid (utx))) /* position to entry in utmp file */ utx = tmputx; utx->ut_type = DEAD_PROCESS; +# if HAVE_UTMPX_SESSION utx->ut_session = getsid (0); +# endif utx->ut_tv.tv_sec = time (NULL); utx->ut_tv.tv_usec = 0; #endif @@ -285,7 +291,9 @@ rxvt_term::cleanutent () # endif # endif # ifdef HAVE_STRUCT_UTMPX +# if HAVE_UPDWTMPX updwtmpx (RXVT_WTMPX_FILE, utx); +# endif # endif } #endif -- 2.34.1