-\[Readline-specific changelog. Descriptions of changes to the source are
+[Readline-specific changelog. Descriptions of changes to the source are
found in the bash changelog.]
6/9
- use `:+' when testing the value of $GCC, since autoconf seems to
set it to the empty string if gcc isn't the compiler. Reported by
Osipov, Michael (LDA IT PLM) <michael.osipov@siemens.com>
+
+ 9/2
+ ---
+configure.ac
+ - AC_HELP_STRING -> AS_HELP_STRING
+ - AC_OUTPUT: split into AC_CONFIG_FILES and AC_CONFIG_COMMANDS, call
+ AC_OUTPUT without any parameters
+
+ 9/3
+ ---
+configure.ac, config.h.in
+ - AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of
+ RETSIGTYPE and VOID_SIGHANDLER
+ - AC_HEADER_TIME: removed
+ - AC_USE_SYSTEM_EXTENSIONS: use instead of AC_AIX and AC_MINIX
+ - AC_HEADER_STDC: removed
+ - BASH_FUNC_CTYPE_NONASCII: removed
dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
AC_DEFUN(BASH_CHECK_TYPE,
[
-AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([BASH_HEADER_INTTYPES])
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(bash_cv_type_$1,
[AC_EGREP_CPP($1, [#include <sys/types.h>
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#if HAVE_STDDEF_H
#include <stddef.h>
#endif
#if HAVE_INTTYPES_H
dnl
AC_DEFUN(BASH_CHECK_DECL,
[
-AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([BASH_HEADER_INTTYPES])
AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
[AC_TRY_LINK(
[
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_INTTYPES_H
fi
])
+dnl this defines HAVE_DECL_SYS_SIGLIST
+AC_DEFUN([BASH_DECL_SYS_SIGLIST],
+[AC_CHECK_DECLS([sys_siglist],,,
+[#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h. */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+])
+])
+
AC_DEFUN(BASH_SYS_SIGLIST,
-[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
+[AC_REQUIRE([BASH_DECL_SYS_SIGLIST])
AC_MSG_CHECKING([for sys_siglist in system C library])
AC_CACHE_VAL(bash_cv_sys_siglist,
[AC_TRY_RUN([
# We should check for putenv before calling this
AC_DEFUN(BASH_FUNC_STD_PUTENV,
[
-AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_C_PROTOTYPES])
AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
[AC_TRY_LINK([
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#if HAVE_STDDEF_H
#include <stddef.h>
#endif
#ifndef __STDC__
# We should check for unsetenv before calling this
AC_DEFUN(BASH_FUNC_STD_UNSETENV,
[
-AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_C_PROTOTYPES])
AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
[AC_TRY_LINK([
-#if STDC_HEADERS
+#if HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+#if HAVE_STDDEF_H
#include <stddef.h>
#endif
#ifndef __STDC__
AC_DEFUN([AM_PATH_LISPDIR],
- [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]),
+ [AC_ARG_WITH(lispdir, AS_HELP_STRING([--with-lispdir], [override the default lisp directory]),
[ lispdir="$withval"
AC_MSG_CHECKING([where .elc files should go])
AC_MSG_RESULT([$lispdir])],
#if defined (HAVE_CONFIG_H)
# if defined (HAVE_STRING_H)
-# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
-# include <memory.h>
-# endif
# include <string.h>
# endif /* HAVE_STRING_H */
# if defined (HAVE_STRINGS_H)
#define UNMETA(c) ((c) & (~meta_character_bit))
#define UNCTRL(c) _rl_to_upper(((c)|control_character_bit))
-#if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII))
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
+#ifndef UCHAR_MAX
+# define UCHAR_MAX 255
#endif
-
-#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus)
-# define isxdigit(c) (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#ifndef CHAR_MAX
+# define CHAR_MAX 127
#endif
-#if defined (CTYPE_NON_ASCII)
+/* use this as a proxy for C89 */
+#if defined (HAVE_STDLIB_H) && defined (HAVE_STRING_H)
+# define IN_CTYPE_DOMAIN(c) 1
# define NON_NEGATIVE(c) 1
#else
+# define IN_CTYPE_DOMAIN(c) ((c) >= 0 && (c) <= CHAR_MAX)
# define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
#endif
+#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) && !defined (__cplusplus)
+# define isxdigit(c) (isdigit((unsigned char)(c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#endif
+
/* Some systems define these; we want our definitions. */
#undef ISPRINT
#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c))
#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9')
+#define _rl_alphabetic_p(c) (NON_NEGATIVE(c) && ISALNUM(c))
#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c))
-#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c))
#ifndef _rl_to_upper
-# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c))
-# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c))
+# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)(c)) : (c))
+# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)(c)) : (c))
#endif
#ifndef _rl_digit_value
/* config.h.in. Maintained by hand. */
/* Template definitions for autoconf */
+
+/* These are set by AC_USE_SYSTEM_EXTENSIONS */
#undef __EXTENSIONS__
#undef _ALL_SOURCE
#undef _GNU_SOURCE
#undef _FILE_OFFSET_BITS
-/* Define as the return type of signal handlers (int or void). */
-#undef RETSIGTYPE
-
-#undef VOID_SIGHANDLER
-
/* Characteristics of the compiler. */
#undef sig_atomic_t
/* and whether it works */
#undef WCWIDTH_BROKEN
-#undef STDC_HEADERS
-
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have <linux/audit.h> and it defines AUDIT_USER_TTY */
#undef HAVE_DECL_AUDIT_USER_TTY
-#undef TIME_WITH_SYS_TIME
-
/* Definitions pulled in from aclocal.m4. */
-#undef VOID_SIGHANDLER
-
#undef GWINSZ_IN_SYS_IOCTL
#undef STRUCT_WINSIZE_IN_SYS_IOCTL
#! /bin/sh
-# From configure.ac for Readline 8.1, version 2.91.
+# From configure.ac for Readline 8.1, version 2.92.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for readline 8.1.
#
ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc"
-ac_config_commands="$ac_config_commands default"
+
+ac_config_commands="$ac_config_commands stamp-h"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
"shlib/Makefile") CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;;
"readline.pc") CONFIG_FILES="$CONFIG_FILES readline.pc" ;;
- "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
case $ac_file$ac_mode in
- "default":C)
-# Makefile uses this timestamp file to record whether config.h is up to date.
-echo > stamp-h
- ;;
+ "stamp-h":C) echo > stamp-h ;;
esac
done # for ac_tag
dnl
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 1987-2020 Free Software Foundation, Inc.
+# Copyright (C) 1987-2021 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-AC_REVISION([for Readline 8.1, version 2.91])
+AC_REVISION([for Readline 8.1, version 2.94])
AC_INIT(readline, 8.1, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
-AC_PREREQ(2.50)
+AC_PREREQ(2.63)
AC_CONFIG_SRCDIR(readline.h)
AC_CONFIG_AUX_DIR(./support)
opt_curses=no
dnl arguments to configure
-AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
+AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
if test "$opt_curses" = "yes"; then
prefer_curses=yes
opt_install_examples=yes
opt_bracketed_paste_default=yes
-AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
-AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval)
-AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval)
-AC_ARG_ENABLE(install-examples, AC_HELP_STRING([--disable-install-examples], [don't install examples [[default=install]]]), opt_install_examples=$enableval)
+AC_ARG_ENABLE(multibyte, AS_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
+AC_ARG_ENABLE(shared, AS_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval)
+AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval)
+AC_ARG_ENABLE(install-examples, AS_HELP_STRING([--disable-install-examples], [don't install examples [[default=install]]]), opt_install_examples=$enableval)
-AC_ARG_ENABLE(bracketed-paste-default, AC_HELP_STRING([--disable-bracketed-paste-default], [disable bracketed paste by default [[default=enable]]]), opt_bracketed_paste_default=$enableval)
+AC_ARG_ENABLE(bracketed-paste-default, AS_HELP_STRING([--disable-bracketed-paste-default], [disable bracketed paste by default [[default=enable]]]), opt_bracketed_paste_default=$enableval)
if test $opt_multibyte = no; then
AC_DEFINE(NO_MULTIBYTE_SUPPORT)
AC_PROG_MAKE_SET
AC_PROG_CC
-dnl AC_AIX
-AC_MINIX
+AC_USE_SYSTEM_EXTENSIONS
# If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS
if test -n "$want_auto_cflags" ; then
AUTO_CFLAGS="-g ${GCC:+-O2}"
- STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}"
+ STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}"
fi
AC_PROG_GCC_TRADITIONAL
AC_C_CHAR_UNSIGNED
AC_C_VOLATILE
-AC_TYPE_SIGNAL
-
AC_TYPE_SIZE_T
AC_CHECK_TYPE(ssize_t, int)
-AC_HEADER_STDC
-
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_HEADER_TIME
AC_CHECK_FUNCS(fcntl gettimeofday kill lstat pselect readlink select setitimer)
AC_CHECK_FUNCS(fnmatch memmove putenv setenv setlocale \
BASH_FUNC_POSIX_SETJMP
BASH_FUNC_LSTAT
BASH_FUNC_STRCOLL
-BASH_FUNC_CTYPE_NONASCII
BASH_CHECK_GETPW_FUNCS
AC_HEADER_TIOCGWINSZ
BASH_TYPE_SIG_ATOMIC_T
-BASH_TYPE_SIGHANDLER
BASH_HAVE_TIOCSTAT
BASH_HAVE_FIONREAD
AC_SUBST(TERMCAP_LIB)
AC_SUBST(TERMCAP_PKG_CONFIG_LIB)
-AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc],
-[
-# Makefile uses this timestamp file to record whether config.h is up to date.
-echo > stamp-h
-])
+AC_CONFIG_FILES([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc])
+
+dnl Makefile uses this timestamp file to record whether config.h is up to date.
+AC_CONFIG_COMMANDS([stamp-h], [echo > stamp-h])
+
+AC_OUTPUT
while (count--)
{
c = rl_line_buffer[rl_point - 1];
+
+ /* First move backwards through whitespace */
+ while (rl_point && whitespace (c))
+ {
+ rl_point--;
+ c = rl_line_buffer[rl_point - 1];
+ }
+
+ /* Consume one or more slashes. */
+ if (c == '/')
+ {
+ int i;
+
+ i = rl_point - 1;
+ while (i > 0 && c == '/')
+ c = rl_line_buffer[--i];
+ if (i == 0 || whitespace (c))
+ {
+ rl_point = i + whitespace (c);
+ continue; /* slashes only */
+ }
+ c = '/';
+ }
+
while (rl_point && (whitespace (c) || c == '/'))
{
rl_point--;
/* Some systems require this, mostly for the definition of `struct timezone'.
For example, Dynix/ptx has that definition in <time.h> rather than
sys/time.h */
-#if defined (TIME_WITH_SYS_TIME)
+#if defined (HAVE_SYS_TIME_H)
# include <sys/time.h>
-# include <time.h>
-#else
-# if defined (HAVE_SYS_TIME_H)
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
+#include <time.h>
#if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK)
# if !defined (CLK_TCK)
char *t;
rl_maybe_save_line ();
+ /* This will either be restored from the saved line or set from the
+ found history line. */
+ rl_undo_list = 0;
temp = (HIST_ENTRY *)NULL;
/* Search COUNT times through the history for a line matching
/* Copy the line we found into the current line buffer. */
make_history_line_current (temp);
+ /* Make sure we set the current history position to the last line found so
+ we can do things like operate-and-get-next from here. This is similar to
+ how incremental search behaves. */
+ history_set_pos (rl_history_search_pos); /* XXX */
+
/* decide where to put rl_point -- need to change this for pattern search */
if (rl_history_search_flags & ANCHORED_SEARCH)
rl_point = rl_history_search_len; /* easy case */
#if defined (HANDLE_SIGNALS)
-#if !defined (RETSIGTYPE)
-# if defined (VOID_SIGHANDLER)
-# define RETSIGTYPE void
-# else
-# define RETSIGTYPE int
-# endif /* !VOID_SIGHANDLER */
-#endif /* !RETSIGTYPE */
-
-#if defined (VOID_SIGHANDLER)
-# define SIGHANDLER_RETURN return
-#else
-# define SIGHANDLER_RETURN return (0)
-#endif
+#define SIGHANDLER_RETURN return
/* This typedef is equivalent to the one for Function; it allows us
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
-typedef RETSIGTYPE SigHandler (int);
+typedef void SigHandler (int);
#if defined (HAVE_POSIX_SIGNALS)
typedef struct sigaction sighandler_cxt;
static void rl_maybe_set_sighandler (int, SigHandler *, sighandler_cxt *);
static void rl_maybe_restore_sighandler (int, sighandler_cxt *);
-static RETSIGTYPE rl_signal_handler (int);
-static RETSIGTYPE _rl_handle_signal (int);
+static void rl_signal_handler (int);
+static void _rl_handle_signal (int);
/* Exported variables for use by applications. */
/* Readline signal handler functions. */
/* Called from RL_CHECK_SIGNALS() macro to run signal handling code. */
-RETSIGTYPE
+void
_rl_signal_handler (int sig)
{
_rl_caught_signal = 0; /* XXX */
SIGHANDLER_RETURN;
}
-static RETSIGTYPE
+static void
rl_signal_handler (int sig)
{
_rl_caught_signal = sig;
/* This is called to handle a signal when it is safe to do so (out of the
signal handler execution path). Called by _rl_signal_handler for all the
signals readline catches except SIGWINCH. */
-static RETSIGTYPE
+static void
_rl_handle_signal (int sig)
{
int block_sig;
}
#if defined (SIGWINCH)
-static RETSIGTYPE
+static void
rl_sigwinch_handler (int sig)
{
SigHandler *oh;
int
rl_alphabetic (int c)
{
- if (ALPHABETIC (c))
+ if (_rl_alphabetic_p (c))
return (1);
return (_rl_allow_pathname_alphabetic_chars &&