configuration changes to remove obsolete autoconf macros, and resultant changes to some source files

This commit is contained in:
Chet Ramey
2021-09-08 11:16:55 -04:00
parent 2208813a97
commit a67031fe11
20 changed files with 7308 additions and 5900 deletions
+66 -3
View File
@@ -1828,8 +1828,71 @@ subst.c
by any of "<>&", see if we can optimize the command and call
optimize_cat_file to do it if we can.
9/2
---
configure.ac,config.h.in,lib/sh/setlinebuf.c
- SETVBUF_REVERSED: remove all references
configure.ac,aclocal.m4
- AC_OUTPUT: move created files and commands to AC_CONFIG_FILES and
AC_CONFIG_COMMANDS; call AC_OUTPUT without any arguments
- require autoconf version 2.63
- AC_HELP_STRING -> AS_HELP_STRING
- replace references to $ac_cv_prog_gcc with $GCC
- AC_C_LONG_DOUBLE -> AC_TYPE_LONG_DOUBLE
- enable-alt-array-implementation: new configure option, placeholder
for later
unwind_prot.c
- stddef.h: include if HAVE_STDDEF_H is defined, not STDC_HEADERS
bashansi.h
- memory.h: don't include any more; assume <string.h> has all the
necessary defines
aclocal.m4
- AC_HEADER_STDC: remove AC_REQUIRE calls to this; change tests to use
appropriate checks instead of STDC_HEADERS
9/3
---
configure.ac,config.h.in
- AC_TYPE_SIGNAL,BASH_TYPE_SIGHANDLER: remove calls, remove mention of
RETSIGTYPE and VOID_SIGHANDLER
- AC_USE_SYSTEM_EXTENSIONS: use this instead of AC_ISC_POSIX (which is
well and truly obsolete) and AC_MINIX (which just calls it anyway).
All the right defines are already present
- AC_HEADER_TIME: removed
- AC_HEADER_STDC: removed
- AC_DECL_SYS_SIGLIST: replaced with BASH_DECL_SYS_SIGLIST
- BASH_FUNC_CTYPE_NONASCII: removed
sig.h,lib/readline/signals.c
- RETSIGTYPE -> void, SIGHANDLER_RETURN -> return
include/posixtime.h
- don't bother with TIME_WITH_SYS_TIME, just include <sys/times.h> if
we have it and include <time.h> unconditionally
include/chartypes.h,lib/readline/chardefs.h
- IN_CTYPE_DOMAIN: no longer uses STDC_HEADERS define, checks against
CHAR_MAX for non-C89 systems, still a no-op on C89 systems
lib/readline/chardefs.h
- memory.h: don't include, no need for STDC_HEADERS; assume the mem*
functions are defined in <string.h> as in C89
- now that we assume IN_CTYPE_DOMAIN bounds its argument to unsigned
chars, we don't need NON_NEGATIVE checks at all
lib/readline/chardefs.h,util.c
- ALPHABETIC -> _rl_alphabetic_p
9/8
---
lib/sh/strftime.c
- include <posixtime.h> after reworking above; include <sys/types.h>
unconditionally in case it defines time_t. From a report by
Ori Sky Farrell <bash@ori.mx>
+2 -2
View File
@@ -592,7 +592,7 @@ $(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
ls -l $(Program)
-$(SIZE) $(Program)
.build: $(SOURCES) config.h Makefile version.h $(VERSPROG)
.build: $(SOURCES) config.h Makefile $(DEFDIR)/builtext.h version.h $(VERSPROG)
@echo
@echo " ***********************************************************"
@echo " * *"
@@ -742,7 +742,7 @@ syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h
$(RM) $@
./mksyntax$(EXEEXT) -o $@
$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h $(DEFDIR)/builtext.h
$(BUILTINS_LIBRARY): $(DEFDIR)/builtext.h $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h
@(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} targets ) || exit 1
# these require special rules to circumvent make builtin rules
Vendored
+23 -10
View File
@@ -72,13 +72,14 @@ dnl
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
@@ -106,12 +107,11 @@ dnl AC_CHECK_DECL
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
@@ -216,8 +216,19 @@ AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
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([
@@ -645,12 +656,13 @@ fi
# 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__
@@ -675,12 +687,13 @@ fi
# 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__
@@ -2060,7 +2073,7 @@ dnl
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])],
-3
View File
@@ -22,9 +22,6 @@
#define _BASHANSI_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 */
+14 -27
View File
@@ -23,15 +23,6 @@
/* Template settings for autoconf */
#undef __EXTENSIONS__
#undef _ALL_SOURCE
#undef _GNU_SOURCE
#undef _POSIX_SOURCE
#undef _POSIX_1_SOURCE
#undef _POSIX_PTHREAD_SEMANTICS
#undef _TANDEM_SOURCE
#undef _MINIX
/* Configuration feature settings controllable by autoconf. */
/* Define JOB_CONTROL if your operating system supports
@@ -255,6 +246,8 @@
/* Characteristics of the system's header files and libraries that affect
the compilation environment. */
/* These are set by AC_USE_SYSTEM_EXTENSIONS */
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
@@ -262,11 +255,18 @@
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to use GNU libc extensions */
/* Define to use GNU libc extensions. */
#undef _GNU_SOURCE
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to enable general system extensions on Solaris. */
#undef __EXTENSIONS__
/* General system extensions on AIX */
#undef _ALL_SOURCE
#undef _POSIX_PTHREAD_SEMANTICS
#undef _TANDEM_SOURCE
#undef _MINIX
/* Memory management functions. */
@@ -516,11 +516,6 @@
#undef PGRP_PIPE
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
#undef SETVBUF_REVERSED
#undef STAT_MACROS_BROKEN
#undef ULIMIT_MAXFDS
@@ -533,8 +528,6 @@
#undef HAVE_PRINTF_A_FORMAT
#undef CTYPE_NON_ASCII
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
@@ -557,12 +550,6 @@
/* Type and behavior of signal handling functions. */
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if return type of signal handlers is void */
#undef VOID_SIGHANDLER
#undef MUST_REINSTALL_SIGHANDLERS
#undef HAVE_BSD_SIGNALS
@@ -1095,8 +1082,6 @@
/* Define if you have <sys/time.h> */
#undef HAVE_SYS_TIME_H
#undef TIME_WITH_SYS_TIME
/* Define if you have <sys/times.h> */
#undef HAVE_SYS_TIMES_H
@@ -1172,6 +1157,8 @@
#undef DEV_FD_STAT_BROKEN
#undef ALT_ARRAY_IMPLEMENTATION
/* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */
/* Define if you have the <argz.h> header file. */
Vendored
+7075 -5699
View File
File diff suppressed because it is too large Load Diff
+73 -75
View File
@@ -21,7 +21,7 @@ dnl Process this file with autoconf to produce a configure script.
# 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 Bash 5.1, version 5.025])dnl
AC_REVISION([for Bash 5.1, version 5.028])dnl
define(bashvers, 5.1)
define(relstatus, maint)
@@ -29,7 +29,8 @@ define(relstatus, maint)
AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.61)
dnl we could consider making this 2.68 or 2.69
AC_PREREQ(2.63)
AC_CONFIG_SRCDIR(shell.h)
dnl where to find install.sh, config.sub, and config.guess
@@ -108,11 +109,11 @@ AC_ARG_VAR(DEBUGGER_START_FILE, [location of bash debugger initialization file])
dnl arguments to configure
dnl packages
AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
AC_ARG_WITH(bash-malloc, AC_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval)
AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
AC_ARG_WITH(gnu-malloc, AC_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval)
AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval)
AC_ARG_WITH(afs, AS_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
AC_ARG_WITH(bash-malloc, AS_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval)
AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
AC_ARG_WITH(gnu-malloc, AS_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval)
AC_ARG_WITH(installed-readline, AS_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval)
if test "$opt_bash_malloc" = yes; then
MALLOC_TARGET=malloc
@@ -182,13 +183,14 @@ opt_dircomplete_expand_default=no
opt_globascii_default=yes
opt_function_import=yes
opt_dev_fd_stat_broken=no
opt_alt_array_impl=no
dnl options that affect how bash is compiled and linked
opt_static_link=no
opt_profiling=no
dnl argument parsing for optional features
AC_ARG_ENABLE(minimal-config, AC_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval)
AC_ARG_ENABLE(minimal-config, AS_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval)
dnl a minimal configuration turns everything off, but features can be
dnl added individually
@@ -205,48 +207,49 @@ if test $opt_minimal_config = yes; then
opt_globascii_default=yes
fi
AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
AC_ARG_ENABLE(arith-for-command, AC_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval)
AC_ARG_ENABLE(array-variables, AC_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval)
AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval)
AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval)
AC_ARG_ENABLE(casemod-attributes, AC_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval)
AC_ARG_ENABLE(casemod-expansions, AC_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval)
AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval)
AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval)
AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval)
AC_ARG_ENABLE(coprocesses, AC_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval)
AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval)
AC_ARG_ENABLE(dev-fd-stat-broken, AC_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval)
AC_ARG_ENABLE(direxpand-default, AC_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval)
AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval)
AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval)
AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval)
AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval)
AC_ARG_ENABLE(extended-glob-default, AC_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval)
AC_ARG_ENABLE(function-import, AC_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval)
AC_ARG_ENABLE(glob-asciiranges-default, AC_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval)
AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval)
AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval)
AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval)
AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
AC_ARG_ENABLE(net-redirections, AC_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval)
AC_ARG_ENABLE(process-substitution, AC_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval)
AC_ARG_ENABLE(progcomp, AC_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval)
AC_ARG_ENABLE(prompt-string-decoding, AC_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval)
AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval)
AC_ARG_ENABLE(restricted, AC_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval)
AC_ARG_ENABLE(select, AC_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval)
AC_ARG_ENABLE(separate-helpfiles, AC_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval)
AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval)
AC_ARG_ENABLE(strict-posix-default, AC_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval)
AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval)
AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval)
AC_ARG_ENABLE(alias, AS_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
AC_ARG_ENABLE(alt-array-implementation, AS_HELP_STRING([--enable-alt-array-implementation], [enable an alternate array implementation that optimizes speed at the cost of space]), opt_alt_array_impl=$enableval)
AC_ARG_ENABLE(arith-for-command, AS_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval)
AC_ARG_ENABLE(array-variables, AS_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval)
AC_ARG_ENABLE(bang-history, AS_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval)
AC_ARG_ENABLE(brace-expansion, AS_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval)
AC_ARG_ENABLE(casemod-attributes, AS_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval)
AC_ARG_ENABLE(casemod-expansions, AS_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval)
AC_ARG_ENABLE(command-timing, AS_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval)
AC_ARG_ENABLE(cond-command, AS_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval)
AC_ARG_ENABLE(cond-regexp, AS_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval)
AC_ARG_ENABLE(coprocesses, AS_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval)
AC_ARG_ENABLE(debugger, AS_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval)
AC_ARG_ENABLE(dev-fd-stat-broken, AS_HELP_STRING([--enable-dev-fd-stat-broken], [enable this option if stat on /dev/fd/N and fstat on file descriptor N don't return the same results]), opt_dev_fd_stat_broken=$enableval)
AC_ARG_ENABLE(direxpand-default, AS_HELP_STRING([--enable-direxpand-default], [enable the direxpand shell option by default]), opt_dircomplete_expand_default=$enableval)
AC_ARG_ENABLE(directory-stack, AS_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval)
AC_ARG_ENABLE(disabled-builtins, AS_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval)
AC_ARG_ENABLE(dparen-arithmetic, AS_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval)
AC_ARG_ENABLE(extended-glob, AS_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval)
AC_ARG_ENABLE(extended-glob-default, AS_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval)
AC_ARG_ENABLE(function-import, AS_HELP_STRING([--enable-function-import], [allow bash to import exported function definitions by default]), opt_function_import=$enableval)
AC_ARG_ENABLE(glob-asciiranges-default, AS_HELP_STRING([--enable-glob-asciiranges-default], [force bracket range expressions in pattern matching to use the C locale by default]), opt_globascii_default=$enableval)
AC_ARG_ENABLE(help-builtin, AS_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval)
AC_ARG_ENABLE(history, AS_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval)
AC_ARG_ENABLE(job-control, AS_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval)
AC_ARG_ENABLE(multibyte, AS_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
AC_ARG_ENABLE(net-redirections, AS_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval)
AC_ARG_ENABLE(process-substitution, AS_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval)
AC_ARG_ENABLE(progcomp, AS_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval)
AC_ARG_ENABLE(prompt-string-decoding, AS_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval)
AC_ARG_ENABLE(readline, AS_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval)
AC_ARG_ENABLE(restricted, AS_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval)
AC_ARG_ENABLE(select, AS_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval)
AC_ARG_ENABLE(separate-helpfiles, AS_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval)
AC_ARG_ENABLE(single-help-strings, AS_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval)
AC_ARG_ENABLE(strict-posix-default, AS_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval)
AC_ARG_ENABLE(usg-echo-default, AS_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval)
AC_ARG_ENABLE(xpg-echo-default, AS_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval)
dnl options that alter how bash is compiled and linked
AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval)
AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval)
AC_ARG_ENABLE(static-link, AC_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval)
AC_ARG_ENABLE(mem-scramble, AS_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval)
AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval)
AC_ARG_ENABLE(static-link, AS_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval)
dnl So-called `precious' variables
AC_ARG_VAR([CC_FOR_BUILD], [C compiler used when compiling binaries used only at build time])
@@ -354,6 +357,9 @@ fi
if test $opt_dev_fd_stat_broken = yes; then
AC_DEFINE(DEV_FD_STAT_BROKEN)
fi
if test $opt_alt_array_impl = yes; then
AC_DEFINE(ALT_ARRAY_IMPLEMENTATION)
fi
if test $opt_memscramble = yes; then
AC_DEFINE(MEMSCRAMBLE)
@@ -416,14 +422,14 @@ AC_PROG_CC
if test -n "$want_auto_cflags"; then
AUTO_CFLAGS="-g ${GCC:+-O2}"
AUTO_LDFLAGS="-g ${GCC:+-O2}"
# STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}"
STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}"
else
AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS=
fi
dnl test for Unix variants
AC_ISC_POSIX
AC_MINIX
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
@@ -494,7 +500,7 @@ if test "$opt_static_link" = yes; then
prefer_static=yes
prefer_shared=no
# if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
if test "$GCC" = "yes"; then
STATIC_LD="-static"
case "$host_os" in
solaris2*|linux*) ;;
@@ -735,15 +741,12 @@ m4_include([m4/wchar_t.m4])
m4_include([m4/wint_t.m4])
m4_include([m4/xsize.m4])
dnl Turn on any extensions available in the GNU C library.
AC_DEFINE(_GNU_SOURCE, 1)
dnl C compiler characteristics
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
AC_C_STRINGIZE
AC_C_LONG_DOUBLE
AC_TYPE_LONG_DOUBLE
AC_C_PROTOTYPES
AC_C_CHAR_UNSIGNED
AC_C_VOLATILE
@@ -754,7 +757,6 @@ AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl])
dnl header files
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_MAJOR
BASH_HEADER_INTTYPES
@@ -788,7 +790,6 @@ dnl special checks for libc functions
AC_FUNC_ALLOCA
AC_FUNC_CHOWN
AC_FUNC_GETPGRP
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_VPRINTF
AC_FUNC_STRCOLL
@@ -820,7 +821,7 @@ if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
fi
dnl signal stuff
AC_TYPE_SIGNAL
dnl AC_TYPE_SIGNAL
dnl checks for certain version-specific system calls and libc functions
AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE))
@@ -930,9 +931,6 @@ AC_CHECK_LIB(dl, dlopen)
AC_CHECK_FUNCS(dlopen dlclose dlsym)
fi
dnl this defines HAVE_DECL_SYS_SIGLIST
AC_DECL_SYS_SIGLIST
dnl network functions -- check for inet_aton again
if test "$ac_cv_func_inet_aton" != 'yes'; then
BASH_FUNC_INET_ATON
@@ -968,7 +966,6 @@ AC_CHECK_TYPE(time_t, long)
BASH_TYPE_LONG_LONG
BASH_TYPE_UNSIGNED_LONG_LONG
AC_TYPE_SIGNAL
BASH_TYPE_SIG_ATOMIC_T
AC_CHECK_SIZEOF(char, 1)
@@ -1006,7 +1003,6 @@ BASH_FUNC_LSTAT
fi
dnl behavior of system calls and library functions
BASH_FUNC_CTYPE_NONASCII
BASH_FUNC_DUP2_CLOEXEC_CHECK
BASH_SYS_PGRP_SYNC
BASH_SYS_SIGNAL_VINTAGE
@@ -1017,7 +1013,7 @@ BASH_SYS_SIGLIST
BASH_UNDER_SYS_SIGLIST
dnl various system types
BASH_TYPE_SIGHANDLER
dnl BASH_TYPE_SIGHANDLER
BASH_CHECK_TYPE(clock_t, [#include <sys/times.h>], long)
BASH_CHECK_TYPE(sigset_t, [#include <signal.h>], int)
BASH_CHECK_TYPE(sig_atomic_t, [#include <signal.h>], int)
@@ -1305,14 +1301,16 @@ AC_SUBST(LOCAL_DEFS)
#AC_SUBST(ALLOCA_SOURCE)
#AC_SUBST(ALLOCA_OBJECT)
AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
lib/intl/Makefile \
lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \
examples/loadables/Makefile examples/loadables/Makefile.inc \
examples/loadables/perl/Makefile \
support/bash.pc support/bashbug.sh],
[
# Makefile uses this timestamp file to record whether config.h is up to date.
echo timestamp > stamp-h
])
AC_CONFIG_FILES([Makefile builtins/Makefile lib/readline/Makefile \
lib/glob/Makefile lib/intl/Makefile \
lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
lib/tilde/Makefile doc/Makefile support/Makefile \
po/Makefile.in examples/loadables/Makefile \
examples/loadables/Makefile.inc \
examples/loadables/perl/Makefile \
support/bash.pc support/bashbug.sh])
dnl Makefile uses this timestamp file to record whether config.h is up to date.
AC_CONFIG_COMMANDS([stamp-h], [echo timestamp > stamp-h])
AC_OUTPUT
+9 -13
View File
@@ -23,22 +23,18 @@
#include <ctype.h>
/* Jim Meyering writes:
#ifndef UCHAR_MAX
# define UCHAR_MAX 255
#endif
#ifndef CHAR_MAX
# define CHAR_MAX 127
#endif
"... Some ctype macros are valid only for character codes that
isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
using /bin/cc or gcc but without giving an ansi option). So, all
ctype uses should be through macros like ISPRINT... If
STDC_HEADERS is defined, then autoconf has verified that the ctype
macros don't need to be guarded with references to isascii. ...
Defining IN_CTYPE_DOMAIN to 1 should let any compiler worth its salt
eliminate the && through constant folding."
Solaris defines some of these symbols so we must undefine them first. */
#if STDC_HEADERS || (!defined (isascii) && !HAVE_ISASCII)
/* use this as a proxy for C89 */
#if defined (HAVE_STDLIB_H) && defined (HAVE_STRING_H)
# define IN_CTYPE_DOMAIN(c) 1
#else
# define IN_CTYPE_DOMAIN(c) isascii(c)
# define IN_CTYPE_DOMAIN(c) ((c) >= 0 && (c) <= CHAR_MAX)
#endif
#if !defined (isspace) && !defined (HAVE_ISSPACE)
+2 -8
View File
@@ -25,16 +25,10 @@
/* 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)
+4
View File
@@ -79,6 +79,10 @@
# define UINT_MAX ((unsigned int) ~(unsigned int)0)
#endif
#ifndef UCHAR_MAX
# define UCHAR_MAX 255
#endif
/* workaround for gcc bug in versions < 2.7 */
#if defined (HAVE_LONG_LONG) && __GNUC__ == 2 && __GNUC_MINOR__ < 7
static const unsigned long long int maxquad = ULLONG_MAX;
+15 -14
View File
@@ -26,9 +26,6 @@
#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)
@@ -66,22 +63,26 @@
#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))
#ifndef UCHAR_MAX
# define UCHAR_MAX 255
#endif
#ifndef CHAR_MAX
# define CHAR_MAX 127
#endif
/* 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) isascii(c)
# 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
#if defined (CTYPE_NON_ASCII)
# define NON_NEGATIVE(c) 1
#else
# define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
#endif
/* Some systems define these; we want our definitions. */
#undef ISPRINT
@@ -99,12 +100,12 @@
#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
+8 -20
View File
@@ -48,23 +48,11 @@
#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;
@@ -82,8 +70,8 @@ static SigHandler *rl_set_sighandler (int, SigHandler *, 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. */
@@ -136,7 +124,7 @@ void *_rl_sigcleanarg;
/* 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 */
@@ -163,7 +151,7 @@ _rl_signal_handler (int sig)
SIGHANDLER_RETURN;
}
static RETSIGTYPE
static void
rl_signal_handler (int sig)
{
_rl_caught_signal = sig;
@@ -173,7 +161,7 @@ rl_signal_handler (int 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;
@@ -315,7 +303,7 @@ _rl_handle_signal (int sig)
}
#if defined (SIGWINCH)
static RETSIGTYPE
static void
rl_sigwinch_handler (int sig)
{
SigHandler *oh;
+1 -1
View File
@@ -72,7 +72,7 @@ static const char * const pathname_alphabetic_chars = "/-_=~.#$";
int
rl_alphabetic (int c)
{
if (ALPHABETIC (c))
if (_rl_alphabetic_p (c))
return (1);
return (_rl_allow_pathname_alphabetic_chars &&
-5
View File
@@ -48,12 +48,7 @@ sh_setlinebuf (stream)
#endif
#if defined (HAVE_SETVBUF)
# if defined (SETVBUF_REVERSED)
return (setvbuf (stream, _IOLBF, local_linebuf, LBUF_BUFSIZE));
# else /* !SETVBUF_REVERSED */
return (setvbuf (stream, local_linebuf, _IOLBF, LBUF_BUFSIZE));
# endif /* !SETVBUF_REVERSED */
# else /* !HAVE_SETVBUF */
setlinebuf (stream);
+3 -6
View File
@@ -59,16 +59,13 @@
*/
#include <config.h>
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include <posixtime.h>
#include <errno.h>
#if defined(TM_IN_SYS_TIME)
#include <sys/types.h>
#include <sys/time.h>
#endif
#include <stdlib.h>
#include <string.h>
+5 -2
View File
@@ -52,15 +52,18 @@ extern char *realloc ();
#else /* not HAVE_CONFIG_H */
#ifdef STDC_HEADERS
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <string.h>
#else
char *getenv ();
char *malloc ();
char *realloc ();
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* Do this after the include, in case string.h prototypes bcopy. */
#if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
#define bcopy(s, d, n) memcpy ((d), (s), (n))
+2 -2
View File
@@ -51,8 +51,8 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
AC_ARG_ENABLE([threads],
AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
AS_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
[gl_use_threads=$enableval],
[if test -n "$gl_use_threads_default"; then
gl_use_threads="$gl_use_threads_default"
+3 -7
View File
@@ -31,14 +31,10 @@
# define SIGABRT SIGIOT
#endif
#define sighandler RETSIGTYPE
typedef RETSIGTYPE SigHandler PARAMS((int));
#define sighandler void
typedef void SigHandler PARAMS((int));
#if defined (VOID_SIGHANDLER)
# define SIGRETURN(n) return
#else
# define SIGRETURN(n) return(n)
#endif /* !VOID_SIGHANDLER */
#define SIGRETURN(n) return
/* Here is a definition for set_signal_handler () which simply expands to
a call to signal () for non-Posix systems. The code for set_signal_handler
+1 -1
View File
@@ -1,4 +1,4 @@
BUILD_DIR=/usr/local/build/bash/bash-current
BUILD_DIR=/usr/local/build/chet/bash/bash-current
THIS_SH=$BUILD_DIR/bash
PATH=$PATH:$BUILD_DIR
+2 -2
View File
@@ -3,7 +3,7 @@
/* I can't stand it anymore! Please can't we just write the
whole Unix system in lisp or something? */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
/* Copyright (C) 1987-2021 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -35,7 +35,7 @@
# include <unistd.h>
#endif
#if STDC_HEADERS
#if defined (HAVE_STDDEF_H)
# include <stddef.h>
#endif