55496e93d6
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.
96 lines
2.3 KiB
Text
96 lines
2.3 KiB
Text
$NetBSD: patch-af,v 1.9 2004/09/15 18:29:20 minskim Exp $
|
|
|
|
--- configure.orig Wed Mar 26 00:07:26 2003
|
|
+++ configure
|
|
@@ -9481,6 +9481,7 @@ fi
|
|
|
|
|
|
|
|
+
|
|
for ac_header in \
|
|
assert.h \
|
|
fcntl.h \
|
|
@@ -9496,6 +9497,7 @@ for ac_header in \
|
|
sys/ioctl.h \
|
|
sys/select.h \
|
|
sys/sockio.h \
|
|
+ sys/stropts.h \
|
|
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
|