From: Chet Ramey Date: Mon, 21 Sep 2015 20:35:45 +0000 (-0400) Subject: commit readline-20150918 snapshot X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d2b553312c1eac0dc4c5d4150cb0930a5866bacb;p=thirdparty%2Freadline.git commit readline-20150918 snapshot --- diff --git a/config.h.in b/config.h.in index e5658c2..d03ebe0 100644 --- a/config.h.in +++ b/config.h.in @@ -155,6 +155,9 @@ /* Define if you have the header file. */ #undef HAVE_LANGINFO_H +/* Define if you have the header file. */ +#undef HAVE_LIBAUDIT_H + /* Define if you have the header file. */ #undef HAVE_LIMITS_H diff --git a/configure b/configure index 655a451..d200b96 100755 --- a/configure +++ b/configure @@ -5862,6 +5862,18 @@ $as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h fi +for ac_header in libaudit.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" +if test "x$ac_cv_header_libaudit_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBAUDIT_H 1 +_ACEOF + +fi + +done + ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include " if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then : diff --git a/configure.ac b/configure.ac index 64f3386..27a9a02 100644 --- a/configure.ac +++ b/configure.ac @@ -176,6 +176,7 @@ BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO +AC_CHECK_HEADERS(libaudit.h) AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include ]]) dnl yuck diff --git a/kill.c b/kill.c index 166302c..7a0708c 100644 --- a/kill.c +++ b/kill.c @@ -97,7 +97,7 @@ _rl_copy_to_kill_ring (text, append) int slot; /* First, find the slot to work with. */ - if (_rl_last_command_was_kill == 0) + if (_rl_last_command_was_kill == 0 || rl_kill_ring == 0) { /* Get a new slot. */ if (rl_kill_ring == 0) diff --git a/readline.c b/readline.c index 332b8cb..6f30e3d 100644 --- a/readline.c +++ b/readline.c @@ -386,7 +386,7 @@ readline (prompt) RL_SETSTATE (RL_STATE_CALLBACK); #endif -#if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT) +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) if (value) _rl_audit_tty (value); #endif diff --git a/rlconf.h b/rlconf.h index fa52835..82fd0de 100644 --- a/rlconf.h +++ b/rlconf.h @@ -64,7 +64,7 @@ /* Define this if you want to enable code that talks to the Linux kernel tty auditing system. */ -#define ENABLE_TTY_AUDIT_SUPPORT +/* #define ENABLE_TTY_AUDIT_SUPPORT */ /* Defaults for the various editing mode indicators, inserted at the beginning of the last (maybe only) line of the prompt if show-mode-in-prompt is on */ diff --git a/util.c b/util.c index b253f08..4840494 100644 --- a/util.c +++ b/util.c @@ -549,7 +549,7 @@ _rl_settracefp (fp) #endif /* DEBUG */ -#if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT) +#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT) #include #include #include