diff options
182 files changed, 17609 insertions, 9439 deletions
@@ -454,3 +454,5 @@ lib/sh/vprint.c Chet Ramey, Brian Fox lib/sh/xstrchr.c Chet Ramey, Mitsuru Chinen lib/sh/zread.c Chet Ramey lib/sh/zwrite.c Chet Ramey + +tests/posix-ifs.sh Glenn Fowler @@ -1,3 +1,261 @@ +This document details the changes between this version, bash-3.2-release, +and the previous version, bash-3.2-beta. + +1. Changes to Bash + +a. Fixed a bug that caused the temporary environment passed to a command to + affect the shell's environment under certain circumstances. + +b. Fixed a bug in the printf builtin that caused the %q format specifier to + ignore empty string arguments. + +c. Improved multibyte character environment detection at configuration time. + +d. Fixed a bug in the read builtin that left spurious escape characters in the + input after processing backslashes when assigning to an array variable. + +2. Changes to Readline + +a. Fixed a redisplay bug that occurred in multibyte-capable locales when the + prompt was one character longer than the screen width. +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.2-beta, +and the previous version, bash-3.2-alpha. + +1. Changes to Bash + +a. Changed the lexical analyzer to treat locale-specific blank characters as + white space. + +b. Fixed a bug in command printing to avoid confusion between redirections and + process substitution. + +c. Fixed problems with cross-compiling originating from inherited environment + variables. + +d. Added write error reporting to printf builtin. + +e. Fixed a bug in the variable expansion code that could cause a core dump in + a multi-byte locale. + +f. Fixed a bug that caused substring expansion of a null string to return + incorrect results. + +g. BASH_COMMAND now retains its previous value while executing commands as the + result of a trap, as the documentation states. + +2. Changes to Readline + +a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing + the prompt and input line multiple times. + +b. Fixed history expansion to not be confused by here-string redirection. + +c. Readline no longer treats read errors by converting them to newlines, as + it does with EOF. This caused partial lines to be returned from readline(). + +------------------------------------------------------------------------------ +This document details the changes between this version, bash-3.2-alpha, +and the previous version, bash-3.1-release. + +1. Changes to Bash + +a. Fixed a source bug that caused the minimal configuration to not compile. + +b. Fixed memory leaks in error handling for the `read' builtin. + +c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit + status. + +d. Fixed some parsing problems with compound array assignments. + +e. Added additional configuration changes for: NetBSD (incomplete multibyte + character support) + +f. Fixed two bugs with local array variable creation when shadowing a variable + of the same name from a previous context. + +g. Fixed the `read' builtin to restore the correct set of completion functions + if a timeout occurs. + +h. Added code to defer the initialization of HISTSIZE (and its stifling of the + history list) until the history file is loaded, allowing a startup file to + override the default value. + +i. Tightened up the arithmetic expression parsing to produce better error + messages when presented with invalid operators. + +j. Fixed the cross-compilation support to build the signal list at shell + invocation rather than compile time if cross-compiling. + +k. Fixed multibyte support for non-gcc compilers (or compilers that do not + allow automatic array variable sizing based on a non-constant value). + +l. Several fixes to the code that manages the list of terminated jobs and + their exit statuses, and the list of active and recently-terminated jobs + to avoid pid aliasing/wraparound and allocation errors. + +m. Fixed a problem that allowed scripts to die due to SIGINT while waiting + for children, even when started in the background or otherwise ignoring + SIGINT. + +n. Fixed a bug that caused shells invoked as -/bin/bash from not being + recognized as login shells. + +o. Fixed a problem that caused shells in the background to give the terminal + to a process group other than the foreground shell process group. + +p. Fixed a problem with extracting the `varname' in ${#varname}. + +q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby + calling functions that may not be called in a signal handler context -- + but set a flag and exit afterward (like SIGINT). + +r. Changed the brace expansion code to skip over braces that don't begin a + valid matched brace expansion construct. + +s. Fixed `typeset' and `declare' to not require that their shell function + operands to be valid shell identifiers. + +t. Changed `test' to use access(2) with a temporary uid/euid swap when testing + file attributes and running setuid, and access(2) in most other cases. + +u. Changed completion code to not attempt command name completion on a line + consisting solely of whitespace when no_empty_command_completion is set. + +v. The `hash' builtin now prints nothing in posix mode when the hash table is + empty, and prints a message to that effect to stdout instead of stderr + when not in posix mode. + +w. Fixed a bug in the extended pattern matching code that caused it to fail to + match periods with certain patterns. + +x. Fixed a bug that caused the shell to dump core when performing filename + generation in directories with thousands of files. + +y. Returned to the original Bourne shell rules for parsing ``: no recursive + parsing of embedded quoted strings or ${...} constructs. + +z. The inheritence of the DEBUG, RETURN, and ERR traps is now dependent only + on the settings of the `functrace' and `errtrace' shell options, rather + than whether or not the shell is in debugging mode. + +aa. Fixed a problem with $HOME being converted to ~ in the expansion of + members of the DIRSTACK array. + +bb. Fixed a problem with quoted arguments to arithmetic expansions in certain + constructs. + +cc. The command word completion code now no longer returns matching directories + while searching $PATH. + +dd. Fixed a bug with zero-padding and precision handling in snprintf() + replacement. + +ee. Fixed a bug that caused the command substitution code not to take embedded + shell comments into account. + +ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an + arithmetic substitution. + +gg. Fixed a bug in the prompt expansion code that inappropriately added a + \001 before a \002 under certain circumstances. + +hh. Fixed a bug that caused `unset LANG' to not properly reset the locale + (previous versions would set the locale back to what it was when bash + was started rather than the system's "native" locale). + +ii. Fixed a bug that could cause file descriptors > 10 to not be closed even + when closed explicitly by a script. + +jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting + inside double-quoted command substitutions. + +kk. Fixed a bug that could cause core dumps when `return' was executed as the + last element of a pipeline inside a shell function. + +ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in + the jobs list. + +2. Changes to Readline + +a. Fixed a problem that caused segmentation faults when using readline in + callback mode and typing consecutive DEL characters on an empty line. + +b. Fixed several redisplay problems with multibyte characters, all having to + do with the different code paths and variable meanings between single-byte + and multibyte character redisplay. + +c. Fixed a problem with key sequence translation when presented with the + sequence \M-\C-x. + +d. Fixed a problem that prevented the `a' command in vi mode from being + undone and redone properly. + +e. Fixed a problem that prevented empty inserts in vi mode from being undone + properly. + +f. Fixed a problem that caused readline to initialize with an incorrect idea + of whether or not the terminal can autowrap. + +g. Fixed output of key bindings (like bash `bind -p') to honor the setting of + convert-meta and use \e where appropriate. + +h. Changed the default filename completion function to call the filename + dequoting function if the directory completion hook isn't set. This means + that any directory completion hooks need to dequote the directory name, + since application-specific hooks need to know how the word was quoted, + even if no other changes are made. + +i. Fixed a bug with creating the prompt for a non-interactive search string + when there are non-printing characters in the primary prompt. + +j. Fixed a bug that caused prompts with invisible characters to be redrawn + multiple times in a multibyte locale. + +k. Fixed a bug that could cause the key sequence scanning code to return the + wrong function. + +l. Fixed a problem with the callback interface that caused it to fail when + using multi-character keyboard macros. + +m. Fixed a bug that could cause a core dump when an edited history entry was + re-executed under certain conditions. + +n. Fixed a bug that caused readline to reference freed memory when attmpting + to display a portion of the prompt. + +3. New Features in Bash + +a. Changed the parameter pattern replacement functions to not anchor the + pattern at the beginning of the string if doing global replacement - that + combination doesn't make any sense. + +b. When running in `word expansion only' mode (--wordexp option), inhibit + process substitution. + +c. Loadable builtins now work on MacOS X 10.[34]. + +d. Shells running in posix mode no longer set $HOME, as POSIX requires. + +e. The code that checks for binary files being executed as shell scripts now + checks only for NUL rather than any non-printing character. + +f. Quoting the string argument to the [[ command's =~ operator now forces + string matching, as with the other pattern-matching operators. + +4. New Features in Readline + +a. Calling applications can now set the keyboard timeout to 0, allowing + poll-like behavior. + +b. The value of SYS_INPUTRC (configurable at compilation time) is now used as + the default last-ditch startup file. + +c. The history file reading functions now allow windows-like \r\n line + terminators. + +------------------------------------------------------------------------------ This document details the changes between this version, bash-3.1-release, and the previous version, bash-3.1-rc2. @@ -48,7 +306,7 @@ and the previous version, bash-3.1-beta1. 1. Changes to Bash -a. Fixed a bug that could cause core dumps due of accessing the current +a. Fixed a bug that could cause core dumps due to accessing the current pipeline while in the middle of modifying it. b. Fixed a bug that caused pathnames with backslashes still quoting characters @@ -1,10 +1,10 @@ -This document details the incompatibilites between this version of bash, -bash-3.1, and a previous widely-available version, bash-1.14 (which -is still the `standard' version for a few Linux distributions). These -were discovered by users of bash-2.x and 3.x, so this list is not -comprehensive. Some of these incompatibilities occur between the current -version and versions 2.0 and above. (The differences between bash-1.14 -and bash-2.0 were significant.) +This document details the incompatibilities between this version of bash, +bash-3.2, and the previous widely-available versions, bash-1.14 (which is +still the `standard' version for a few Linux distributions) and bash-2.x. +These were discovered by users of bash-2.x and 3.x, so this list is not +comprehensive. Some of these incompatibilities occur between the current +version and versions 2.0 and above. (The differences between bash-1.14 and +bash-2.0 were significant.) 1. Bash uses a new quoting syntax, $"...", to do locale-specific string translation. Users who have relied on the (undocumented) @@ -184,42 +184,92 @@ and bash-2.0 were significant.) with `z' and still allow individual users to change the collation order. Users may put the above command into their own profiles as well, of course. -14. Bash versions up to 1.14.7 included an undocumented `-l' operator to - the `test/[' builtin. It was a unary operator that expanded to the - length of its string argument. This let you do things like +14. Bash versions up to 1.14.7 included an undocumented `-l' operator to + the `test/[' builtin. It was a unary operator that expanded to the + length of its string argument. This let you do things like test -l $variable -lt 20 - for example. + for example. - This was included for backwards compatibility with old versions of the - Bourne shell, which did not provide an easy way to obtain the length of - the value of a shell variable. + This was included for backwards compatibility with old versions of the + Bourne shell, which did not provide an easy way to obtain the length of + the value of a shell variable. - This operator is not part of the POSIX standard, because one can (and - should) use ${#variable} to get the length of a variable's value. - Bash-2.x does not support it. + This operator is not part of the POSIX standard, because one can (and + should) use ${#variable} to get the length of a variable's value. + Bash-2.x does not support it. -15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME, - HOSTTYPE, MACHTYPE, or OSTYPE variables. +15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME, + HOSTTYPE, MACHTYPE, or OSTYPE variables. If they appear in the initial + environment, the export attribute will be set, but if bash provides a + default value, they will remain local to the current shell. -16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables - to have special behavior if they appear in the initial environment. +16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables + to have special behavior if they appear in the initial environment. -17. Bash no longer removes the export attribute from the SSH_CLIENT or - SSH2_CLIENT variables, and no longer attempts to discover whether or - not it has been invoked by sshd in order to run the startup files. +17. Bash no longer removes the export attribute from the SSH_CLIENT or + SSH2_CLIENT variables, and no longer attempts to discover whether or + not it has been invoked by sshd in order to run the startup files. -18. Bash no longer requires that the body of a function be a group command; - any compound command is accepted. +18. Bash no longer requires that the body of a function be a group command; + any compound command is accepted. -19. As of bash-3.0, the pattern substitution operators no longer perform - quote removal on the pattern before attempting the match. This is the - way the pattern removal functions behave, and is more consistent. +19. As of bash-3.0, the pattern substitution operators no longer perform + quote removal on the pattern before attempting the match. This is the + way the pattern removal functions behave, and is more consistent. -20. After bash-3.0 was released, I reimplemented tilde expansion, incorporating - it into the mainline word expansion code. This fixes the bug that caused - the results of tilde expansion to be re-expanded. There is one - incompatibility: a ${paramOPword} expansion within double quotes will not - perform tilde expansion on WORD. This is consistent with the other - expansions, and what POSIX specifies. +20. After bash-3.0 was released, I reimplemented tilde expansion, incorporating + it into the mainline word expansion code. This fixes the bug that caused + the results of tilde expansion to be re-expanded. There is one + incompatibility: a ${paramOPword} expansion within double quotes will not + perform tilde expansion on WORD. This is consistent with the other + expansions, and what POSIX specifies. + +21. A number of variables have the integer attribute by default, so the += + assignment operator returns expected results: RANDOM, LINENO, MAILCHECK, + HISTCMD, OPTIND. + +22. Bash-3.x is much stricter about $LINENO correctly reflecting the line + number in a script; assignments to LINENO have little effect. + +23. By default, readline binds the terminal special characters to their + readline equivalents. As of bash-3.1/readline-5.1, this is optional and + controlled by the bind-tty-special-chars readline variable. + +24. The \W prompt string expansion abbreviates $HOME as `~'. The previous + behavior is available with ${PWD##/*/}. + +25. The arithmetic exponentiation operator is right-associative as of bash-3.1. + +26. The rules concerning valid alias names are stricter, as per POSIX.2. + +27. The Readline key binding functions now obey the convert-meta setting active + when the binding takes place, as the dispatch code does when characters + are read and processed. + +28. The historical behavior of `trap' reverting signal disposition to the + original handling in the absence of a valid first argument is implemented + only if the first argument is a valid signal number. + +29. In versions of bash after 3.1, the ${parameter//pattern/replacement} + expansion does not interpret `%' or `#' specially. Those anchors don't + have any real meaning when replacing every match. + +30. Beginning with bash-3.1, the combination of posix mode and enabling the + `xpg_echo' option causes echo to ignore all options, not looking for `-n' + +31. Beginning with bash-3.2, bash follows the Bourne-shell-style (and POSIX- + style) rules for parsing the contents of old-style backquoted command + substitutions. Previous versions of bash attempted to recursively parse + embedded quoted strings and shell constructs; bash-3.2 uses strict POSIX + rules to find the closing backquote and simply passes the contents of the + command substitution to a subshell for parsing and execution. + +32. Beginning with bash-3.2, bash uses access(2) when executing primaries for + the test builtin and the [[ compound command, rather than looking at the + file permission bits obtained with stat(2). This obeys restrictions of + the file system (e.g., read-only or noexec mounts) not available via stat. + +33. Beginning with bash-3.1/readline-5.1, the readline key binding code obeys + the current setting of the `convert-meta' variable. diff --git a/CWRU/changelog b/CWRU/changelog index 6ab5c812..830baec0 100644 --- a/CWRU/changelog +++ b/CWRU/changelog @@ -12475,3 +12475,1256 @@ configure.in - changed release status to `release' [bash-3.1 frozen] + + 12/8 + ---- +[bash-3.1 released] + + 12/9 + ---- +doc/{bash.1,version.texi},lib/readline/doc/version.texi + - remove `beta1' from man page footer and texinfo documents + +variables.c + - make sure winsize_assignment is protected by #ifdef READLINE, so + minimal shell will compile + +builtins/read.def + - make sure error cases free memory and run any unwind-protects to + avoid memory leaks + + 12/10 + ----- +execute_cmd.c + - change execute_command_internal to set $PIPESTATUS for ((...)) and + [[ ... ]] commands + +doc/{bash.1,bashref.texi,version.texi} + - add documentation for ulimit -[iqx] and bump revision date + + 12/12 + ----- +parse.y + - make sure parse_compound_assignment saves and restores the + PST_ASSIGNOK parser state flag around its calls to read_token. + Fixes bug reported by Mike Frysinger + + 12/13 + ----- +parse.y + - change parse_compound_assignment to save and restore the value of + last_read_token. Not sure why it was set unconditionally in the + first place after parsing the complete compound assignment + + 12/14 + ----- +lib/readline/text.c + - don't use return value of rl_kill_text (which always succeeds and + returns the number of characters killed) in rl_delete as an indication + of success or failure + - ditto for return value of rl_delete_text + +lib/readline/readline.c + - don't return the value of the called readline function as the return + value from _rl_dispatch_subseq; -1 means something different to the + callers (return 0 all the time to indicate that a readline function + was found and dispatched). Fix from Andreas Schwab for <DEL><DEL> + bug in callback interface first reported by Mike Frysinger + +execute_cmd.c + - fixed a typo in execute_case_command + + 12/15 + ----- +aclocal.m4 + - add check for wctype() to BASH_CHECK_MULTIBYTE, define HAVE_WCTYPE + +config.h.in + - add HAVE_WCTYPE #define + +config-bot.h + - add HAVE_WCTYPE to the set of checks for HANDLE_MULTIBYTE. This + should catch the deficient NetBSD multibyte support + + 12/16 + ----- +parse.y + - use CTLESC instead of literal '\001' when decode_prompt_string + prefixes RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE + + 12/20 + ----- +lib/readline/display.c + - don't treat RL_PROMPT_START_IGNORE specially inside a sequence of + ignored characters + - keep track of the start of the current sequence of ignored + characters; make sure that an empty sequence of such characters + really is an empty sequence, not one that happens to end with '\001' + (RL_PROMPT_START_IGNORE) + + 12/21 + ----- +subst.c + - change expand_word_internal to process rest of `tilde-word' as a + regular part of the word if tilde expansion leaves the tilde-word + unchanged. This means that ~$USER expands to ~chet, which seems + more intuitive, and is effectively what bash-3.0 did + + 12/23 + ----- +subst.c + - when making a local array variable in do_compound_assignment, make + sure that we don't use a variable of the same name from a previous + context + +doc/bash.1 + - documented expansions for word and patterns in case statement + +builtins/ulimit.def,doc/{bashref.texi,bash.1} + - added new -e and -r (nice and rtprio) options to ulimit; documented + them + + 12/26 + ----- +variables.c + - use `hmax' instead of `num' in sv_histsize to avoid integer overflow + problems with intmax_t + +builtins/read.def + - add unwind-protect to restore rl_attempted_completion_function in + case of a timeout + +{bashline,variables}.c + - move initialization of HISTSIZE from initialization path to + load_history, so it can be overridden by a value assigned in a + startup file + +lib/readline/misc.c + - add a missing `return r' so that rl_digit_loop returns a meaningful + value + +lib/readline/{bind,callback,display,isearch,rltty,search,text,vi_mode}.c + - minor cleanups to satisfy compiler warnings, mostly removing unused + variables + + 12/27 + ----- +support/Makefile.in + - add LIBS_FOR_BUILD support; defaults to ${LIBS} + +Makefile.in + - add LIBS_FOR_BUILD with no default value; use when linking programs + using CC_FOR_BUILD (e.g., bashversion) + + 12/28 + ----- +lib/readline/bind.c + - fix rl_translate_keyseq bad translation of \M-\C-x sequences + +execute_cmd.c + - in execute_arith_command, if the expression expands to more than one + word, make sure we join the words into a single string and pass the + entire thing to evalexp() + +expr.c + - new functions: _is_arithop(c), returns true if C is a valid single- + character arithmetic operator; _is_multiop(c), returns true if C is + a token corresponding to a valid multi-character arithmetic operator + - if we encounter a character that isn't a valid arithmetic + operator, throw an error. Try to be intelligent about what type of + error message to print + +subst.c + - new function, expand_arith_string, calls expand_string_if_necessary; + used where an arithmetic expression needs to be expanded + +subst.h + - new extern declaration for expand_arith_string + +arrayfunc.c + - in array_expand_index, call expand_arith_string to expand the + subscript in a fashion consistent with other arithmetic expressions + +subst.c + - fix parameter_brace_patsub so that we don't try to anchor the pattern + at the beginning or end of the string if we're doing global + replacement -- that combination doesn't doesn't make sense, and + the changed behavior is compatible with ksh93 + +doc/{bash.1,bashref.texi} + - changed description of pattern substitution to match the new + semantics + +tests/new-exp.tests + - change tests to remove all ${pat//#rep} and ${pat//%rep} + expansions, since they don't mean the same thing anymore + + 12/29 + ----- +support/signames.c + - new file, initialize_signames() function from old mksignames.c. This + file builds the signal_names array + +support/mksignames.c + - strip out initialize_signames(), move to signames.c. This file only + writes signames.h + - set up to only write a stub signames.h if CROSS_COMPILING is defined, + with extern declaration for initialize_signames + - if not cross compiling, #define initialize_signames to nothing + +Makefile.in + - mksignames is now linked from mksignames.o and buildsignames.o + - add rules to build signames.o, assuming we're building it as part + of the shell (cross-compiling) + +trap.c + - call initialize_signames from initialize_traps + +configure.in + - set SIGNAMES_O to nothing (normal) or signames.o (cross-compiling), + substitute into Makefile + - don't set SIGNAMES_H if cross-compiling any more + + 12/30 + ----- +command.h + - new word flag: W_NOPROCSUB, inhibits process substitution on a word + +subst.c + - change expand_word_internal to suppress process substitution if the + word has the W_NOPROCSUB flag + +shell.c + - --wordexp turns on W_NOPROCSUB in addition to W_NOCOMSUB + +subst.c + - change string_list_dollar_at and string_list_dollar_star so that + MB_CUR_MAX is used to size an array only when using gcc, since gcc + can handle non-constant array sizes using a mechanism like alloca. + Other compilers, e.g. Sun's compiler, do not implement that + extension + + 12/31 + ----- +builtins/mkbuiltins.c + - when cross-compiling, don't include <config.h>, since it's for the + target rather than the host system. Instead, choose a reasonable + set of default #defines based on a minimal POSIX system + +jobs.c + - change find_process to handle a NULL return value from find_pipeline + - return immediately from delete_job if jobs[index] is already NULL or + if it has a null pipeline associated with it + - in delete_job, if find_last_proc returns NULL, don't try to call + bgp_delete + + 1/7 + --- +doc/bash.1 + - patch from Tim Waugh to replace some literal single quotes with + \(aq, the groff special character for it + +jobs.c + - in realloc_jobs_list, make sure to zero out slots after j_lastj + in the new list + + 1/9 + --- +support/mksignames.c + - make sure to include <signal.h> to get right value of NSIG from + (usually) <sys/signal.h> + + 1/10 + ---- +parse.y + - when calling parse_matched_pair on a $(...) command substitution, + don't pass the P_DQUOTE flag so that single quotes don't get + stripped from $'...' inside the command substitution. Bug report + and fix from Mike Stroyan <mike.stroyan@hp.com> + +jobs.c + - start maintaining true count of living children in js.c_living + - call reset_current in realloc_jobs_list, since old values for current + and previous job are most likely incorrect + - don't allocate a new list in realloc_jobs_list if the old size and + new size are the same; just compact the existing list + - make sure realloc_jobs_list updates value of js.j_njobs + - add some more itrace messages about non-null jobs after j_lastj in + jobs array + + 1/11 + ---- +bashjmp.h + - new value for second argument to longjmp: SIGEXIT. Reserved for + future use + + 1/12 + ---- +jobs.c + - add logic to make_child to figure out when pids wrap around + - turn second argument to delete_job into flags word, added flag to + prevent adding proc to bgpids list + + 1/13 + ---- +lib/readline/vi_mode.c + - move code that moves forward a character out of rl_vi_append_mode + into a separate function, _rl_vi_append_forward + - change _rl_vi_append_mode to save `a' as the last command, so it + can be redone properly + - new function _rl_vi_backup, moves point back a character taking + multibyte locales into account + - change rl_vi_redo to handle redoing an `a' command specially -- + it should be redone like `i' but after moving forward a character + - change rl_vi_redo to use _rl_vi_backup to move point backward + after redoing `i' or `a' + +jobs.c + - new function, delete_old_job (pid), checks whether or not PID is in + a job in the jobs list. If so, and the job is dead, it just removes + the job from the list. If so, and the job is not dead, it zeros + the pid in the appropriate PROCESS so pid aliasing doesn't occur + - make_child calls delete_old_job to potentially remove an already-used + instance of the pid just forked from the jobs list if pids have + wrapped around. Finally fixes the bug reported by Tim Waugh + <twaugh@redhat.com> + +trap.c + - new define, GETORIGSIG(sig), gets the original handling for SIG and + sets SIG_HARD_IGNORE if that handler is SIG_IGN + - call GETORIGSIG from initialize_traps, get_original_signal, and + set_signal + +jobs.c + - in wait_for, if the original SIGINT handler is SIG_IGN, don't set + the handler to wait_sigint_handler. This keeps scripts started in + the background (and ignoring SIGINT) from dying due to SIGINT while + they're waiting for a child to exit. Bug reported by Ingemar + Nilsson <init@kth.se> + +lib/readline/vi_mode.c + - don't save text to buffer unless undo pointer points to a record of + type UNDO_INSERT; zero it out instead. This fixes bug reported by + Craig Turner <craig@synect.com> with redoing `ctd[ESC]' (empty + insert after change to) + +shell.c + - change set_shell_name so invocations like "-/bin/bash" are marked as + login shells + +doc/bash.1 + - add note about destroying functions with `unset -f' to the section + on shell functions + +lib/readline/terminal.c + - if readline hasn't been initialized (_rl_term_autowrap == -1, the + value it's now initialized with), call _rl_init_terminal_io from + _rl_set_screen_size before deciding whether or not to decrement + _rl_screenwidth. Fixes bug from Mike Frysinger <vapier@gentoo.org> + + 1/14 + ---- +lib/readline/input.c + - allow rl_set_keyboard_input_timeout to set the timeout to 0, for + applications that want to use select() like a poll without any + waiting + +lib/readline/doc/rltech.texi + - documented valid values for timeout in rl_set_keyboard_input_timeout + +jobs.c + - in stop_pipeline, don't have the parent shell call give_terminal_to + if subshell_environment contains SUBSHELL_ASYNC (no background + process should ever give the terminal to anything other than + shell_pgrp) + - in make_child, don't give the terminal away if subshell_environment + contains SUBSHELL_ASYNC + + 1/15 + ---- +subst.c + - in parameter_brace_expand, if extracting ${#varname}, only allow + `}' to end the expansion, since none of the other expansions are + valid. Fixes Debian bug reported by Jan Nordhorlz <jckn@gmx.net> + + 1/17 + ---- +parse.y + - in parse_matched_pair, protect all character tests with the MBTEST + macro + - in parse_dparen, take out extra make_word after call to alloc_word_desc + (mem leak) + + 1/18 + ---- +parse.y + - in parse_matched_pair, add P_ALLOWESC to flags passed to recursive + parse_matched_pair call when encountering a single or double quote + inside a ``-style command substitution + +execute_cmd.c + - add call to QUIT at beginning of execute_command_internal; better + responsiveness to SIGINT + + 1/21 + ---- +lib/readline/bind.c + - change rl_invoking_keyseqs_in_map to honor the setting of + convert-meta when listing key bindings, since if convert-meta is off, + using '\M-' as the prefix for bindings in, for instance, + emacs-escape-keymap, is wrong. This affects `bind -p' output + - change rl_untranslate_keyseq to add '\e' instead of '\C-[' for + ESC + +execute_cmd.c + - add call to QUIT at end of execute_command + + 1/23 + ---- +lib/readline/display.c + - changed two places in update_line where a check of whether the cursor + is before the last invisible character in the prompt string to + differentiate between the multibyte character case (where + _rl_last_c_pos is a physical cursor position) and the single-byte + case (where it is a buffer index). This prevents many unnecessary + \r-redraw the line sequences. Reported by Dan Jacobson. + + 1/24 + ---- +quit.h + - wrap QUIT macro in do...while(0) like other compound statement + macros + - CHECK_TERMSIG define (placeholder for now); future use will be to + handle any received signals that should cause the shell to + terminate (e.g., SIGHUP) + +{input,jobs,nojobs}.c + - add calls to CHECK_TERMSIG where appropriate (reading input and + waiting for children) + - include quit.h if necessary + + 1/25 + ---- +parse.y + - undo change that makes `)' in a compound assignment delimit a token. + It messes up arithmetic expressions in assignments to `let', among + other things + +sig.h,{jobs,nojobs,sig,trap}.c,builtins/trap.def + - rename termination_unwind_protect to termsig_sighandler + +sig.c + - split termsig_sighandler into two functions: termsig_sighandler, which + runs as a signal handler and sets a flag noting that a terminating + signal was received, and termsig_handler, which runs when it is `safe' + to handle the signal and exit + - new terminate_immediately variable, similar to interrupt_immediately + - termsig_sighandler calls termsig_handler immediately if + terminate_immediately is non-zero + +quit.h + - change CHECK_TERMSIG macro to check terminating_signal and call + termsig_handler if it's non-zero + - add same check of terminating_signal and call to termsig_handler to + QUIT macro + +{jobs,nojobs}.c + - change call to termsig_sighandler to call termsig_handler directly, + as was intended + +parse.y,builtins/read.def + - set terminate_immediately to non-zero value when reading interactive + input, as is done with interrupt_immediately + + 1/26 + ---- +doc/{bash.1,bashref.texi} + - reworded the POSIX standard references to remove mention of POSIX.2 + or 1003.2 -- it's all the 1003.1 standard now. Recommended by + Arnold Robbins + + 1/27 + ---- +lib/readline/complete.c + - move call to filename dequoting function into + rl_filename_completion_function; call only if directory completion + hook isn't set. This means that directory-completion-hook now needs + to dequote the directory name. We don't want to dequote the directory + name before calling the directory-completion-hook. Bug reported by + Andrew Parker <andrewparker@bigfoot.com> + +bashline.c + - add necessary directory name dequoting to bash_directory_completion_hook + and bash_directory_expansion + +lib/readline/doc/rltech.texi + - add note to description of rl_directory_completion_hook that it + needs to dequote the directory name even if no other expansions are + performed + + 1/28 + ---- +braces.c + - make sure that we skip over braces that don't start a valid matched + brace expansion construct in brace_expand -- there might be a valid + brace expansion after the unmatched `{' later in the string + - brace_gobbler now checks that when looking for a `}' to end a brace + expansion word, there is an unquoted `,' or `..' that's not inside + another pair of braces. Fixes the a{b{c,d}e}f problem reported by + Tim Waugh + +builtins/declare.def + - when not in posix mode, and operating on shell functions, typeset + and declare do not require their variable operands to be valid + shell identifiers. The other `attribute' builtins work this way. + Fixes inconsistency reported by Mike Frysinger + +{configure,config.h}.in + - add test for setregid, define HAVE_SETREGID and HAVE_DECL_SETREGID + as appropriate + - add test for eaccess, define HAVE_EACCESS if found + +lib/sh/eaccess.c + - new file, with sh_stat and sh_eaccess functions, moved from test.c + - renamed old sh_eaccess as sh_stataccess, since it uses the stat(2) + information to determine file accessibility + - new function, sh_euidaccess, to call when uid != euid or gid != egid; + temporarily swaps uid/euid and gid/egid around call to access + - rewrote sh_eaccess to call eaccess, access, sh_euidaccess or + sh_stataccess as appropriate. access(2) will take into account + things like ACLs, read-only file systems, file flags, and so on. + +lib/sh/Makefile.in,Makefile.in + - add necessary entries for eaccess.[co] + +test.c + - change calls to test_stat to call sh_stat + +{test,general}.c + - change calls to test_eaccess to call sh_eaccess + +externs.h + - new extern declaration for sh_eaccess + +test.[ch] + - remove test_stat and test_eaccess + + 1/29 + ---- +braces.c + - make change from 1/28 dependant on CSH_BRACE_COMPAT not being + defined (since old bash behavior is what csh does, defining + CSH_BRACE_COMPAT will produce old bash behavior) + + 1/30 + ---- +bashline.c + - last argument of bash_default_completion is now a flags word: + DEFCOMP_CMDPOS (in command position) is only current value + - attempt_shell_completion now computes flags before calling + bash_default_completion + - if no_empty_command_completion is set, bash does not attempt command + word completion even if not at the beginning of the line, as long + as the word to be completed is empty and start == end (catches + beginning of line and all whitespace preceding point) + + 2/4 + --- +lib/readline/display.c + - change _rl_make_prompt_for_search to use rl_prompt and append the + search character to it, so the call to expand_prompt in rl_message + will process the non-printing characters correctly. Bug reported + by Mike Stroyan <mike.stroyan@hp.com> + + 2/5 + --- +lib/readline/display.c + - fix off-by-one error when comparing against PROMPT_ENDING_INDEX, + which caused a prompt with invisible characters to be redrawn one + extra time in a multibyte locale. Change from <= to < fixes + multibyte locale, but I added 1 to single-byte definition of + PROMPT_ENDING_INDEX (worth checking) to compensate. Bug reported + by Egmont Koblinger <egmont@uhulinux.hu> + + 2/8 + --- +lib/readline/terminal.c + - call _emx_get_screensize with wr, wc like ioctl code for consistency + - new function, _win_get_screensize, gets screen dimensions using + standard Windows API for mingw32 (code from Denis Pilat) + - call _win_get_screensize from _rl_get_screen_size on mingw32 + +lib/readline/rlconf.h + - define SYS_INPUTRC (/etc/inputrc) as system-wide default inputrc + filename + +support/shobj-conf + - changes to make loadable builtins work on MacOS X 10.[34] + +builtins/pushd.def + - changes to make it work as a loadable builtin compiled with gcc4 + + 2/9 + --- +lib/readline/bind.c + - add SYS_INPUTRC as last-ditch default (if DEFAULT_INPUTRC does not + exist or can't be read) in rl_read_init_file + +lib/readline/doc/rluser.texi + - add description of /etc/inputrc as ultimate default startup file + + 2/10 + ---- +lib/readline/bind.c + - fix problem with rl_function_of_keyseq that returns a non-keymap + bound to a portion of the passed key sequence without processing + the entire thing. We can bind maps with existing non-map + functions using the ANYOTHERKEY binding code. + +variables.c + - shells running in posix mode do not set $HOME, as POSIX apparently + requires + + 2/15 + ---- +braces.c + - mkseq() now takes the increment as an argument; changed callers + + 2/16 + ---- +builtins/hash.def + - print `hash table empty' message to stdout instead of stderr + + 2/17 + ---- +lib/readline/readline.c + - when resetting rl_prompt in rl_set_prompt, make sure rl_display_prompt + is set when the function returns + + 2/18 + ---- +lib/readline/display.c + - further fixes to _rl_make_prompt_for_search from Eric Blake to deal + with multiple calls to expand_prompt + + 2/21 + ---- +builtins/hash.def + - don't print `hash table empty' message in posix mode + + 2/27 + ---- +lib/glob/sm_loop.c + - change extmatch() to turn off FNM_PERIOD in flags passed to recursive + calls to gmatch() when calling it with a substring after the start + of the string it receives. Changed `+', `*', `?, `@', and `!' cases + to do the right thing. Fixes bug reported by Benoit Vila + <bvila@free.fr> + +braces.c + - add QUIT; statements to mkseq to make large sequence generation + interruptible + + 2/28 + ---- +lib/glob/glob.c + - initialize nalloca in glob_vector + + 3/1 + --- +lib/glob/glob.c + - in glob_vector, when freeing up the linked list after some error, + make sure to set `tmplink' to 0 if `firstlink' is set to 0, else we + get multiple-free errors + + 3/5 + --- +trap.c + - inheritance of the DEBUG, RETURN, and ERR traps is now dependent + only on the `functrace' and `errtrace' shell options, as the + documentation says, rather than on whether or not the shell is in + debugging mode. Reported by Philip Susi <psusi@cfl.rr.com> + +parse.y + - in parse_matched_pair, don't recursively parse ${...} or other + ${...} constructs inside `` + - in parse_matched_pair, remove special code that recursively parses + quoted strings inside `` constructs. For Bourne shell compatibility + + 3/6 + --- +builtins/pushd.def + - let get_directory_stack take take an `int flags' argument and convert + $HOME to ~ if flags&1 is non-zero + +builtins/common.h + - change extern declaration for get_directory_stack + +variables.c + - call get_directory_stack with an arg of 0 to inhibit converting + $HOME to ~ in the result. Fixes cd ${DIRSTACK[1]} problem + reported by Len Lattanzi <llattanzi@apple.com> (cd fails because + the tildes won't be expanded after variable expansion) + +jobs.c + - changed hangup_all_jobs slightly so stopped jobs marked J_NOHUP + won't get a SIGCONT + +general.c + - changed check_binary_file() to check for a NUL byte instead of a + non-printable character. Might at some point want to check + entire (possibly multibyte) characters instead of just bytes. Hint + from ksh via David Korn + + 3/7 + --- +builtins/reserved.def + - changed runs of spaces to tabs in variables help text to make + indentation better when displayed + +builtins/mkbuiltins.c + - changes to avoid the annoying extra space that keeps gettext from + being passed an empty string + + 3/9 + --- +lib/glob/glob.c + - make sure globbing is interrupted if the shell receives a terminating + signal + + 3/14 + ---- +lib/readline/search.c + - call rl_message with format argument of "%" in _rl_nsearch_init + to avoid `%' characters in the prompt string from being interpreted + as format specifiers to vsnprintf/vsprintf + + 3/19 + ---- +parse.y, eval.c, input.h + - change execute_prompt_command to execute_variable_command; takes the + variable name as a new second argument + + 3/25 + ---- +bashline.c + - command_word_completion_function keeps track of when it's searching + $PATH and doesn't return directory names as matches in that case. + Problem reported by Pascal Terjan <pterjan@mandriva.com> + - command_word_completion_function returns what it's passed as a + possible match if it's the name of a directory in the current + directory (only non-absolute pathnames are so tested). + + 3/27 + ---- +subst.c + - expand_arith_string takes a new argument: quoted. Either 0 (outside + subst.c) or Q_DOUBLE_QUOTES (substitution functions); changed callers + +subst.h + - changed extern declaration for expand_arith_string + +arrayfunc.c + - changed call to expand_arith_string in array_expand_index + + 3/31 + ---- +lib/readline/histfile.c + - change read_history_range to allow windows-like \r\n line endings + +execute_cmd.c + - add new variable, line_number_for_err_trap, currently set but not + used + + 4/2 + --- +lib/sh/strtrans.c + - add code to echo -e and echo with xpg_echo enabled to require + a leading 0 to specify octal constants + + 4/3 + --- +subst.c + - slight change to wcsdup() replacement: use memcpy instead of wcscpy + +parse.y + - before turning on W_COMPASSIGN, make sure the final character in the + token is a `(' (avoids problems with things like a=(4*3)/2) + + 4/4 + --- +lib/sh/snprintf.c + - in number() and lnumber(), turn off PF_ZEROPAD if explicit precision + supplied in format + - change number() and lnumber() to correctly implement zero-padding + specified by a non-zero `.precision' part of the format + +subst.c + - new flag for extract_delimited_string: EX_COMMAND. For $(...), so + we can do things like skip over delimiters in comments. Added to + appropriate callers + - changes to extract_delimited_string to skip over shell comments when + extracting a command for $(...) (EX_COMMAND is contained in the + flags argument) + + 4/5 + --- +subst.c + - first argument to skip_single_quoted is now a const char * + - new function, chk_arithsub, checks for valid arithmetic expressions + by balancing parentheses. Fix based on a patch from Len Lattanzi + + 4/6 + --- +{configure,config.h}.in + - add separate test for isnan in libc, instead of piggybacking on + isinf-in-libc test + +lib/sh/snprintf.c + - separate the isnan replacement function so it's guarded by its own + HAVE_ISNAN_IN_LIBC define + +lib/sh/wcsdup.c + - new file, contains replacement wcsdup library function from subst.c + with change back to using wcscpy + +Makefile.in,lib/sh/Makefile.in + - make sure wcsdup.c is compiled and linked in + +subst.c + - wcsdup now found in libsh; removed static definition + + 4/10 + ---- +lib/readline/callback.c + - loop over body of rl_callback_read_char as long as there is additional + input rather than just calling readline_internal_char, which does + not handle multi-character key sequences or escape-prefixed chars + +lib/readline/macro.c + - make sure we turn off RL_STATE_MACROINPUT when the macro stack is + empty if we are reading additional input with RL_STATE_MOREINPUT + +support/shobj-conf + - Mac OS X no longer likes the `-bundle' option to gcc when creating a + dynamic shared library + + 4/11 + ---- +lib/tilde/tilde.c + - don't try to dereference user_entry if HAVE_GETPWENT isn't defined + +lib/readline/input.c + - make sure chars_avail is not used without being assigned a value in + rl_gather_tyi + - use _kbhit() to check for available input on Windows consoles, in + rl_gather_tyi and _rl_input_available + + 4/21 + ---- +lib/readline/display.c + - calculate (in expand_prompt) and keep track of length of local_prompt + in local_prompt_len; use where appropriate + - when using o_pos to check whether or not we need to adjust + _rl_last_c_pos after calling update_line, assume that it's correct + (a buffer index in non-multibyte locales and a cursor position in + multibyte locales) and adjust with wrap_offset as appropriate + - in update_line, set cpos_adjusted to 1 after calling + _rl_move_cursor_relative to move to the end of the displayed prompt + string + - in _rl_move_cursor_relative, check that the multibyte display + position is after the last invisible character in the prompt string + before offsetting it by the number of invisible characters in the + prompt (woff) + + 4/26 + ---- +lib/readline/doc/{rluser.texi,readline.3} + - make sure to note that key bindings don't allow any whitespace + between the key name or sequence to be bound and the colon + + 4/28 + ---- +lib/readline/display.c + - in update_line, make sure we compare _rl_last_c_pos as strictly less + than PROMPT_ENDING_INDEX, since it's 0-based, to avoid multiple + prompt redraws + + 5/4 + --- +parse.y + - in decode_prompt_string, only prefix the expansion of \[ or \] + with CTLESC if the corresponding readline escape character is + CTLESC (coincidentally the same as \[) or CTLNUL. Bug report sent + by Mike Frysinger <vapier@gentoo.org> prompted the discovery + +aclocal.m4 + - slight change to test for /dev/fd to compensate for a linux + failing; suggested by Mike Frysinger <vapier@gentoo.org> + + 5/9 + --- +arrayfunc.c + - broke assign_array_var_from_string into two functions: + expand_compound_array_assignment and assign_compound_array_list; + assign_array_var_from_string just calls those functions now + +arrayfunc.h + - new extern declarations for expand_compound_array_assignment and + assign_compound_array_list + +subst.c + - in do_compound_assignment, call expand_compound_array_assignment + before creating the local variable so a previous inherited + value can be used when expanding the rhs of the compound assignment + statement + + 5/11 + ---- +doc/{bash.1,bashref.texi} + - clarifed `trap' description to make it clear that trapped signals + that are not set to SIG_IGN are reset when a subshell is created + + 5/18 + ---- +locale.c + - change reset_locale_vars to call setlocale (LC_ALL, "") if LANG + is unset or NULL + - if LANG is unset or NULL, reset the export environment before + calling setlocale in reset_locale_vars, and trust that it will + change the environment setlocale() inspects + + 5/21 + ---- +lib/readline/history.c + - new function, HIST_ENTRY *alloc_history_entry (char *string, char *ts); + creates a new history entry with text STRING and timestamp TS (both + of which may be NULL) + - new function, HIST_ENTRY *copy_history_entry (HIST_ENTRY *hist), + which copies the line and timestamp entries to new memory but just + copies the data member, since that's an opaque pointer + - new function, void replace_history_data (int which, histdata_t *old, histdata_t *new) + which replaces the `data' member of specified history entries with + NEW, as long as it is OLD. WHICH says which history entries to + modify + - add calls to replace_history_data in rl_free_undo_list and + rl_do_undo + +lib/readline/undo.c + - new function, alloc_undo_entry (enum undo_code what, int start, int end, char *text) + takes care of allocating and populating a struct for an individual + undo list entry + - new function: _rl_copy_undo_entry(UNDO_LIST *entry) + - new function: _rl_copy_undo_list(UNDO_LIST *head) + +lib/readline/rlprivate.h + - new extern declarations for _rl_copy_undo_{entry,list} + +execute_cmd.c + - change execute_cond_node so that quoting the rhs of the =~ + operator forces string matching, like the == and != operators + + 5/23 + ---- +redir.c + - add_undo_redirect now takes as an additional argument the type of + redirection we're trying to undo + - don't add a "preservation" redirection for fds > SHELL_FD_BASE if + the redirection is closing the fd + + 5/24 + ---- +subst.c + - make sure that parameter_brace_substring leaves this_command_name + set to either NULL or its previous value after setting it so that + arithmetic evaluation errors while expanding substring values + contain meaningful information + + 6/9 + --- +execute_cmd.c + - make sure that SUBSHELL_ASYNC and SUBSHELL_PIPE are set as flag bits + in subshell_environment, rather than setting only a single value + - change execute_subshell_builtin_or_function to give the `return' + builtin a place to longjmp to when executed in a subshell or pipeline + (mostly as the last command in a pipeline). Bug reported by + Oleg Verych <olecom@gmail.com> + - in execute_simple_command, make sure to call execute_disk_command + with the_printed_command_except_trap to keep DEBUG trap command + strings from overwriting the command strings associated with jobs + and printed in job control messages. Bug reported by Daniel Kahn + Gillmor <dkg-debian.org@fifthhorseman.net> + +[bash-3.2-alpha frozen] + + 6/22 + ---- +syntax.h + - add new CBLANK (for [:blank:] class) flag value for syntax table and + shellblank(c) character test macro + +mksyntax.c + - add support for setting CBLANK flag in the syntax table depending on + whether or not isblank(x) returns true for character x + +locale.c + - change locale_setblanks to set or unset CBLANK flag for each + character when locale changes + +parse.y + - change call to whitespace(c) in lexical analyzer (read_token()) to + call shellblank(c) instead, so locale-specific blank characters are + treated as white space. Fixes bug reported by Serge van deb Boom + <svdb+bug-bash@stack.nl> + +print_cmd.c + - when printing redirections, add a space between <, >, and <> and the + following word, to avoid conflicts with process substitution. Bug + reported by Ittay Dror <ittyad@qlusters.com> + + 6/26 + ---- +configure.in + - set CROSS_COMPILE to the empty string by default, so we don't inherit + a random value from the environment. Bug reported by + Lee Revell <rlrevell@joe-job.com> + + 6/29 + ---- +lib/glob/xmbsrtowcs.c + - make sure destp is non-null before assigning a 0 to *destp in + xdupmbstowcs. Fix from Louiwa Salem <loulwas@us.ibm.com> + +execute_cmd.c + - fix execute_in_subshell to make sure asynchronous isn't set to 0 + before subshell_environment is set appropriately and + setup_async_signals is run. Based on report by Louiwa Salem + <loulwas@us.ibm.com> + +lib/readline/bind.c + - in rl_generic_bind(), make sure that the keys array is freed before + an error return. Fix from Louiwa Salem <loulwas@us.ibm.com> + + 7/1 + --- +builtins/read.def + - make sure all editing code is protected with #ifdef READLINE, esp. + unwind-protect that restores the default completion function + +lib/readline/display.c + - make sure to set local_prompt_len in rl_message() [in bash-3.2-alpha] + + 7/5 + --- +builtins/printf.def + - add more of echo's write error handling to printf. Suggested by + martin.wilck@fujitsu-siemens.com + + 7/7 + --- +lib/readline/display.c + - save and restore local_prompt_len in rl_{save,restore}_prompt + [in bash-3.2-alpha] + + 7/8 + --- +[bash-3.2-alpha released] + + 7/9 + --- +lib/readline/display.c + - make sure that _rl_move_cursor_relative sets cpos_adjusted when it + offsets `dpos' by wrap_offset in a multi-byte locale. Bug reported + by Andreas Schwab and Egmont Koblinger + +subst.c + - make sure that the call to mbstowcs in string_extract_verbatim is + passed a string with enough space for the closing NUL. Reported + by Andreas Schwab + + 7/18 + ---- +lib/readline/{display,terminal}.c + - remove #ifdefs for HACK_TERMCAP_MOTION so we can use + _rl_term_forward_char in the redisplay code unconditionally + +lib/readline/rlprivate.h + - new extern declaration for _rl_term_forward_char + +lib/readline/display.c + - in _rl_move_cursor_relative, use `dpos' instead of `new' when + deciding whether or not a CR is faster than moving the cursor from + its current position + - in _rl_move_cursor_relative, we can use _rl_term_forward_char to + move the cursor forward in a multibyte locale, if it's available. + Since that function doesn't have a handle on where the cursor is in + the display buffer, it has to output a cr and print all the data. + Fixes rest of problem reported by Egmont Koblinger + - change variable denoting the position of the cursor in the line buffer + from c_pos (variable local to rl_redisplay) to cpos_buffer_position + (variable local to file) for future use by other functions + + 7/25 + ---- +lib/malloc/{stats,table}.h + - include <string.h> for prototypes for memset, strlen + +lib/termcap/{termcap,tparam}.c + - include <string.h> and provide macro replacement for bcopy if + necessary + + 7/27 + ---- +lib/readline/histexpand.c + - add support for `<<<' here-string redirection operator to + history_tokenize_word. Bug reported by agriffis@gentoo.org + +externs.h + - don't add prototype for strerror() if HAVE_STRERROR defined + + 7/29 + ---- +subst.c + - in list_string, use `string' instead of `s' -- s is not initialized + + 8/9 + --- +subst.c + - fix parameter_brace_expand to set W_HASQUOTEDNULL in the WORD_DESC it + returns if the result of parameter_brace_substring is a quoted null + ("\177"). Fixes bug reported by Igor Peshansky <pechtcha@cs.nyu.edu> + + 8/16 + ---- +lib/readline/readline.h + - new #define, READERR, intended to be used to denote read/input errors + +lib/readline/input.c + - in rl_getc, if read() returns an error other than EINTR (after the + EWOULDBLOCK/EAGAIN cases are handled), return READERR rather than + converting return value to EOF if readline is reading a top-level + command (RL_STATE_READCMD) + +lib/readline/readline.c + - if rl_read_key returns READERR to readline_internal_char[loop], + abort as if it had read EOF on an empty line, without any conversion + to newline, which would cause a partial line to be executed. This + fixes the bug reported by Mathieu Bonnet <mathieu.bonnet@nalkym.org> + +aclocal.m4 + - when testing for validity of /dev/fd/3, use /dev/null instead of + standard input, since the standard input fails with linux and `su'. + Bug reported by Greg Shafer <gschafer@zip.com.au> + + 8/17 + ---- +Makefile.in + - switch the TAGS and tags targets so TAGS is the output of `etags' and + tags is the output of `ctags'. Suggested by Masatake YAMATO + + 8/25 + ---- +execute_cmd.c + - change code to match documentation: set BASH_COMMAND (which takes its + value from the_printed_command_except_trap) only when not running a + trap. Rocky says the debugger is ok with this, and this is what his + original diffs did + + 8/29 + ---- +variables.c + - change set_if_not to create shell_variables if it is NULL, since + -o invocation options can cause variables to be set before the + environment is scanned + +[bash-3.2-beta frozen] + + 9/5 + --- +[bash-3.2-beta released] + + 9/8 + --- +variables.c + - change dispose_used_env_vars to call maybe_make_export_env + immediately if we're disposing a temporary environment, since + `environ' points to the export environment and getenv() will use + that on systems that don't allow getenv() to be replaced. This + could cause the temporary environment to affect the shell. Bug + reported by Vasco Pedro <vp@di.uevora.pt> + +builtins/echo.def,doc/{bash.1,bashref.texi} + - clarify that `echo -e' and echo when the `xpg_echo' shell option is + enabled require the \0 to precede any octal constant to be expanded. + Reported by Vasco Pedro <vp@di.uevora.pt> + + 9/12 + ---- +builtins/printf.def + - make sure `%q' format specifier outputs '' for empty string arguments + Bug reported by Egmont Koblinger <egmont@uhulinux.hu> + +make_cmd.c + - change make_here_document to echo lines in here-doc if set -v has + been executed. Reported by Eduardo Ochs <eduardoochs@gmail.com> + +aclocal.m4 + - change BASH_CHECK_MULTIBYTE: + o replace check for wctomb with check for wcrtomb + o add checks for wcscoll, iswctype, iswupper, iswlower, + towupper, towlower + o add call to AC_FUNC_MBRTOWC to check for mbrtowc and mbstate_t + define HAVE_MBSTATE_T manually + o add checks for wchar_t, wctype_t, wint_t + +config.h.in + - add defines for wcscoll, iswctype, iswupper, iswlower, towupper, + towlower functions + - replace define for wctomb with one for wcrtomb + - add defines for wchar_t, wint_t, wctype_t types + +config-bot.h, lib/readline/rlmbutil.h + - add check for HAVE_LOCALE_H before defining HANDLE_MULTIBYTE + - add checks for: ISWCTYPE, ISWLOWER, ISWUPPER, TOWLOWER, TOWUPPER + - add checks for: WCTYPE_T, WCHAR_T, WCTYPE_T + + 9/13 + ---- +lib/readline/display.c + - when displaying prompts longer than the screenwidth in rl_redisplay, + and looking for the index of the last character whose buffer index + is <= the screen width to set up the inv_lbreaks array, make sure to + catch the case where the index == the screen width (an off-by-one + error occurs otherwise with prompts one character longer than the + screen width). Bug reported by Alexey Toptygin <alexeyt@freeshell.org> + +configure.in + - change DEBUGGER_START_FILE to start with ${ac_default_prefix}/share, + like bashdb installs itself. Reported by Nick Brown + <nickbroon@blueyonder.co.uk> + + 9/14 + ---- +lib/readline/display.c + - make multibyte code that computes the buffer indices of line breaks + for a multi-line prompt dependent on MB_CUR_MAX, so we don't take + the function call hit unless we're in a locale that can have + multibyte characters + + 9/19 + ---- +subst.c + - make dequote_list extern so other parts of the shell can use it + +subst.h + - extern declaration for dequote_list + +builtins/read.def + - call dequote_list before assigning words read to array variable if + we saw an escape character. Old code left spurious CTLESCs in the + string after processing backslashes. Bug reported by Daniel Dawson + <ddawson@icehouse.net> + + 9/21 + ---- +[bash-3.2 frozen] diff --git a/CWRU/misc/open-files.c b/CWRU/misc/open-files.c index aa4ab074..ca3d26ed 100644 --- a/CWRU/misc/open-files.c +++ b/CWRU/misc/open-files.c @@ -21,6 +21,10 @@ #include <sys/types.h> #include <fcntl.h> #include <sys/file.h> + +#include <unistd.h> +#include <stdlib.h> + #include <stdio.h> main() @@ -203,9 +203,7 @@ builtins/bashgetopt.c f builtins/common.h f builtins/bashgetopt.h f cross-build/cygwin32.cache f -cross-build/win32sig.h f cross-build/x86-beos.cache f -cross-build/beos-sig.h f cross-build/opennt.cache f include/ansi_stdlib.h f include/chartypes.h f @@ -379,6 +377,7 @@ lib/readline/examples/Inputrc f lib/sh/Makefile.in f lib/sh/clktck.c f lib/sh/clock.c f +lib/sh/eaccess.c f lib/sh/fmtullong.c f lib/sh/fmtulong.c f lib/sh/fmtumax.c f @@ -423,6 +422,7 @@ lib/sh/times.c f lib/sh/timeval.c f lib/sh/tmpfile.c f lib/sh/vprint.c f +lib/sh/wcsdup.c f lib/sh/winsize.c f lib/sh/xstrchr.c f lib/sh/zcatfd.c f @@ -468,6 +468,8 @@ po/en@quot.po f po/en@boldquot.po f po/en@quot.gmo f po/en@boldquot.gmo f +po/ru.po f +po/ru.gmo f po/insert-header.sin f po/quot.sed f po/remove-potcdate.sin f @@ -514,6 +516,7 @@ support/mkdirs f 755 support/mkinstalldirs f 755 support/mkversion.sh f 755 support/mksignames.c f +support/signames.c f support/bashbug.sh f support/man2html.c f support/recho.c f @@ -526,6 +529,8 @@ support/texi2html f 755 support/xenix-link.sh f 755 support/shobj-conf f 755 support/rlvers.sh f 755 +examples/INDEX.txt f +examples/INDEX.html f examples/bashdb/PERMISSION f examples/bashdb/README f examples/bashdb/bashdb f @@ -675,6 +680,7 @@ examples/misc/aliasconv.sh f examples/misc/aliasconv.bash f examples/misc/cshtobash f tests/README f +tests/COPYRIGHT f tests/alias.tests f tests/alias.right f tests/appendop.tests f @@ -690,6 +696,7 @@ tests/array.right f tests/array1.sub f tests/array2.sub f tests/array3.sub f +tests/array4.sub f tests/array-at-star f tests/array2.right f tests/braces.tests f @@ -737,6 +744,7 @@ tests/exp-tests f tests/exp.right f tests/extglob.tests f tests/extglob.right f +tests/extglob1.sub f tests/extglob2.tests f tests/extglob2.right f tests/extglob3.tests f @@ -794,6 +802,7 @@ tests/new-exp2.sub f tests/new-exp3.sub f tests/new-exp4.sub f tests/new-exp5.sub f +tests/new-exp6.sub f tests/new-exp.right f tests/nquote.tests f tests/nquote.right f diff --git a/MANIFEST.doc b/MANIFEST.doc deleted file mode 100644 index 736ad5b5..00000000 --- a/MANIFEST.doc +++ /dev/null @@ -1,24 +0,0 @@ -# -# Master Manifest file for documentation-only distribution -# -doc d -MANIFEST.doc f -doc/article.ps f -doc/rose94.ps f -doc/bash.ps f -doc/bashbug.ps f -doc/builtins.ps f -doc/rbash.ps f -doc/bashref.ps f -doc/bashref.dvi f -doc/bash.0 f -doc/bashbug.0 f -doc/builtins.0 f -doc/rbash.0 f -doc/article.txt f -doc/bash.html f -doc/bashref.html f -doc/article.pdf f -doc/bash.pdf f -doc/bashref.pdf f -doc/rose94.pdf f diff --git a/Makefile.in b/Makefile.in index 57277b6d..b5339b72 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Makefile for bash-3.1, version 2.157 +# Makefile for bash-3.1, version 2.159 # # Copyright (C) 1996-2005 Free Software Foundation, Inc. @@ -128,6 +128,8 @@ LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"' LOCAL_LIBS = @LOCAL_LIBS@ LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@ +LIBS_FOR_BUILD = + STATIC_LD = @STATIC_LD@ LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ @@ -145,8 +147,11 @@ LDFLAGS_FOR_BUILD = $(LDFLAGS) INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) -GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ - -Wcast-align -Wstrict-prototypes -Wconversion \ +# Maybe add: -Wextra +GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \ + -Wcast-align -Wstrict-prototypes -Wconversion -Wformat \ + -Wformat-nonliteral -Wmissing-braces -Wuninitialized \ + -Wmissing-declarations -Winline \ -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS) @@ -198,7 +203,8 @@ SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \ ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \ ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/xstrchr.c \ ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \ - ${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c + ${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \ + ${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c SHLIB_LIB = -lsh SHLIB_LIBNAME = libsh.a @@ -418,6 +424,7 @@ SIGNAMES_H = @SIGNAMES_H@ # object files chosen based on running of configure JOBS_O = @JOBS_O@ SIGLIST_O = @SIGLIST_O@ +SIGNAMES_O = @SIGNAMES_O@ # Matching object files. OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \ @@ -426,7 +433,7 @@ OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \ trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o \ alias.o array.o arrayfunc.o braces.o bracecomp.o bashhist.o \ bashline.o $(SIGLIST_O) list.o stringlib.o locale.o findcmd.o redir.o \ - pcomplete.o pcomplib.o syntax.o xmalloc.o + pcomplete.o pcomplib.o syntax.o xmalloc.o $(SIGNAMES_O) # Where the source code of the shell builtins resides. BUILTIN_SRCDIR=$(srcdir)/builtins @@ -495,7 +502,7 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \ tests/printenv$(EXEEXT) mksignames$(EXEEXT) lsignames.h \ mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \ - buildversion.o + buildversion.o mksignames.o signames.o buildsignames.o CREATED_CONFIGURE = config.h config.cache config.status config.log \ stamp-h po/POTFILES CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \ @@ -547,7 +554,7 @@ version.h: $(SOURCES) config.h Makefile && mv newversion.h version.h bashversion$(EXEEXT): patchlevel.h conftypes.h version.h buildversion.o $(SUPPORT_SRC)bashversion.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o ${LIBS_FOR_BUILD} buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c @@ -609,11 +616,25 @@ ${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile ${LIBINTL_H}: ${INTL_LIBRARY} -mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)mksignames.c +signames.o: $(SUPPORT_SRC)signames.c + $(RM) $@ + $(CC) $(CCFLAGS) -c $(SUPPORT_SRC)signames.c + +buildsignames.o: $(SUPPORT_SRC)signames.c + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -o $@ -c $(SUPPORT_SRC)signames.c + +mksignames.o: $(SUPPORT_SRC)mksignames.c + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c $(SUPPORT_SRC)mksignames.c + +mksignames$(EXEEXT): mksignames.o buildsignames.o + $(RM) $@ + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD} mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h - ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c + $(RM) $@ + ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD} # make a list of signals for the local system -- this is done when we're # *not* cross-compiling @@ -686,10 +707,10 @@ info dvi ps: force force: -tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) +TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) -TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) +tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ # Targets that actually do things not part of the build @@ -782,13 +803,13 @@ maybe-clean: fi recho$(EXEEXT): $(SUPPORT_SRC)recho.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c + @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} test tests check: force $(Program) $(TESTS_SUPPORT) @-test -d tests || mkdir tests @@ -1143,6 +1164,8 @@ variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h +signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h + # XXX - dependencies checked through here # builtin c sources @@ -1,3 +1,38 @@ +This is a terse description of the new features added to bash-3.2 since +the release of bash-3.1. As always, the manual page (doc/bash.1) is +the place to look for complete descriptions. + +1. New Features in Bash + +a. Changed the parameter pattern replacement functions to not anchor the + pattern at the beginning of the string if doing global replacement - that + combination doesn't make any sense. + +b. When running in `word expansion only' mode (--wordexp option), inhibit + process substitution. + +c. Loadable builtins now work on MacOS X 10.[34]. + +d. Shells running in posix mode no longer set $HOME, as POSIX requires. + +e. The code that checks for binary files being executed as shell scripts now + checks only for NUL rather than any non-printing character. + +f. Quoting the string argument to the [[ command's =~ operator now forces + string matching, as with the other pattern-matching operators. + +2. New Features in Readline + +a. Calling applications can now set the keyboard timeout to 0, allowing + poll-like behavior. + +b. The value of SYS_INPUTRC (configurable at compilation time) is now used as + the default last-ditch startup file. + +c. The history file reading functions now allow windows-like \r\n line + terminators. + +------------------------------------------------------------------------------- This is a terse description of the new features added to bash-3.1 since the release of bash-3.0. As always, the manual page (doc/bash.1) is the place to look for complete descriptions. @@ -261,6 +261,10 @@ Platform-Specific Configuration and Operation Notes I have received word that adding -L/etc/lib (or the equivalent -Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib. + On later versions of Solaris, it may be necessary to add -lnsl before + -ldl; statically-linked versions of bash using libnsl are not guaranteed + to work correctly on future versions of Solaris. + 12. Configuring bash to build it in a cross environment. Currently only two native versions can be compiled this way, cygwin32 and x86 BeOS. For BeOS, you would configure it like this: @@ -327,3 +331,7 @@ Platform-Specific Configuration and Operation Notes 16. Configure --disable-multibyte on NetBSD versions (1.4 through at least 1.6.1) that include wctype.h but do not define wctype_t. + +17. Do NOT use bison-1.75. It builds a non-working parser. The most + obvious effect is that constructs like "for i; do echo $i; done" don't + loop over the positional parameters. @@ -3,8 +3,8 @@ Starting Bash with the `--posix' command-line option or executing `set -o posix' while Bash is running will cause Bash to conform more closely -to the POSIX 1003.2 standard by changing the behavior to match that -specified by POSIX in areas where the Bash default differs. +to the POSIX standard by changing the behavior to match that specified +by POSIX in areas where the Bash default differs. When invoked as `sh', Bash enters POSIX mode after reading the startup files. @@ -29,13 +29,13 @@ The following list is what's changed when `POSIX mode' is in effect: 5. Reserved words appearing in a context where reserved words are recognized do not undergo alias expansion. - 6. The POSIX 1003.2 `PS1' and `PS2' expansions of `!' to the history - number and `!!' to `!' are enabled, and parameter expansion is - performed on the values of `PS1' and `PS2' regardless of the - setting of the `promptvars' option. + 6. The POSIX `PS1' and `PS2' expansions of `!' to the history number + and `!!' to `!' are enabled, and parameter expansion is performed + on the values of `PS1' and `PS2' regardless of the setting of the + `promptvars' option. - 7. The POSIX 1003.2 startup files are executed (`$ENV') rather than - the normal Bash files. + 7. The POSIX startup files are executed (`$ENV') rather than the + normal Bash files. 8. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. @@ -66,12 +66,12 @@ The following list is what's changed when `POSIX mode' is in effect: may not start with a digit. Declaring a function with an invalid name causes a fatal syntax error in non-interactive shells. - 17. POSIX 1003.2 special builtins are found before shell functions - during command lookup. + 17. POSIX special builtins are found before shell functions during + command lookup. - 18. If a POSIX 1003.2 special builtin returns an error status, a + 18. If a POSIX special builtin returns an error status, a non-interactive shell exits. The fatal errors are those listed in - the POSIX.2 standard, and include things like passing incorrect + the POSIX standard, and include things like passing incorrect options, redirection errors, variable assignment errors for assignments preceding the command name, and so on. @@ -92,15 +92,15 @@ The following list is what's changed when `POSIX mode' is in effect: 22. Process substitution is not available. - 23. Assignment statements preceding POSIX 1003.2 special builtins - persist in the shell environment after the builtin completes. + 23. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. 24. Assignment statements preceding shell function calls persist in the shell environment after the function returns, as if a POSIX special builtin command had been executed. 25. The `export' and `readonly' builtin commands display their output - in the format required by POSIX 1003.2. + in the format required by POSIX. 26. The `trap' builtin displays signal names without the leading `SIG'. @@ -162,8 +162,8 @@ The following list is what's changed when `POSIX mode' is in effect: displayed, after escape characters are converted. -There is other POSIX 1003.2 behavior that Bash does not implement by -default even when in POSIX mode. Specifically: +There is other POSIX behavior that Bash does not implement by default +even when in POSIX mode. Specifically: 1. The `fc' builtin checks `$EDITOR' as a program to edit history entries if `FCEDIT' is unset, rather than defaulting directly to @@ -1,7 +1,7 @@ Introduction ============ -This is GNU Bash, version 3.1. Bash is the GNU Project's Bourne +This is GNU Bash, version 3.2. Bash is the GNU Project's Bourne Again SHell, a complete implementation of the POSIX.2 shell spec, but also with interactive command line editing, job control on architectures that support it, csh-like features such as history @@ -15,9 +15,9 @@ See the file POSIX for a discussion of how the Bash defaults differ from the POSIX.2 spec and a description of the Bash `posix mode'. There are some user-visible incompatibilities between this version -of Bash and a previous widely-distributed version, bash-1.14. -For details, see the file COMPAT. The NEWS file tersely lists -features that are new in this release. +of Bash and previous widely-distributed versions, bash-1.14 and +bash-2.05b. For details, see the file COMPAT. The NEWS file tersely +lists features that are new in this release. Bash is free software, distributed under the terms of the [GNU] General Public License, version 2. For more information, see the @@ -87,4 +87,4 @@ like this shell to be the best that we can make it. Enjoy! Chet Ramey -chet@po.cwru.edu +chet.ramey@case.edu @@ -933,7 +933,7 @@ AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS) fi ]) -AC_DEFUN(BASH_CHECK_LIB_TERMCAP, +AC_DEFUN([BASH_CHECK_LIB_TERMCAP], [ if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes @@ -1540,20 +1540,24 @@ fi AC_DEFUN(BASH_CHECK_DEV_FD, [AC_MSG_CHECKING(whether /dev/fd is available) AC_CACHE_VAL(bash_cv_dev_fd, -[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then +[bash_cv_dev_fd="" +if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then # check for systems like FreeBSD 5 that only provide /dev/fd/[012] - exec 3<&0 + exec 3</dev/null if test -r /dev/fd/3; then bash_cv_dev_fd=standard else bash_cv_dev_fd=absent fi exec 3<&- - elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then - bash_cv_dev_fd=whacky - else - bash_cv_dev_fd=absent - fi +fi +if test -z "$bash_cv_dev_fd" ; then + if test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then + bash_cv_dev_fd=whacky + else + bash_cv_dev_fd=absent + fi +fi ]) AC_MSG_RESULT($bash_cv_dev_fd) if test $bash_cv_dev_fd = "standard"; then @@ -1667,6 +1671,8 @@ fi dnl dnl check for availability of multibyte characters and functions dnl +dnl geez, I wish I didn't have to check for all of this stuff separately +dnl AC_DEFUN(BASH_CHECK_MULTIBYTE, [ AC_CHECK_HEADERS(wctype.h) @@ -1674,23 +1680,22 @@ AC_CHECK_HEADERS(wchar.h) AC_CHECK_HEADERS(langinfo.h) AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) -AC_CHECK_FUNC(mbrtowc, AC_DEFINE(HAVE_MBRTOWC)) AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN)) -AC_CHECK_FUNC(wctomb, AC_DEFINE(HAVE_WCTOMB)) -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) + +AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB)) +AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL)) AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP)) +AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) +AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE)) -AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, -[AC_TRY_COMPILE([ -#include <wchar.h>], [ - mbstate_t ps; - mbstate_t *psp; - psp = (mbstate_t *)0; -], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)]) -if test $bash_cv_have_mbstate_t = yes; then +dnl checks for both mbrtowc and mbstate_t +AC_FUNC_MBRTOWC +if test $ac_cv_func_mbrtowc = yes; then AC_DEFINE(HAVE_MBSTATE_T) fi +AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype) + AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset, [AC_TRY_LINK( [#include <langinfo.h>], @@ -1700,6 +1705,43 @@ if test $bash_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET) fi +dnl check for wchar_t in <wchar.h> +AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t, +[AC_TRY_COMPILE( +[#include <wchar.h> +], +[ + wchar_t foo; + foo = 0; +], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)]) +if test $bash_cv_type_wchar_t = yes; then + AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here]) +fi + +dnl check for wctype_t in <wctype.h> +AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t, +[AC_TRY_COMPILE( +[#include <wctype.h>], +[ + wctype_t foo; + foo = 0; +], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)]) +if test $bash_cv_type_wctype_t = yes; then + AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here]) +fi + +dnl check for wint_t in <wctype.h> +AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t, +[AC_TRY_COMPILE( +[#include <wctype.h>], +[ + wint_t foo; + foo = 0; +], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)]) +if test $bash_cv_type_wint_t = yes; then + AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here]) +fi + ]) dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB @@ -1707,7 +1749,7 @@ dnl require: dnl AC_PROG_CC dnl BASH_CHECK_LIB_TERMCAP -AC_DEFUN(RL_LIB_READLINE_VERSION, +AC_DEFUN([RL_LIB_READLINE_VERSION], [ AC_REQUIRE([BASH_CHECK_LIB_TERMCAP]) diff --git a/arrayfunc.c b/arrayfunc.c index 3bdd54f5..48a099dd 100644 --- a/arrayfunc.c +++ b/arrayfunc.c @@ -1,6 +1,6 @@ /* arrayfunc.c -- High-level array functions used by other parts of the shell. */ -/* Copyright (C) 2001-2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -265,32 +265,22 @@ assign_array_var_from_word_list (var, list, flags) return var; } -/* Perform a compound array assignment: VAR->name=( VALUE ). The - VALUE has already had the parentheses stripped. */ -SHELL_VAR * -assign_array_var_from_string (var, value, flags) - SHELL_VAR *var; +WORD_LIST * +expand_compound_array_assignment (value, flags) char *value; int flags; { - ARRAY *a; WORD_LIST *list, *nlist; - char *w, *val, *nval; - int ni, len; - arrayind_t ind, last_ind; - - if (value == 0) - return var; + char *val; + int ni; - /* If this is called from declare_builtin, value[0] == '(' and - xstrchr(value, ')') != 0. In this case, we need to extract - the value from between the parens before going on. */ + /* I don't believe this condition is ever true any more. */ if (*value == '(') /*)*/ { ni = 1; val = extract_array_assignment_list (value, &ni); if (val == 0) - return var; + return (WORD_LIST *)NULL; } else val = value; @@ -315,6 +305,21 @@ assign_array_var_from_string (var, value, flags) if (val != value) free (val); + return nlist; +} + +void +assign_compound_array_list (var, nlist, flags) + SHELL_VAR *var; + WORD_LIST *nlist; + int flags; +{ + ARRAY *a; + WORD_LIST *list; + char *w, *val, *nval; + int len, iflags; + arrayind_t ind, last_ind; + a = array_cell (var); /* Now that we are ready to assign values to the array, kill the existing @@ -325,6 +330,7 @@ assign_array_var_from_string (var, value, flags) for (list = nlist; list; list = list->next) { + iflags = flags; w = list->word->word; /* We have a word of the form [ind]=value */ @@ -332,12 +338,8 @@ assign_array_var_from_string (var, value, flags) { len = skipsubscript (w, 0); -#if 1 /* XXX - changes for `+=' */ if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '='))) -#else - if (w[len] != ']' || w[len+1] != '=') -#endif { nval = make_variable_value (var, w, flags); if (var->assign_func) @@ -368,10 +370,10 @@ assign_array_var_from_string (var, value, flags) continue; } last_ind = ind; - /* XXX - changes for `+=' */ + /* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */ if (w[len + 1] == '+' && w[len + 2] == '=') { - flags |= ASS_APPEND; + iflags |= ASS_APPEND; val = w + len + 3; } else @@ -385,11 +387,29 @@ assign_array_var_from_string (var, value, flags) if (integer_p (var)) this_command_name = (char *)NULL; /* no command name for errors */ - bind_array_var_internal (var, ind, val, flags); + bind_array_var_internal (var, ind, val, iflags); last_ind++; } +} - dispose_words (nlist); +/* Perform a compound array assignment: VAR->name=( VALUE ). The + VALUE has already had the parentheses stripped. */ +SHELL_VAR * +assign_array_var_from_string (var, value, flags) + SHELL_VAR *var; + char *value; + int flags; +{ + WORD_LIST *nlist; + + if (value == 0) + return var; + + nlist = expand_compound_array_assignment (value, flags); + assign_compound_array_list (var, nlist, flags); + + if (nlist) + dispose_words (nlist); return (var); } @@ -438,13 +458,11 @@ skipsubscript (s, i) #if defined (HANDLE_MULTIBYTE) mbstate_t state, state_bak; size_t slength, mblength; - size_t mb_cur_max; #endif #if defined (HANDLE_MULTIBYTE) memset (&state, '\0', sizeof (mbstate_t)); slength = strlen (s + i); - mb_cur_max = MB_CUR_MAX; #endif count = 1; @@ -452,7 +470,7 @@ skipsubscript (s, i) { /* Advance one (possibly multibyte) character in S starting at I. */ #if defined (HANDLE_MULTIBYTE) - if (mb_cur_max > 1) + if (MB_CUR_MAX > 1) { state_bak = state; mblength = mbrlen (s + i, slength, &state); @@ -592,11 +610,7 @@ array_expand_index (s, len) exp = (char *)xmalloc (len); strncpy (exp, s, len - 1); exp[len - 1] = '\0'; -#if 0 - t = expand_string_to_string (exp, 0); -#else - t = expand_string_to_string (exp, Q_DOUBLE_QUOTES); -#endif + t = expand_arith_string (exp, 0); this_command_name = (char *)NULL; val = evalexp (t, &expok); free (t); diff --git a/arrayfunc.h b/arrayfunc.h index 3c4f9a07..5c3f9447 100644 --- a/arrayfunc.h +++ b/arrayfunc.h @@ -34,6 +34,9 @@ extern SHELL_VAR *find_or_make_array_variable __P((char *, int)); extern SHELL_VAR *assign_array_from_string __P((char *, char *, int)); extern SHELL_VAR *assign_array_var_from_word_list __P((SHELL_VAR *, WORD_LIST *, int)); + +extern WORD_LIST *expand_compound_array_assignment __P((char *, int)); +extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int)); extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int)); extern int unbind_array_element __P((SHELL_VAR *, char *)); @@ -270,6 +270,9 @@ load_history () Note that the history file is automatically truncated to the size of HISTSIZE if the user does not explicitly set the size differently. */ + set_if_not ("HISTSIZE", "500"); + sv_histsize ("HISTSIZE"); + set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE")); sv_histsize ("HISTFILESIZE"); @@ -38,5 +38,6 @@ extern procenv_t return_catch; /* used by `return' builtin */ #define DISCARD 2 /* Discard current command. */ #define EXITPROG 3 /* Unconditionally exit the program now. */ #define ERREXIT 4 /* Exit due to error condition */ +#define SIGEXIT 5 /* Exit due to fatal terminating signal */ #endif /* _BASHJMP_H_ */ @@ -1,6 +1,6 @@ /* bashline.c -- Bash's interface to the readline library. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -238,6 +238,9 @@ static int dot_in_path = 0; #define COMPLETE_BSQUOTE 3 static int completion_quoting_style = COMPLETE_BSQUOTE; +/* Flag values for the final argument to bash_default_completion */ +#define DEFCOMP_CMDPOS 1 + /* Change the readline VI-mode keymaps into or out of Posix.2 compliance. Called when the shell is put into or out of `posix' mode. */ void @@ -999,7 +1002,7 @@ attempt_shell_completion (text, start, end) const char *text; int start, end; { - int in_command_position, ti, saveti, qc; + int in_command_position, ti, saveti, qc, dflags; char **matches, *command_separator_chars; command_separator_chars = COMMAND_SEPARATORS; @@ -1112,15 +1115,20 @@ attempt_shell_completion (text, start, end) #endif if (matches == 0) - matches = bash_default_completion (text, start, end, qc, in_command_position); + { + dflags = 0; + if (in_command_position) + dflags |= DEFCOMP_CMDPOS; + matches = bash_default_completion (text, start, end, qc, dflags); + } return matches; } char ** -bash_default_completion (text, start, end, qc, in_command_position) +bash_default_completion (text, start, end, qc, compflags) const char *text; - int start, end, qc, in_command_position; + int start, end, qc, compflags; { char **matches; @@ -1148,9 +1156,11 @@ bash_default_completion (text, start, end, qc, in_command_position) /* And last, (but not least) if this word is in a command position, then complete over possible command names, including aliases, functions, and command names. */ - if (!matches && in_command_position) + if (matches == 0 && (compflags & DEFCOMP_CMDPOS)) { - if (start == 0 && end == 0 && text[0] == '\0' && no_empty_command_completion) + /* If END == START and text[0] == 0, we are trying to complete an empty + command word. */ + if (no_empty_command_completion && end == start && text[0] == '\0') { matches = (char **)NULL; rl_ignore_some_completions_function = bash_ignore_everything; @@ -1226,7 +1236,7 @@ command_word_completion_function (hint_text, state) static char *filename_hint = (char *)NULL; static char *dequoted_hint = (char *)NULL; static int path_index, hint_len, dequoted_len, istate, igncase; - static int mapping_over, local_index; + static int mapping_over, local_index, searching_path, hint_is_dir; static SHELL_VAR **varlist = (SHELL_VAR **)NULL; #if defined (ALIAS) static alias_t **alias_list = (alias_t **)NULL; @@ -1242,7 +1252,8 @@ command_word_completion_function (hint_text, state) if (hint) free (hint); - mapping_over = 0; + mapping_over = searching_path = 0; + hint_is_dir = CMD_IS_DIR (hint_text); val = (char *)NULL; temp = rl_variable_value ("completion-ignore-case"); @@ -1381,6 +1392,16 @@ command_word_completion_function (hint_text, state) mapping_over++; } + /* If the text passed is a directory in the current directory, return it + as a possible match. Executables in directories in the current + directory can be specified using relative pathnames and successfully + executed even when `.' is not in $PATH. */ + if (hint_is_dir) + { + hint_is_dir = 0; /* only return the hint text once */ + return (savestring (hint_text)); + } + /* Repeatedly call filename_completion_function while we have members of PATH left. Question: should we stat each file? Answer: we call executable_file () on each file. */ @@ -1398,6 +1419,7 @@ command_word_completion_function (hint_text, state) (current_path = extract_colon_unit (path, &path_index)) == 0) return ((char *)NULL); + searching_path = 1; if (*current_path == 0) { free (current_path); @@ -1439,7 +1461,9 @@ command_word_completion_function (hint_text, state) else { int match, freetemp; - char *temp; +#if 0 + char *temp; /* shadows previous declaration */ +#endif if (absolute_program (hint)) { @@ -1491,9 +1515,18 @@ command_word_completion_function (hint_text, state) freetemp = match = 0; } +#if 0 /* If we have found a match, and it is an executable file or a directory name, return it. */ if (match && executable_or_directory (val)) +#else + /* If we have found a match, and it is an executable file, return it. + We don't return directory names when searching $PATH, since the + bash execution code won't find executables in directories which + appear in directories in $PATH when they're specified using + relative pathnames. */ + if (match && (searching_path ? executable_file (val) : executable_or_directory (val))) +#endif { free (val); val = ""; /* So it won't be NULL. */ @@ -1729,8 +1762,9 @@ bash_servicename_completion_function (text, state) if (snamelen == 0 || (STREQN (sname, srvent->s_name, snamelen))) break; /* Not primary, check aliases */ - for (alist = srvent->s_aliases; aentry = *alist; alist++) + for (alist = srvent->s_aliases; *alist; alist++) { + aentry = *alist; if (STREQN (sname, aentry, snamelen)) { afound = 1; @@ -2265,7 +2299,7 @@ static void bash_directory_expansion (dirname) char **dirname; { - char *d; + char *d, *nd; d = savestring (*dirname); @@ -2277,6 +2311,13 @@ bash_directory_expansion (dirname) free (*dirname); *dirname = d; } + else if (rl_completion_found_quote) + { + nd = bash_dequote_filename (d, rl_completion_quote_character); + free (*dirname); + free (d); + *dirname = nd; + } } /* Handle symbolic link references and other directory name @@ -2337,6 +2378,13 @@ bash_directory_completion_hook (dirname) return 1; } } + else + { + /* Dequote the filename even if we don't expand it. */ + new_dirname = bash_dequote_filename (local_dirname, rl_completion_quote_character); + free (local_dirname); + local_dirname = *dirname = new_dirname; + } if (!no_symbolic_links && (local_dirname[0] != '.' || local_dirname[1])) { @@ -3123,11 +3171,7 @@ bash_directory_completion_matches (text) char *dfn; int qc; -#if 0 - qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0; -#else qc = rl_dispatching ? rl_completion_quote_character : 0; -#endif dfn = bash_dequote_filename ((char *)text, qc); m1 = rl_completion_matches (dfn, rl_filename_completion_function); free (dfn); @@ -61,7 +61,7 @@ int brace_arg_separator = ','; static int brace_gobbler __P((char *, size_t, int *, int)); static char **expand_amble __P((char *, size_t, int)); static char **expand_seqterm __P((char *, size_t)); -static char **mkseq __P((int, int, int)); +static char **mkseq __P((int, int, int, int)); static char **array_concat __P((char **, char **)); #else static int brace_gobbler (); @@ -71,6 +71,18 @@ static char **mkseq(); static char **array_concat (); #endif +#if 0 +static void +dump_result (a) + char **a; +{ + int i; + + for (i = 0; a[i]; i++) + printf ("dump_result: a[%d] = -%s-\n", i, a[i]); +} +#endif + /* Return an array of strings; the brace expansion of TEXT. */ char ** brace_expand (text) @@ -81,14 +93,45 @@ brace_expand (text) char *preamble, *postamble, *amble; size_t alen; char **tack, **result; - int i, j, c; + int i, j, c, c1; DECLARE_MBSTATE; /* Find the text of the preamble. */ tlen = strlen (text); i = 0; - c = brace_gobbler (text, tlen, &i, '{'); +#if defined (CSH_BRACE_COMPAT) + c = brace_gobbler (text, tlen, &i, '{'); /* } */ +#else + /* Make sure that when we exit this loop, c == 0 or text[i] begins a + valid brace expansion sequence. */ + do + { + c = brace_gobbler (text, tlen, &i, '{'); /* } */ + c1 = c; + /* Verify that c begins a valid brace expansion word. If it doesn't, we + go on. Loop stops when there are no more open braces in the word. */ + if (c) + { + start = j = i + 1; /* { */ + c = brace_gobbler (text, tlen, &j, '}'); + if (c == 0) /* it's not */ + { + i++; + c = c1; + continue; + } + else /* it is */ + { + c = c1; + break; + } + } + else + break; + } + while (c); +#endif /* !CSH_BRACE_COMPAT */ preamble = (char *)xmalloc (i + 1); strncpy (preamble, text, i); @@ -260,22 +303,31 @@ expand_amble (text, tlen, flags) #define ST_CHAR 2 static char ** -mkseq (start, end, type) - int start, end, type; +mkseq (start, end, incr, type) + int start, end, incr, type; { - int n, incr, i; + int n, i; char **result, *t; n = abs (end - start) + 1; result = strvec_create (n + 1); - incr = (start < end) ? 1 : -1; + if (incr == 0) + incr = 1; + + if (start > end && incr > 0) + incr = -incr; + else if (start < end && incr < 0) + incr = -incr; /* Make sure we go through the loop at least once, so {3..3} prints `3' */ i = 0; n = start; do { +#if defined (SHELL) + QUIT; /* XXX - memory leak here */ +#endif if (type == ST_INT) result[i++] = itos (n); else @@ -349,7 +401,7 @@ expand_seqterm (text, tlen) rhs_v = tr; } - result = mkseq (lhs_v, rhs_v, lhs_t); + result = mkseq (lhs_v, rhs_v, 1, lhs_t); free (lhs); free (rhs); @@ -361,6 +413,11 @@ expand_seqterm (text, tlen) index of the character matching SATISFY. This understands about quoting. Return the character that caused us to stop searching; this is either the same as SATISFY, or 0. */ +/* If SATISFY is `}', we are looking for a brace expression, so we + should enforce the rules that govern valid brace expansions: + 1) to count as an arg separator, a comma or `..' has to be outside + an inner set of braces. +*/ static int brace_gobbler (text, tlen, indx, satisfy) char *text; @@ -368,7 +425,7 @@ brace_gobbler (text, tlen, indx, satisfy) int *indx; int satisfy; { - register int i, c, quoted, level, pass_next; + register int i, c, quoted, level, commas, pass_next; #if defined (SHELL) int si; char *t; @@ -376,6 +433,11 @@ brace_gobbler (text, tlen, indx, satisfy) DECLARE_MBSTATE; level = quoted = pass_next = 0; +#if defined (CSH_BRACE_COMPAT) + commas = 1; +#else + commas = (satisfy == '}') ? 0 : 1; +#endif i = *indx; while (c = text[i]) @@ -436,7 +498,7 @@ brace_gobbler (text, tlen, indx, satisfy) } #endif - if (c == satisfy && level == 0 && quoted == 0) + if (c == satisfy && level == 0 && quoted == 0 && commas > 0) { /* We ignore an open brace surrounded by whitespace, and also an open brace followed immediately by a close brace preceded @@ -456,6 +518,13 @@ brace_gobbler (text, tlen, indx, satisfy) level++; else if (c == '}' && level) level--; +#if !defined (CSH_BRACE_COMPAT) + else if (satisfy == '}' && c == brace_arg_separator && level == 0) + commas++; + else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) && + text[i+2] != satisfy && level == 0) + commas++; +#endif ADVANCE_CHAR (text, tlen, i); } diff --git a/builtins/Makefile.in b/builtins/Makefile.in index 965b8bd8..e027f7aa 100644 --- a/builtins/Makefile.in +++ b/builtins/Makefile.in @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. -PACKAGE = @PACKAGE@ +PACKAGE = @PACKAGE_NAME@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ @@ -178,7 +178,7 @@ helpdoc: $(MKBUILTINS) $(DEFSRC) install-help: @-if test -n "${HELPDIR}" && test -d helpfiles ; then \ - test -d ${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ + test -d $(DESTDIR)${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ ( for f in helpfiles/*; do \ echo installing $$f; \ ${INSTALL_DATA} $$f $(DESTDIR)$(HELPDIR); \ diff --git a/builtins/caller.def b/builtins/caller.def index 5142cab9..f5f2c083 100644 --- a/builtins/caller.def +++ b/builtins/caller.def @@ -28,9 +28,9 @@ $SHORT_DOC caller [EXPR] Returns the context of the current subroutine call. -Without EXPR, returns returns "$line $filename". With EXPR, +Without EXPR, returns "$line $filename". With EXPR, returns "$line $subroutine $filename"; this extra information -can be used used to provide a stack trace. +can be used to provide a stack trace. The value of EXPR indicates how many call frames to go back before the current one; the top frame is frame 0. @@ -76,7 +76,6 @@ caller_builtin (list) SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v; ARRAY *funcname_a, *bash_source_a, *bash_lineno_a; char *funcname_s, *source_s, *lineno_s; - ARRAY_ELEMENT *ae; intmax_t num; GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a); diff --git a/builtins/cd.def b/builtins/cd.def index 025e4f5e..54e328e4 100644 --- a/builtins/cd.def +++ b/builtins/cd.def @@ -60,6 +60,7 @@ extern char *bash_getcwd_errstr; static int bindpwd __P((int)); static void setpwd __P((char *)); +static char *resetpwd __P((char *)); static int change_to_directory __P((char *, int)); static char *cdspell __P((char *)); diff --git a/builtins/common.c b/builtins/common.c index 9d8f09ab..7b9613e1 100644 --- a/builtins/common.c +++ b/builtins/common.c @@ -467,9 +467,6 @@ char * get_working_directory (for_whom) char *for_whom; { - char *directory; - size_t dsize; - if (no_symbolic_links) { FREE (the_current_working_directory); diff --git a/builtins/common.h b/builtins/common.h index df303252..1233d667 100644 --- a/builtins/common.h +++ b/builtins/common.h @@ -149,7 +149,7 @@ extern void set_var_attribute __P((char *, int, int)); extern char *get_dirstack_from_string __P((char *)); extern char *get_dirstack_element __P((intmax_t, int)); extern void set_dirstack_element __P((intmax_t, int, char *)); -extern WORD_LIST *get_directory_stack __P((void)); +extern WORD_LIST *get_directory_stack __P((int)); /* Functions from evalstring.c */ extern int parse_and_execute __P((char *, const char *, int)); diff --git a/builtins/declare.def b/builtins/declare.def index d94118f5..4d94face 100644 --- a/builtins/declare.def +++ b/builtins/declare.def @@ -76,6 +76,7 @@ $END #include "bashgetopt.h" extern int array_needs_making; +extern int posixly_correct; static int declare_internal __P((register WORD_LIST *, int)); @@ -256,8 +257,12 @@ declare_internal (list, local_var) else making_array_special = 0; #endif - - if (legal_identifier (name) == 0) + + /* If we're in posix mode or not looking for a shell function (since + shell function names don't have to be valid identifiers when the + shell's not in posix mode), check whether or not the argument is a + valid, well-formed shell identifier. */ + if ((posixly_correct || (flags_on & att_function) == 0) && legal_identifier (name) == 0) { sh_invalidid (name); assign_error++; diff --git a/builtins/echo.def b/builtins/echo.def index 6792659a..923c43a2 100644 --- a/builtins/echo.def +++ b/builtins/echo.def @@ -31,6 +31,8 @@ $PRODUCES echo.c #include <stdio.h> #include "../shell.h" +#include "common.h" + $BUILTIN echo $FUNCTION echo_builtin $DEPENDS_ON V9_ECHO @@ -48,7 +50,8 @@ following backslash-escaped characters is turned on: \t horizontal tab \v vertical tab \\ backslash - \num the character whose ASCII code is NUM (octal). + \0nnn the character whose ASCII code is NNN (octal). NNN can be + 0 to 3 octal digits You can explicitly turn off the interpretation of the above characters with the -E option. diff --git a/builtins/evalfile.c b/builtins/evalfile.c index 81be017b..d05bc7bb 100644 --- a/builtins/evalfile.c +++ b/builtins/evalfile.c @@ -63,7 +63,7 @@ extern int errno; #define FEVAL_NOPUSHARGS 0x100 extern int posixly_correct; -extern int indirection_level, startup_state, subshell_environment; +extern int indirection_level, subshell_environment; extern int return_catch_flag, return_catch_value; extern int last_command_exit_value; diff --git a/builtins/evalstring.c b/builtins/evalstring.c index 04afac3d..36f0ad39 100644 --- a/builtins/evalstring.c +++ b/builtins/evalstring.c @@ -56,7 +56,7 @@ extern int errno; #define IS_BUILTIN(s) (builtin_address_internal(s, 0) != (struct builtin *)NULL) -extern int indirection_level, startup_state, subshell_environment; +extern int indirection_level, subshell_environment; extern int line_number; extern int last_command_exit_value; extern int running_trap; @@ -316,9 +316,8 @@ static int cat_file (r) REDIRECT *r; { - char lbuf[128], *fn; + char *fn; int fd, rval; - ssize_t nr; if (r->instruction != r_input_direction) return -1; diff --git a/builtins/fc.def b/builtins/fc.def index ebe36832..101eb008 100644 --- a/builtins/fc.def +++ b/builtins/fc.def @@ -81,7 +81,6 @@ $END extern int errno; #endif /* !errno */ -extern int echo_input_at_read; extern int current_command_line_count; extern int literal_history; extern int posixly_correct; diff --git a/builtins/hash.def b/builtins/hash.def index b2959521..697ffd0a 100644 --- a/builtins/hash.def +++ b/builtins/hash.def @@ -1,7 +1,7 @@ This file is hash.def, from which is created hash.c. It implements the builtin "hash" in Bash. -Copyright (C) 1987-2003 Free Software Foundation, Inc. +Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -59,6 +59,7 @@ $END #include "common.h" #include "bashgetopt.h" +extern int posixly_correct; extern int dot_found_in_search; extern char *this_command_name; @@ -124,8 +125,9 @@ hash_builtin (list) we test expunge_hash_table. */ if (list == 0 && expunge_hash_table == 0) { - if (print_hashed_commands (list_portably) == 0) - fprintf (stderr, _("%s: hash table empty\n"), this_command_name); + opt = print_hashed_commands (list_portably); + if (opt == 0 && posixly_correct == 0) + printf (_("%s: hash table empty\n"), this_command_name); return (EXECUTION_SUCCESS); } diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c index 94953e6c..ff0bdc09 100644 --- a/builtins/mkbuiltins.c +++ b/builtins/mkbuiltins.c @@ -1,7 +1,7 @@ /* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from a single source file called builtins.def. */ -/* Copyright (C) 1987-2002 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -19,7 +19,16 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ -#include <config.h> +#if !defined (CROSS_COMPILING) +# include <config.h> +#else /* CROSS_COMPILING */ +/* A conservative set of defines based on POSIX/SUS3/XPG6 */ +# define HAVE_UNISTD_H +# define HAVE_STRING_H +# define HAVE_STDLIB_H + +# define HAVE_RENAME +#endif /* CROSS_COMPILING */ #if defined (HAVE_UNISTD_H) # ifdef _MINIX @@ -1360,7 +1369,7 @@ write_documentation (stream, documentation, indentation, flags) register char *line; int string_array, texinfo, base_indent, last_cpp, filename_p; - if (!stream) + if (stream == 0) return; string_array = flags & STRING_ARRAY; @@ -1372,7 +1381,12 @@ write_documentation (stream, documentation, indentation, flags) if (single_longdoc_strings) { if (filename_p == 0) - fprintf (stream, "N_(\" "); /* the empty string translates specially. */ + { + if (documentation && documentation[0] && documentation[0][0]) + fprintf (stream, "N_(\""); + else + fprintf (stream, "N_(\" "); /* the empty string translates specially. */ + } else fprintf (stream, "\""); } @@ -1398,7 +1412,12 @@ write_documentation (stream, documentation, indentation, flags) if (string_array && single_longdoc_strings == 0) { if (filename_p == 0) - fprintf (stream, " N_(\" "); /* the empty string translates specially. */ + { + if (line[0]) + fprintf (stream, " N_(\""); + else + fprintf (stream, " N_(\" "); /* the empty string translates specially. */ + } else fprintf (stream, " \""); } diff --git a/builtins/printf.def b/builtins/printf.def index e4e31704..0e1d4aa9 100644 --- a/builtins/printf.def +++ b/builtins/printf.def @@ -91,6 +91,7 @@ extern int errno; do { \ char *b = 0; \ int nw; \ + clearerr (stdout); \ if (have_fieldwidth && have_precision) \ nw = asprintf(&b, f, fieldwidth, precision, func); \ else if (have_fieldwidth) \ @@ -106,6 +107,12 @@ extern int errno; (void)vbadd (b, nw); \ else \ (void)fputs (b, stdout); \ + if (ferror (stdout)) \ + { \ + sh_wrerror (); \ + clearerr (stdout); \ + return (EXECUTION_FAILURE); \ + } \ free (b); \ } \ } while (0) @@ -132,6 +139,11 @@ extern int errno; vbuf = 0; \ } \ fflush (stdout); \ + if (ferror (stdout)) \ + { \ + clearerr (stdout); \ + return (EXECUTION_FAILURE); \ + } \ return (value); \ } \ while (0) @@ -407,7 +419,9 @@ printf_builtin (list) r = 0; p = getstr (); - if (ansic_shouldquote (p)) + if (p && *p == 0) /* XXX - getstr never returns null */ + xp = savestring ("''"); + else if (ansic_shouldquote (p)) xp = ansic_quote (p, 0, (int *)0); else xp = sh_backslash_quote (p); @@ -816,7 +830,7 @@ vbadd (buf, blen) #ifdef DEBUG if (strlen (vbuf) != vblen) - internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, strlen (vbuf)); + internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf)); #endif return vbuf; diff --git a/builtins/pushd.def b/builtins/pushd.def index 0978fc93..86c0bddb 100644 --- a/builtins/pushd.def +++ b/builtins/pushd.def @@ -620,7 +620,8 @@ set_dirstack_element (ind, sign, value) } WORD_LIST * -get_directory_stack () +get_directory_stack (flags) + int flags; { register int i; WORD_LIST *ret; @@ -628,7 +629,8 @@ get_directory_stack () for (ret = (WORD_LIST *)NULL, i = 0; i < directory_list_offset; i++) { - d = polite_directory_format (pushd_directory_list[i]); + d = (flags&1) ? polite_directory_format (pushd_directory_list[i]) + : pushd_directory_list[i]; ret = make_word_list (make_word (d), ret); } /* Now the current directory. */ @@ -657,7 +659,7 @@ get_directory_stack () } #ifdef LOADABLE_BUILTIN -static char * const dirs_doc[] = { +char * const dirs_doc[] = { N_("Display the list of currently remembered directories. Directories"), N_("find their way onto the list with the `pushd' command; you can get"), N_("back up through the list with the `popd' command."), @@ -678,7 +680,7 @@ static char * const dirs_doc[] = { (char *)NULL }; -static char * const pushd_doc[] = { +char * const pushd_doc[] = { N_("Adds a directory to the top of the directory stack, or rotates"), N_("the stack, making the new top of the stack the current working"), N_("directory. With no arguments, exchanges the top two directories."), @@ -701,7 +703,7 @@ static char * const pushd_doc[] = { (char *)NULL }; -static char * const popd_doc[] = { +char * const popd_doc[] = { N_("Removes entries from the directory stack. With no arguments,"), N_("removes the top directory from the stack, and cd's to the new"), N_("top directory."), diff --git a/builtins/read.def b/builtins/read.def index 914ebd7d..21521db0 100644 --- a/builtins/read.def +++ b/builtins/read.def @@ -87,9 +87,8 @@ $END extern int errno; #endif -extern int interrupt_immediately; - #if defined (READLINE) +static void reset_attempted_completion_function __P((char *)); static char *edit_line __P((char *)); static void set_eol_delim __P((int)); static void reset_eol_delim __P((char *)); @@ -330,6 +329,10 @@ read_builtin (list) } old_alrm = set_signal_handler (SIGALRM, sigalrm); add_unwind_protect (reset_alarm, (char *)NULL); +#if defined (READLINE) + if (edit) + add_unwind_protect (reset_attempted_completion_function, (char *)NULL); +#endif alarm (tmout); } @@ -375,6 +378,7 @@ read_builtin (list) of the unwind-protect stack after the realloc() works right. */ add_unwind_protect (xfree, input_string); interrupt_immediately++; + terminate_immediately = 1; unbuffered_read = (nchars > 0) || (delim != '\n') || input_is_pipe; @@ -472,6 +476,7 @@ add_char: if (retval < 0) { builtin_error (_("read error: %d: %s"), fd, strerror (errno)); + run_unwind_frame ("read_builtin"); return (EXECUTION_FAILURE); } #endif @@ -501,6 +506,7 @@ add_char: zsyncfd (fd); interrupt_immediately--; + terminate_immediately = 0; discard_unwind_frame ("read_builtin"); retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS; @@ -519,13 +525,19 @@ add_char: var = find_or_make_array_variable (arrayname, 1); if (var == 0) - return EXECUTION_FAILURE; /* readonly or noassign */ + { + xfree (input_string); + return EXECUTION_FAILURE; /* readonly or noassign */ + } array_flush (array_cell (var)); alist = list_string (input_string, ifs_chars, 0); if (alist) { - word_list_remove_quoted_nulls (alist); + if (saw_escape) + dequote_list (alist); + else + word_list_remove_quoted_nulls (alist); assign_array_var_from_word_list (var, alist, 0); dispose_words (alist); } @@ -688,7 +700,15 @@ bind_read_variable (name, value) } #if defined (READLINE) -static rl_completion_func_t *old_attempted_completion_function; +static rl_completion_func_t *old_attempted_completion_function = 0; + +static void +reset_attempted_completion_function (cp) + char *cp; +{ + if (rl_attempted_completion_function == 0 && old_attempted_completion_function) + rl_attempted_completion_function = old_attempted_completion_function; +} static char * edit_line (p) @@ -699,10 +719,13 @@ edit_line (p) if (bash_readline_initialized == 0) initialize_readline (); + old_attempted_completion_function = rl_attempted_completion_function; rl_attempted_completion_function = (rl_completion_func_t *)NULL; ret = readline (p); rl_attempted_completion_function = old_attempted_completion_function; + old_attempted_completion_function = (rl_completion_func_t *)NULL; + if (ret == 0) return ret; len = strlen (ret); diff --git a/builtins/reserved.def b/builtins/reserved.def index 5482f5f3..e968ec7c 100644 --- a/builtins/reserved.def +++ b/builtins/reserved.def @@ -2,7 +2,7 @@ This file is reserved.def, in which the shell reserved words are defined. It has no direct C file production, but defines builtins for the Bash builtin help command. -Copyright (C) 1987-2005 Free Software Foundation, Inc. +Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -146,21 +146,21 @@ $END $BUILTIN variables $DOCNAME variable_help $SHORT_DOC variables - Some variable names and meanings -BASH_VERSION Version information for this Bash. -CDPATH A colon-separated list of directories to search +BASH_VERSION Version information for this Bash. +CDPATH A colon-separated list of directories to search for directries given as arguments to `cd'. GLOBIGNORE A colon-separated list of patterns describing filenames to be ignored by pathname expansion. #if defined (HISTORY) -HISTFILE The name of the file where your command history is stored. -HISTFILESIZE The maximum number of lines this file can contain. -HISTSIZE The maximum number of history lines that a running +HISTFILE The name of the file where your command history is stored. +HISTFILESIZE The maximum number of lines this file can contain. +HISTSIZE The maximum number of history lines that a running shell can access. #endif /* HISTORY */ -HOME The complete pathname to your login directory. +HOME The complete pathname to your login directory. HOSTNAME The name of the current host. -HOSTTYPE The type of CPU this version of Bash is running under. -IGNOREEOF Controls the action of the shell on receipt of an EOF +HOSTTYPE The type of CPU this version of Bash is running under. +IGNOREEOF Controls the action of the shell on receipt of an EOF character as the sole input. If set, then the value of it is the number of EOF characters that can be seen in a row on an empty line before the shell will exit @@ -169,19 +169,19 @@ MACHTYPE A string describing the current system Bash is running on. MAILCHECK How often, in seconds, Bash checks for new mail. MAILPATH A colon-separated list of filenames which Bash checks for new mail. -OSTYPE The version of Unix this version of Bash is running on. -PATH A colon-separated list of directories to search when +OSTYPE The version of Unix this version of Bash is running on. +PATH A colon-separated list of directories to search when looking for commands. -PROMPT_COMMAND A command to be executed before the printing of each +PROMPT_COMMAND A command to be executed before the printing of each primary prompt. -PS1 The primary prompt string. -PS2 The secondary prompt string. +PS1 The primary prompt string. +PS2 The secondary prompt string. PWD The full pathname of the current directory. SHELLOPTS A colon-separated list of enabled shell options. -TERM The name of the current terminal type. +TERM The name of the current terminal type. TIMEFORMAT The output format for timing statistics displayed by the `time' reserved word. -auto_resume Non-null means a command word appearing on a line by +auto_resume Non-null means a command word appearing on a line by itself is first looked for in the list of currently stopped jobs. If found there, that job is foregrounded. A value of `exact' means that the command word must @@ -191,7 +191,7 @@ auto_resume Non-null means a command word appearing on a line by the command must be a prefix of a stopped job. #if defined (HISTORY) # if defined (BANG_HISTORY) -histchars Characters controlling history expansion and quick +histchars Characters controlling history expansion and quick substitution. The first character is the history substitution character, usually `!'. The second is the `quick substitution' character, usually `^'. The diff --git a/builtins/set.def b/builtins/set.def index 3bb32704..d1086695 100644 --- a/builtins/set.def +++ b/builtins/set.def @@ -578,7 +578,6 @@ set_builtin (list) WORD_LIST *list; { int on_or_off, flag_name, force_assignment, opts_changed; - WORD_LIST *l; register char *arg; char s[3]; diff --git a/builtins/source.def b/builtins/source.def index f9f812f8..9576f09e 100644 --- a/builtins/source.def +++ b/builtins/source.def @@ -68,9 +68,7 @@ $END extern int errno; #endif /* !errno */ -#if defined (RESTRICTED_SHELL) -extern int restricted; -#endif +static void maybe_pop_dollar_vars __P((void)); /* If non-zero, `.' uses $PATH to look up the script to be sourced. */ int source_uses_path = 1; diff --git a/builtins/suspend.def b/builtins/suspend.def index d616d775..ea86ae22 100644 --- a/builtins/suspend.def +++ b/builtins/suspend.def @@ -48,13 +48,15 @@ $END #include "common.h" #include "bashgetopt.h" +static sighandler suspend_continue __P((int)); + static SigHandler *old_cont; #if 0 static SigHandler *old_stop; #endif /* Continue handler. */ -sighandler +static sighandler suspend_continue (sig) int sig; { diff --git a/builtins/trap.def b/builtins/trap.def index 669bea7a..2735791e 100644 --- a/builtins/trap.def +++ b/builtins/trap.def @@ -1,7 +1,7 @@ This file is trap.def, from which is created trap.c. It implements the builtin "trap" in Bash. -Copyright (C) 1987-2005 Free Software Foundation, Inc. +Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -87,7 +87,7 @@ int trap_builtin (list) WORD_LIST *list; { - int list_signal_names, display, result, opt, first_signal; + int list_signal_names, display, result, opt; list_signal_names = display = 0; result = EXECUTION_SUCCESS; @@ -124,7 +124,10 @@ trap_builtin (list) first_arg = list->word->word; first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt); - /* Backwards compatibility */ + /* Backwards compatibility. XXX - question about whether or not we + should throw an error if an all-digit argument doesn't correspond + to a valid signal number (e.g., if it's `50' on a system with only + 32 signals). */ if (first_signal) operation = REVERT; /* When in posix mode, the historical behavior of looking for a @@ -176,7 +179,7 @@ trap_builtin (list) if (interactive) set_signal_handler (SIGINT, sigint_sighandler); else - set_signal_handler (SIGINT, termination_unwind_protect); + set_signal_handler (SIGINT, termsig_sighandler); break; case SIGQUIT: diff --git a/builtins/ulimit.def b/builtins/ulimit.def index 8cfcd4fd..2d2e7b2b 100644 --- a/builtins/ulimit.def +++ b/builtins/ulimit.def @@ -34,18 +34,20 @@ option is given, it is interpreted as follows: -a all current limits are reported -c the maximum size of core files created -d the maximum size of a process's data segment - -f the maximum size of files created by the shell - -i the maximum number of pending signals + -e the maximum scheduling priority (`nice') + -f the maximum size of files written by the shell and its children + -i the maximum number of pending signals -l the maximum size a process may lock into memory -m the maximum resident set size -n the maximum number of open file descriptors -p the pipe buffer size - -q the maximum number of bytes in POSIX message queues + -q the maximum number of bytes in POSIX message queues + -r the maximum real-time scheduling priority -s the maximum stack size -t the maximum amount of cpu time in seconds -u the maximum number of user processes -v the size of virtual memory - -x the maximum number of file locks + -x the maximum number of file locks If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `soft', `hard', and `unlimited' stand for @@ -202,6 +204,9 @@ static RESOURCE_LIMITS limits[] = { #ifdef RLIMIT_DATA { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" }, #endif +#ifdef RLIMIT_NICE + { 'e', RLIMIT_NICE, 1, "scheduling priority", (char *)NULL }, +#endif { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" }, #ifdef RLIMIT_SIGPENDING { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL }, @@ -217,6 +222,9 @@ static RESOURCE_LIMITS limits[] = { #ifdef RLIMIT_MSGQUEUE { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" }, #endif +#ifdef RLIMIT_RTPRIO + { 'r', RLIMIT_RTPRIO, 1, "real-time priority", (char *)NULL }, +#endif #ifdef RLIMIT_STACK { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" }, #endif diff --git a/builtins/wait.def b/builtins/wait.def index 22a92bea..a3095952 100644 --- a/builtins/wait.def +++ b/builtins/wait.def @@ -59,7 +59,6 @@ $END #include "common.h" #include "bashgetopt.h" -extern int interrupt_immediately; extern int wait_signal_received; procenv_t wait_intr_buf; @@ -67,26 +67,27 @@ enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, cm_arith, cm_cond, cm_arith_for, cm_subshell }; /* Possible values for the `flags' field of a WORD_DESC. */ -#define W_HASDOLLAR 0x00001 /* Dollar sign present. */ -#define W_QUOTED 0x00002 /* Some form of quote character is present. */ -#define W_ASSIGNMENT 0x00004 /* This word is a variable assignment. */ -#define W_GLOBEXP 0x00008 /* This word is the result of a glob expansion. */ -#define W_NOSPLIT 0x00010 /* Do not perform word splitting on this word. */ -#define W_NOGLOB 0x00020 /* Do not perform globbing on this word. */ -#define W_NOSPLIT2 0x00040 /* Don't split word except for $@ expansion. */ -#define W_TILDEEXP 0x00080 /* Tilde expand this assignment word */ -#define W_DOLLARAT 0x00100 /* $@ and its special handling */ -#define W_DOLLARSTAR 0x00200 /* $* and its special handling */ -#define W_NOCOMSUB 0x00400 /* Don't perform command substitution on this word */ -#define W_ASSIGNRHS 0x00800 /* Word is rhs of an assignment statement */ -#define W_NOTILDE 0x01000 /* Don't perform tilde expansion on this word */ -#define W_ITILDE 0x02000 /* Internal flag for word expansion */ -#define W_NOEXPAND 0x04000 /* Don't expand at all -- do quote removal */ -#define W_COMPASSIGN 0x08000 /* Compound assignment */ -#define W_ASSNBLTIN 0x10000 /* word is a builtin command that takes assignments */ -#define W_ASSIGNARG 0x20000 /* word is assignment argument to command */ -#define W_HASQUOTEDNULL 0x40000 /* word contains a quoted null character */ -#define W_DQUOTE 0x80000 /* word should be treated as if double-quoted */ +#define W_HASDOLLAR 0x000001 /* Dollar sign present. */ +#define W_QUOTED 0x000002 /* Some form of quote character is present. */ +#define W_ASSIGNMENT 0x000004 /* This word is a variable assignment. */ +#define W_GLOBEXP 0x000008 /* This word is the result of a glob expansion. */ +#define W_NOSPLIT 0x000010 /* Do not perform word splitting on this word. */ +#define W_NOGLOB 0x000020 /* Do not perform globbing on this word. */ +#define W_NOSPLIT2 0x000040 /* Don't split word except for $@ expansion. */ +#define W_TILDEEXP 0x000080 /* Tilde expand this assignment word */ +#define W_DOLLARAT 0x000100 /* $@ and its special handling */ +#define W_DOLLARSTAR 0x000200 /* $* and its special handling */ +#define W_NOCOMSUB 0x000400 /* Don't perform command substitution on this word */ +#define W_ASSIGNRHS 0x000800 /* Word is rhs of an assignment statement */ +#define W_NOTILDE 0x001000 /* Don't perform tilde expansion on this word */ +#define W_ITILDE 0x002000 /* Internal flag for word expansion */ +#define W_NOEXPAND 0x004000 /* Don't expand at all -- do quote removal */ +#define W_COMPASSIGN 0x008000 /* Compound assignment */ +#define W_ASSNBLTIN 0x010000 /* word is a builtin command that takes assignments */ +#define W_ASSIGNARG 0x020000 /* word is assignment argument to command */ +#define W_HASQUOTEDNULL 0x040000 /* word contains a quoted null character */ +#define W_DQUOTE 0x080000 /* word should be treated as if double-quoted */ +#define W_NOPROCSUB 0x100000 /* don't perform process substitution */ /* Possible values for subshell_environment */ #define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */ diff --git a/config-bot.h b/config-bot.h index 18946872..c2200f20 100644 --- a/config-bot.h +++ b/config-bot.h @@ -130,10 +130,22 @@ /* For platforms which support the ISO C amendement 1 functionality we support user defined character classes. */ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ -#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) # include <wchar.h> # include <wctype.h> -# if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH) +# if defined (HAVE_ISWCTYPE) && \ + defined (HAVE_ISWLOWER) && \ + defined (HAVE_ISWUPPER) && \ + defined (HAVE_MBSRTOWCS) && \ + defined (HAVE_MBRTOWC) && \ + defined (HAVE_MBRLEN) && \ + defined (HAVE_TOWLOWER) && \ + defined (HAVE_TOWUPPER) && \ + defined (HAVE_WCHAR_T) && \ + defined (HAVE_WCTYPE_T) && \ + defined (HAVE_WINT_T) && \ + defined (HAVE_WCWIDTH) && \ + defined (HAVE_WCTYPE) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif diff --git a/config.h.in b/config.h.in index 7fde761b..0ae1f1c7 100644 --- a/config.h.in +++ b/config.h.in @@ -1,6 +1,6 @@ /* config.h -- Configuration file for bash. */ -/* Copyright (C) 1987-2004 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -305,9 +305,20 @@ /* Define to `unsigned int' if <sys/socket.h> doesn't define. */ #undef socklen_t +#undef HAVE_MBSTATE_T + /* Define if you have quad_t in <sys/types.h>. */ #undef HAVE_QUAD_T +/* Define if you have wchar_t in <wctype.h>. */ +#undef HAVE_WCHAR_T + +/* Define if you have wctype_t in <wctype.h>. */ +#undef HAVE_WCTYPE_T + +/* Define if you have wint_t in <wctype.h>. */ +#undef HAVE_WINT_T + #undef RLIMTYPE /* Define to the type of elements in the array set by `getgroups'. @@ -404,8 +415,6 @@ #undef STRTOLD_BROKEN -#undef HAVE_MBSTATE_T - /* Define if WCONTINUED is defined in system headers, but rejected by waitpid */ #undef WCONTINUED_BROKEN @@ -514,6 +523,9 @@ /* Define if you have the dup2 function. */ #undef HAVE_DUP2 +/* Define if you have the eaccess function. */ +#undef HAVE_EACCESS + /* Define if you have the fcntl function. */ #undef HAVE_FCNTL @@ -580,15 +592,27 @@ /* Define if you have the isgraph function. */ #undef HAVE_ISGRAPH -/* Define if you have the isint function in libc */ +/* Define if you have the isinf function in libc */ #undef HAVE_ISINF_IN_LIBC +/* Define if you have the isnan function in libc */ +#undef HAVE_ISNAN_IN_LIBC + /* Define if you have the isprint function. */ #undef HAVE_ISPRINT /* Define if you have the isspace function. */ #undef HAVE_ISSPACE +/* Define if you have the iswctype function. */ +#undef HAVE_ISWCTYPE + +/* Define if you have the iswlower function. */ +#undef HAVE_ISWLOWER + +/* Define if you have the iswupper function. */ +#undef HAVE_ISWUPPER + /* Define if you have the isxdigit function. */ #undef HAVE_ISXDIGIT @@ -661,6 +685,10 @@ /* Define if you have the setostype function. */ #undef HAVE_SETOSTYPE +/* Define if you have the setregid function. */ +#undef HAVE_SETREGID +#undef HAVE_DECL_SETREGID + /* Define if you have the setvbuf function. */ #undef HAVE_SETVBUF @@ -733,6 +761,12 @@ /* Define if you have the times function. */ #undef HAVE_TIMES +/* Define if you have the towlower function. */ +#undef HAVE_TOWLOWER + +/* Define if you have the towupper function. */ +#undef HAVE_TOWUPPER + /* Define if you have the ttyname function. */ #undef HAVE_TTYNAME @@ -763,11 +797,17 @@ /* Define if you have the wait3 function. */ #undef HAVE_WAIT3 +/* Define if you have the wcrtomb function. */ +#undef HAVE_WCRTOMB + +/* Define if you have the wcscoll function. */ +#undef HAVE_WCSCOLL + /* Define if you have the wcsdup function. */ #undef HAVE_WCSDUP -/* Define if you have the wctomb function. */ -#undef HAVE_WCTOMB +/* Define if you have the wctype function. */ +#undef HAVE_WCTYPE /* Define if you have the wcwidth function. */ #undef HAVE_WCWIDTH @@ -1,22 +1,13 @@ #! /bin/sh -# From configure.in for Bash 3.1, version 3.183. +# From configure.in for Bash 3.2, version 3.190. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.53 for bash 3.1-release. +# Generated by GNU Autoconf 2.59 for bash 3.2-release. # # Report bugs to <bug-bash@gnu.org>. # -# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - - ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -25,46 +16,57 @@ fi if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh -# NLS nuisances. # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi -(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && - { $as_unset LANG || test "${LANG+set}" != set; } || - { LANG=C; export LANG; } -(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && - { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || - { LC_ALL=C; export LC_ALL; } -(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && - { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || - { LC_TIME=C; export LC_TIME; } -(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && - { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || - { LC_CTYPE=C; export LC_CTYPE; } -(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && - { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || - { LANGUAGE=C; export LANGUAGE; } -(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && - { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || - { LC_COLLATE=C; export LC_COLLATE; } -(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && - { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || - { LC_NUMERIC=C; export LC_NUMERIC; } -(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && - { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || - { LC_MESSAGES=C; export LC_MESSAGES; } + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi # Name of the executable. -as_me=`(basename "$0") 2>/dev/null || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ @@ -75,6 +77,7 @@ echo X/"$0" | /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` + # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' @@ -85,15 +88,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conftest.sh - echo "exit 0" >>conftest.sh - chmod +x conftest.sh - if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi - rm -f conftest.sh + rm -f conf$$.sh fi @@ -141,6 +144,8 @@ do as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} @@ -213,13 +218,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -229,7 +241,7 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } +$as_unset CDPATH # Name of the host. @@ -243,6 +255,7 @@ exec 6>&1 # Initializations. # ac_default_prefix=/usr/local +ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= @@ -257,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='bash' PACKAGE_TARNAME='bash' -PACKAGE_VERSION='3.1-release' -PACKAGE_STRING='bash 3.1-release' +PACKAGE_VERSION='3.2-release' +PACKAGE_STRING='bash 3.2-release' PACKAGE_BUGREPORT='bug-bash@gnu.org' ac_unique_file="shell.h" @@ -299,6 +312,8 @@ ac_includes_default="\ # include <unistd.h> #endif" +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os EMACS lispdir DEBUGGER_START_FILE TESTSCRIPT PURIFY MALLOC_TARGET MALLOC_SRC MALLOC_LIB MALLOC_LIBRARY MALLOC_LDFLAGS MALLOC_DEP htmldir HELPDIR HELPDIRDEFINE HELPINSTALL HELPSTRINGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CROSS_COMPILE SIGNAMES_H SIGNAMES_O CC_FOR_BUILD STATIC_LD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD RL_VERSION RL_MAJOR RL_MINOR READLINE_LIB READLINE_DEP RL_LIBDIR RL_INCLUDEDIR RL_INCLUDE HISTORY_LIB HISTORY_DEP HIST_LIBDIR TILDE_LIB INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB YACC SET_MAKE MAKE_SHELL SIZE MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS INTL_DEP INTL_INC LIBINTL_H SIGLIST_O TERMCAP_LIB TERMCAP_DEP JOBS_O SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS PROFILE_FLAGS incdir BUILD_DIR ARFLAGS BASHVERS RELSTATUS DEBUG MALLOC_DEBUG LOCAL_LIBS LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS LTLIBOBJS' +ac_subst_files='' # Initialize some variables set by options. ac_init_help= @@ -656,7 +671,7 @@ done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir + localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in @@ -696,10 +711,10 @@ if test -z "$srcdir"; then # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } @@ -722,6 +737,9 @@ if test ! -r $srcdir/$ac_unique_file; then { (exit 1); exit 1; }; } fi fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias @@ -767,7 +785,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bash 3.1-release to adapt to many kinds of systems. +\`configure' configures bash 3.2-release to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -792,9 +810,9 @@ _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -828,7 +846,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bash 3.1-release:";; + short | recursive ) echo "Configuration of bash 3.2-release:";; esac cat <<\_ACEOF @@ -959,12 +977,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. @@ -975,7 +1026,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then + test -f $ac_srcdir/configure.in; then echo $ac_configure --help else @@ -988,11 +1039,10 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -bash configure 3.1-release -generated by GNU Autoconf 2.53 +bash configure 3.2-release +generated by GNU Autoconf 2.59 -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1003,8 +1053,8 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bash $as_me 3.1-release, which was -generated by GNU Autoconf 2.53. Invocation command line was +It was created by bash $as_me 3.2-release, which was +generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1056,27 +1106,54 @@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= +ac_configure_args0= +ac_configure_args1= ac_sep= -for ac_arg +ac_must_keep_next=false +for ac_pass in 1 2 do - case $ac_arg in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n ) continue ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - ac_sep=" " ;; - esac - # Get rid of the leading space. + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1087,6 +1164,7 @@ trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo + cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## @@ -1099,16 +1177,45 @@ _ASBOX case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## @@ -1116,14 +1223,14 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h + sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core core.* *.core && + rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 @@ -1203,7 +1310,7 @@ fi # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" @@ -1220,13 +1327,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. @@ -1285,6 +1392,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_aux_dir= for ac_dir in ./support $srcdir/./support; do if test -f $ac_dir/install-sh; then @@ -1310,10 +1418,10 @@ ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. -ac_config_headers="$ac_config_headers config.h" + ac_config_headers="$ac_config_headers config.h" -BASHVERS=3.1 +BASHVERS=3.2 RELSTATUS=release case "$RELSTATUS" in @@ -1585,7 +1693,7 @@ if test "$opt_curses" = yes; then fi if test -z "${DEBUGGER_START_FILE}"; then - DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc + DEBUGGER_START_FILE=${ac_default_prefix}/share/bashdb/bashdb-main.inc fi opt_minimal_config=no @@ -2189,9 +2297,7 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$as_dir/$ac_word" ${1+"$@"} - shift - ac_cv_prog_CC="$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi @@ -2296,8 +2402,10 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. @@ -2321,15 +2429,12 @@ ac_compiler=`set X $ac_compile; echo $2` (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2339,12 +2444,12 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe" +ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output" >&5 -echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 @@ -2358,26 +2463,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= -for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; - a.out ) # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool --akim. - export ac_cv_exeext - break;; - * ) break;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 -echo "$as_me: error: C compiler cannot create executables" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi @@ -2404,9 +2522,11 @@ if test "$cross_compiling" != yes; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&5 +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'." >&2;} +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi @@ -2414,7 +2534,7 @@ fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 -rm -f a.out a.exe conftest$ac_cv_exeext +rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2434,18 +2554,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - break;; + export ac_cv_exeext + break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -2462,15 +2585,12 @@ if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2487,16 +2607,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -2512,15 +2635,12 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2534,11 +2654,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -2547,10 +2677,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_compiler_gnu=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi @@ -2566,15 +2697,12 @@ if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2585,11 +2713,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -2598,10 +2736,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_prog_cc_g=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 @@ -2620,6 +2759,121 @@ else CFLAGS= fi fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + 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 + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide @@ -2631,19 +2885,28 @@ cat >conftest.$ac_ext <<_ACEOF _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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 for ac_declaration in \ - ''\ - '#include <stdlib.h>' \ + '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ @@ -2651,16 +2914,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <stdlib.h> +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif +#include <stdlib.h> int main () { @@ -2671,11 +2931,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -2684,20 +2954,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 : else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + continue fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_declaration -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2708,11 +2976,21 @@ exit (42); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -2721,9 +2999,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then @@ -2734,9 +3013,10 @@ fi else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2754,8 +3034,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -2764,12 +3047,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -2780,11 +3057,21 @@ strerror (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2793,10 +3080,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_cposix_strerror=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_cposix_strerror=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 @@ -2830,24 +3119,34 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <assert.h> - Syntax error +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2858,7 +3157,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -2867,20 +3167,24 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2892,7 +3196,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2921,24 +3226,34 @@ for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <assert.h> - Syntax error +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2949,7 +3264,8 @@ if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Broken: fails on valid input. continue fi @@ -2958,20 +3274,24 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -2983,7 +3303,8 @@ if test -z "$ac_cpp_err"; then continue else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # Passes both tests. ac_preproc_ok=: break @@ -2996,8 +3317,10 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -3008,55 +3331,89 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (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 ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_header_stdc=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then + $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no @@ -3068,13 +3425,16 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then + $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no @@ -3089,16 +3449,20 @@ if test $ac_cv_header_stdc = yes; then : else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <ctype.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else -# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif @@ -3109,7 +3473,7 @@ main () int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) + || toupper (i) != TOUPPER (i)) exit(2); exit (0); } @@ -3129,11 +3493,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi @@ -3158,7 +3523,7 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h + inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 @@ -3167,19 +3532,32 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3188,10 +3566,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -3218,18 +3597,31 @@ else echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <minix/config.h> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3238,10 +3630,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -3249,20 +3642,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <minix/config.h> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -3273,7 +3670,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -3281,19 +3679,36 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 @@ -3350,9 +3765,12 @@ else while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" + 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> /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -3362,12 +3780,6 @@ else int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3378,11 +3790,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3391,17 +3813,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext +rm -f conftest.err conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3410,10 +3843,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext - break +rm -f conftest.err conftest.$ac_objext + break done CC=$ac_save_CC rm -f conftest.$ac_ext @@ -3433,8 +3867,11 @@ else while :; do ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -3444,12 +3881,6 @@ else int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3460,11 +3891,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3473,12 +3914,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -3489,12 +3934,6 @@ rm -f conftest.$ac_objext conftest.$ac_ext int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3505,11 +3944,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3518,9 +3967,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi @@ -3542,8 +3992,11 @@ else while :; do ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, @@ -3553,12 +4006,6 @@ else int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3569,11 +4016,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3582,12 +4039,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #define _LARGE_FILES 1 #include <sys/types.h> /* Check that off_t can represent 2**63 - 1 correctly. @@ -3598,12 +4059,6 @@ rm -f conftest.$ac_objext conftest.$ac_ext int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3614,11 +4069,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -3627,9 +4092,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext break done fi @@ -3647,22 +4113,22 @@ fi +SIGNAMES_O= SIGNAMES_H=lsignames.h +CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in *-cygwin*) cross_cache=${srcdir}/cross-build/cygwin32.cache - SIGNAMES_H='$(srcdir)/cross-build/win32sig.h' ;; *-mingw*) cross_cache=${srcdir}/cross-build/cygwin32.cache ;; i[3456]86-*-beos*) cross_cache=${srcdir}/cross-build/x86-beos.cache - SIGNAMES_H='${srcdir}/cross-build/beos-sig.h' ;; *) echo "configure: cross-compiling for $host is not supported" >&2 ;; @@ -3672,11 +4138,13 @@ if test "x$cross_compiling" = "xyes"; then . ${cross_cache} fi unset cross_cache + SIGNAMES_O='signames.o' CROSS_COMPILE='-DCROSS_COMPILING' fi + if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then CC_FOR_BUILD='$(CC)' @@ -3738,13 +4206,16 @@ if test "${ac_cv_prog_gcc_traditional+set}" = set; then else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sgtty.h> Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no @@ -3754,13 +4225,16 @@ rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <termio.h> Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "$ac_pattern" >/dev/null 2>&1; then + $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* @@ -3799,49 +4273,73 @@ if test "${ac_cv_func_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define tgetent innocuous_tgetent + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tgetent (); below. */ -#include <assert.h> + which can conflict with char tgetent (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef tgetent + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_tgetent) || defined (__stub___tgetent) choke me #else -f = tgetent; +char (*f) () = tgetent; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != tgetent; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3850,10 +4348,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5 echo "${ECHO_T}$ac_cv_func_tgetent" >&6 @@ -3868,8 +4368,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -3878,12 +4381,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3894,11 +4391,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3907,10 +4414,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_termcap_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 @@ -3926,8 +4435,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -3936,12 +4448,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -3952,11 +4458,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3965,10 +4481,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_tinfo_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5 @@ -3984,8 +4502,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -3994,12 +4515,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -4010,11 +4525,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4023,10 +4548,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_curses_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5 @@ -4042,8 +4569,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -4052,12 +4582,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -4068,11 +4592,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4081,10 +4615,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ncurses_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5 @@ -4167,8 +4703,11 @@ else ac_cv_rl_version='4.2' else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <readline/readline.h> @@ -4205,11 +4744,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_rl_version='0.0' fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -4402,6 +4942,7 @@ fi # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 @@ -4418,6 +4959,7 @@ do case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -4425,20 +4967,20 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi done done ;; @@ -4626,15 +5168,15 @@ fi done test -n "$YACC" || YACC="yacc" -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: - @echo 'ac_maketemp="${MAKE}"' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` @@ -4688,118 +5230,18 @@ cat >>confdefs.h <<\_ACEOF _ACEOF -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 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 - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -fi -rm -f conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -4856,11 +5298,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -4869,10 +5321,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_const=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 @@ -4892,21 +5345,35 @@ else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifndef __cplusplus -static $ac_kw int static_foo () {return 0; } -$ac_kw int foo () {return 0; } +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -4915,25 +5382,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 + + case $ac_cv_c_inline in inline | yes) ;; - no) -cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF - ;; - *) cat >>confdefs.h <<_ACEOF -#define inline $ac_cv_c_inline + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif _ACEOF - ;; + ;; esac echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 @@ -4943,17 +5415,14 @@ if test "${ac_cv_c_bigendian+set}" = set; then else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -4967,11 +5436,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -4979,17 +5458,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/param.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5003,11 +5479,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -5016,32 +5502,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_bigendian=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + # It does not; compile a test program. if test "$cross_compiling" = yes; then - # try to guess the endianess by grep'ing values into an object file + # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5052,20 +5537,30 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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 - if fgrep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi -if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -5075,13 +5570,17 @@ if fgrep LiTTleEnDian conftest.$ac_objext >/dev/null ; then fi else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int main () { @@ -5110,14 +5609,15 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_c_bigendian=yes fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 @@ -5131,9 +5631,9 @@ _ACEOF no) ;; *) - { { echo "$as_me:$LINENO: error: unknown endianess + { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianess +echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac @@ -5144,14 +5644,17 @@ if test "${ac_cv_c_stringize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #define x(y) #y char *s = x(teststring); _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "#teststring" >/dev/null 2>&1; then + $EGREP "#teststring" >/dev/null 2>&1; then ac_cv_c_stringize=no else ac_cv_c_stringize=yes @@ -5175,21 +5678,18 @@ if test "${ac_cv_c_long_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <float.h> long double foo = 0.0; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { static int test_array [1 - 2 * !(/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug. */ - (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) + (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG))]; test_array [0] = 0 @@ -5199,11 +5699,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -5212,10 +5722,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_long_double=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_long_double=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_long_double" >&5 echo "${ECHO_T}$ac_cv_c_long_double" >&6 @@ -5254,15 +5765,12 @@ if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5275,11 +5783,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -5288,10 +5806,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_c_char_unsigned=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 @@ -5607,7 +6126,7 @@ echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 rm -f messages.po fi - ac_config_commands="$ac_config_commands default-1" + ac_config_commands="$ac_config_commands default-1" echo "$as_me:$LINENO: checking for off_t" >&5 @@ -5616,15 +6135,12 @@ if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5638,11 +6154,21 @@ if (sizeof (off_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -5651,10 +6177,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_off_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 @@ -5674,15 +6201,12 @@ if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5696,11 +6220,21 @@ if (sizeof (size_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -5709,10 +6243,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_size_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 @@ -5734,15 +6269,12 @@ if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <alloca.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5753,11 +6285,21 @@ char *p = (char *) alloca (2 * sizeof (int)); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5766,10 +6308,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_working_alloca_h=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 @@ -5787,8 +6331,11 @@ if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else @@ -5810,12 +6357,6 @@ char *alloca (); # endif #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -5826,11 +6367,21 @@ char *p = (char *) alloca (1); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5839,10 +6390,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_alloca_works=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 @@ -5872,8 +6425,11 @@ if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else @@ -5882,7 +6438,7 @@ wenotbecray _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then + $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no @@ -5901,49 +6457,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5952,10 +6532,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -5980,8 +6562,11 @@ else ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int find_stack_direction () { @@ -6017,11 +6602,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 @@ -6052,18 +6638,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -6072,10 +6671,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -6083,20 +6683,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -6107,7 +6711,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -6115,26 +6720,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -6159,49 +6781,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6210,10 +6856,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -6234,8 +6882,11 @@ else ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc @@ -6338,9 +6989,9 @@ main () data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) + MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) @@ -6378,11 +7029,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 @@ -6403,8 +7055,11 @@ if test "${ac_cv_gnu_library_2_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <features.h> #ifdef __GNU_LIBRARY__ @@ -6415,7 +7070,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "Lucky GNU user" >/dev/null 2>&1; then + $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no @@ -6451,8 +7106,11 @@ else else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <signal.h> @@ -6506,11 +7164,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) gt_cv_int_divbyzero_sigfpe=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -6533,16 +7192,13 @@ if test "${jm_ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <inttypes.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -6553,11 +7209,21 @@ uintmax_t i = (uintmax_t) -1; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -6566,10 +7232,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 jm_ac_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + jm_ac_cv_header_inttypes_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 @@ -6588,16 +7255,13 @@ if test "${jm_ac_cv_header_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <stdint.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -6608,11 +7272,21 @@ uintmax_t i = (uintmax_t) -1; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -6621,10 +7295,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 jm_ac_cv_header_stdint_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + jm_ac_cv_header_stdint_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 @@ -6643,15 +7318,12 @@ if test "${ac_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ unsigned long long ull = 1; int i = 63; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -6663,11 +7335,21 @@ unsigned long long ullmax = (unsigned long long) -1; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6676,10 +7358,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_type_unsigned_long_long=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_unsigned_long_long=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 @@ -6720,16 +7404,13 @@ if test "${gt_cv_header_inttypes_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <inttypes.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -6740,11 +7421,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -6753,10 +7444,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 gt_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + gt_cv_header_inttypes_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 @@ -6779,19 +7471,16 @@ if test "${gt_cv_inttypes_pri_broken+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <inttypes.h> #ifdef PRId32 char *p = PRId32; #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -6802,11 +7491,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -6815,10 +7514,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 gt_cv_inttypes_pri_broken=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + gt_cv_inttypes_pri_broken=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 @@ -7404,18 +8104,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -7424,10 +8137,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -7435,20 +8149,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -7459,7 +8177,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -7467,26 +8186,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -7535,49 +8271,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7586,10 +8346,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -7641,16 +8403,13 @@ else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <iconv.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -7663,11 +8422,21 @@ iconv_t cd = iconv_open("",""); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7676,23 +8445,22 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <iconv.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -7705,11 +8473,21 @@ iconv_t cd = iconv_open("",""); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7719,9 +8497,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi @@ -7756,8 +8536,11 @@ echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> #include <iconv.h> @@ -7771,12 +8554,6 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si size_t iconv(); #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -7787,11 +8564,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -7800,10 +8587,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + am_cv_proto_iconv_arg1="const" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi @@ -7826,15 +8614,12 @@ if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <langinfo.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -7845,11 +8630,21 @@ char* cs = nl_langinfo(CODESET); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7858,10 +8653,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + am_cv_langinfo_codeset=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 @@ -7882,15 +8679,12 @@ if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <locale.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -7901,11 +8695,21 @@ return LC_MESSAGES _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -7914,10 +8718,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + am_cv_val_LC_MESSAGES=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 @@ -8057,17 +8863,14 @@ if test "${gt_cv_func_gnugettext2_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <libintl.h> extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8079,11 +8882,21 @@ return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8092,10 +8905,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 gt_cv_func_gnugettext2_libc=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + gt_cv_func_gnugettext2_libc=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6 @@ -8490,8 +9305,11 @@ else gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <libintl.h> extern int _nl_msg_cat_cntr; extern @@ -8499,12 +9317,6 @@ extern "C" #endif const char *_nl_expand_alias (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8516,11 +9328,21 @@ return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8529,15 +9351,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 gt_cv_func_gnugettext2_libintl=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + gt_cv_func_gnugettext2_libintl=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <libintl.h> extern int _nl_msg_cat_cntr; extern @@ -8545,12 +9372,6 @@ extern "C" #endif const char *_nl_expand_alias (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8562,11 +9383,21 @@ return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8578,9 +9409,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" @@ -8752,17 +9585,14 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <$ac_hdr> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8774,11 +9604,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -8787,10 +9627,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=no" fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -8813,8 +9654,11 @@ else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8823,12 +9667,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8839,11 +9677,21 @@ opendir (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8852,15 +9700,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8869,12 +9722,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8885,11 +9732,21 @@ opendir (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8899,9 +9756,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -8922,8 +9781,11 @@ else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8932,12 +9794,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8948,11 +9804,21 @@ opendir (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -8961,15 +9827,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -8978,12 +9849,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -8994,11 +9859,21 @@ opendir (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9008,9 +9883,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS @@ -9030,18 +9907,15 @@ if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/time.h> #include <time.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -9053,11 +9927,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9066,10 +9950,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_time=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 @@ -9100,18 +9985,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9120,10 +10018,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -9131,20 +10030,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -9155,7 +10058,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9163,26 +10067,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -9236,18 +10157,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9256,10 +10190,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -9267,20 +10202,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -9291,7 +10230,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9299,26 +10239,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -9363,18 +10320,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9383,10 +10353,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -9394,20 +10365,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -9418,7 +10393,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9426,26 +10402,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -9478,18 +10471,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9498,10 +10504,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -9509,20 +10516,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -9533,7 +10544,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -9541,26 +10553,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -9582,8 +10611,11 @@ if test "${ac_cv_header_sys_ptem_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if HAVE_SYS_STREAM_H # include <sys/stream.h> @@ -9594,11 +10626,21 @@ else _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9607,10 +10649,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_header_sys_ptem_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_ptem_h=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_ptem_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_ptem_h" >&6 @@ -9625,15 +10668,12 @@ if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <alloca.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -9644,11 +10684,21 @@ char *p = (char *) alloca (2 * sizeof (int)); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9657,10 +10707,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_working_alloca_h=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 @@ -9678,8 +10730,11 @@ if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else @@ -9701,12 +10756,6 @@ char *alloca (); # endif #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -9717,11 +10766,21 @@ char *p = (char *) alloca (1); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9730,10 +10789,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_alloca_works=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 @@ -9763,8 +10824,11 @@ if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else @@ -9773,7 +10837,7 @@ wenotbecray _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "webecray" >/dev/null 2>&1; then + $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no @@ -9792,49 +10856,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -9843,10 +10931,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -9871,8 +10961,11 @@ else ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ int find_stack_direction () { @@ -9908,11 +11001,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 @@ -9932,15 +11026,12 @@ if test "${ac_cv_func_getpgrp_void+set}" = set; then else # Use it with a single arg. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -9951,11 +11042,21 @@ getpgrp (0); _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -9964,10 +11065,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_func_getpgrp_void=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_getpgrp_void=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 @@ -9985,26 +11087,113 @@ echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } + ac_cv_func_setvbuf_reversed=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdio.h> +# if PROTOTYPES + int (setvbuf) (FILE *, int, char *, size_t); +# endif +int +main () +{ +char buf; return setvbuf (stdout, _IOLBF, &buf, 1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdio.h> +# if PROTOTYPES + int (setvbuf) (FILE *, int, char *, size_t); +# endif +int +main () +{ +char buf; return setvbuf (stdout, &buf, _IOLBF, 1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + # It compiles and links either way, so it must not be declared + # with a prototype and most likely this is a K&R C compiler. + # Try running it. + if test "$cross_compiling" = yes; then + : # Assume setvbuf is not reversed when cross-compiling. else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> -/* If setvbuf has the reversed format, exit 0. */ int main () { - /* This call has the arguments reversed. - A reversed system may check and see that the address of main - is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ - if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) - exit(1); - putc('\r', stdout); - exit(0); /* Non-reversed systems segv here. */ +/* This call has the arguments reversed. + A reversed system may check and see that the address of buf + is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ + char buf; + if (setvbuf (stdout, _IOLBF, &buf, 1) != 0) + exit (1); + putchar ('\r'); + exit (0); /* Non-reversed systems SEGV here. */ + ; + return 0; } _ACEOF rm -f conftest$ac_exeext @@ -10022,13 +11211,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -ac_cv_func_setvbuf_reversed=no +rm -f core *.core +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + ac_cv_func_setvbuf_reversed=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f core core.* *.core +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_setvbuf_reversed" >&5 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 @@ -10050,49 +11254,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10101,10 +11329,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10119,49 +11349,73 @@ if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define _doprnt innocuous__doprnt + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. */ -#include <assert.h> + which can conflict with char _doprnt (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef _doprnt + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else -f = _doprnt; +char (*f) () = _doprnt; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10170,10 +11424,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func__doprnt=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 @@ -10198,15 +11454,12 @@ else ac_cv_func_strcoll_works=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -10232,11 +11485,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_func_strcoll_works=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_strcoll_works" >&5 @@ -10265,13 +11519,16 @@ if test "$ac_cv_func_vprintf" = no; then echo "$as_me:$LINENO: checking for declaration of vprintf in stdio.h" >&5 echo $ECHO_N "checking for declaration of vprintf in stdio.h... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then + $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then ac_cv_func_vprintf=yes fi rm -f conftest* @@ -10287,7 +11544,14 @@ _ACEOF fi if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then - LIBOBJS="$LIBOBJS vprint.$ac_objext" + case $LIBOBJS in + "vprint.$ac_objext" | \ + *" vprint.$ac_objext" | \ + "vprint.$ac_objext "* | \ + *" vprint.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS vprint.$ac_objext" ;; +esac + fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 @@ -10296,8 +11560,11 @@ if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> #ifdef signal @@ -10309,12 +11576,6 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -10325,11 +11586,21 @@ int i; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -10338,10 +11609,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_signal=int fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 @@ -10358,49 +11630,73 @@ if test "${ac_cv_func___setostype+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define __setostype to an innocuous variant, in case <limits.h> declares __setostype. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define __setostype innocuous___setostype + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char __setostype (); below. */ -#include <assert.h> + which can conflict with char __setostype (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef __setostype + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char __setostype (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub___setostype) || defined (__stub_____setostype) choke me #else -f = __setostype; +char (*f) () = __setostype; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != __setostype; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10409,10 +11705,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func___setostype=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func___setostype=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func___setostype" >&5 echo "${ECHO_T}$ac_cv_func___setostype" >&6 @@ -10429,49 +11727,73 @@ if test "${ac_cv_func_wait3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wait3 innocuous_wait3 + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wait3 (); below. */ -#include <assert.h> + which can conflict with char wait3 (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wait3 + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char wait3 (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_wait3) || defined (__stub___wait3) choke me #else -f = wait3; +char (*f) () = wait3; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != wait3; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10480,10 +11802,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_wait3=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_wait3=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5 echo "${ECHO_T}$ac_cv_func_wait3" >&6 @@ -10500,49 +11824,73 @@ if test "${ac_cv_func_isinf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define isinf to an innocuous variant, in case <limits.h> declares isinf. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define isinf innocuous_isinf + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char isinf (); below. */ -#include <assert.h> + which can conflict with char isinf (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef isinf + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char isinf (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_isinf) || defined (__stub___isinf) choke me #else -f = isinf; +char (*f) () = isinf; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != isinf; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10551,10 +11899,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_isinf=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_isinf=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5 echo "${ECHO_T}$ac_cv_func_isinf" >&6 @@ -10565,6 +11915,103 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for isnan" >&5 +echo $ECHO_N "checking for isnan... $ECHO_C" >&6 +if test "${ac_cv_func_isnan+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. */ +/* Define isnan to an innocuous variant, in case <limits.h> declares isnan. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define isnan innocuous_isnan + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char isnan (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef isnan + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char isnan (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_isnan) || defined (__stub___isnan) +choke me +#else +char (*f) () = isnan; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != isnan; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + ac_cv_func_isnan=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_isnan=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5 +echo "${ECHO_T}$ac_cv_func_isnan" >&6 +if test $ac_cv_func_isnan = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_LIBC 1 +_ACEOF + +fi + echo "$as_me:$LINENO: checking for mkfifo" >&5 echo $ECHO_N "checking for mkfifo... $ECHO_C" >&6 @@ -10572,49 +12019,73 @@ if test "${ac_cv_func_mkfifo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mkfifo to an innocuous variant, in case <limits.h> declares mkfifo. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define mkfifo innocuous_mkfifo + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mkfifo (); below. */ -#include <assert.h> + which can conflict with char mkfifo (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef mkfifo + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mkfifo (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_mkfifo) || defined (__stub___mkfifo) choke me #else -f = mkfifo; +char (*f) () = mkfifo; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != mkfifo; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10623,10 +12094,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_mkfifo=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_mkfifo=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_mkfifo" >&5 echo "${ECHO_T}$ac_cv_func_mkfifo" >&6 @@ -10664,10 +12137,11 @@ fi -for ac_func in dup2 fcntl getdtablesize getgroups gethostname getpagesize \ - getpeername getrlimit getrusage gettimeofday kill killpg \ - lstat readlink sbrk select setdtablesize tcgetpgrp uname \ - ulimit waitpid + +for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \ + getpagesize getpeername getrlimit getrusage gettimeofday \ + kill killpg lstat readlink sbrk select setdtablesize \ + tcgetpgrp uname ulimit waitpid do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -10676,49 +12150,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10727,10 +12225,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10752,49 +12252,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10803,10 +12327,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10816,7 +12342,14 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; +esac + fi done @@ -10862,49 +12395,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10913,10 +12470,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -10942,49 +12501,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -10993,10 +12576,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -11023,49 +12608,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11074,10 +12683,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -11101,49 +12712,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11152,10 +12787,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -11184,49 +12821,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11235,10 +12896,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -11248,7 +12911,14 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; +esac + fi done @@ -11269,49 +12939,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11320,10 +13014,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -11333,7 +13029,14 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then _ACEOF else - LIBOBJS="$LIBOBJS $ac_func.$ac_objext" + case $LIBOBJS in + "$ac_func.$ac_objext" | \ + *" $ac_func.$ac_objext" | \ + "$ac_func.$ac_objext "* | \ + *" $ac_func.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; +esac + fi done @@ -11345,15 +13048,12 @@ if test "${ac_cv_have_decl_confstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11367,11 +13067,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11380,10 +13090,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_confstr=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_confstr=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_confstr" >&5 echo "${ECHO_T}$ac_cv_have_decl_confstr" >&6 @@ -11409,15 +13120,12 @@ if test "${ac_cv_have_decl_printf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11431,11 +13139,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11444,10 +13162,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_printf=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_printf=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_printf" >&5 echo "${ECHO_T}$ac_cv_have_decl_printf" >&6 @@ -11473,15 +13192,12 @@ if test "${ac_cv_have_decl_sbrk+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11495,11 +13211,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11508,10 +13234,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_sbrk=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_sbrk=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5 echo "${ECHO_T}$ac_cv_have_decl_sbrk" >&6 @@ -11531,21 +13258,90 @@ _ACEOF fi +echo "$as_me:$LINENO: checking whether setregid is declared" >&5 +echo $ECHO_N "checking whether setregid is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_setregid+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. */ +$ac_includes_default +int +main () +{ +#ifndef setregid + char *p = (char *) setregid; +#endif + + ; + 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 + ac_cv_have_decl_setregid=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_setregid=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_setregid" >&5 +echo "${ECHO_T}$ac_cv_have_decl_setregid" >&6 +if test $ac_cv_have_decl_setregid = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETREGID 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SETREGID 0 +_ACEOF + + +fi + + echo "$as_me:$LINENO: checking whether strcpy is declared" >&5 echo $ECHO_N "checking whether strcpy is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl_strcpy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11559,11 +13355,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11572,10 +13378,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_strcpy=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_strcpy=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_strcpy" >&5 echo "${ECHO_T}$ac_cv_have_decl_strcpy" >&6 @@ -11601,15 +13408,12 @@ if test "${ac_cv_have_decl_strsignal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11623,11 +13427,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11636,10 +13450,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_strsignal=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_strsignal=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5 echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6 @@ -11666,15 +13481,12 @@ if test "${ac_cv_have_decl_strtold+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11688,11 +13500,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11701,10 +13523,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_have_decl_strtold=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_decl_strtold=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtold" >&5 echo "${ECHO_T}$ac_cv_have_decl_strtold" >&6 @@ -11721,15 +13544,12 @@ echo $ECHO_N "checking for broken strtold... $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11740,11 +13560,21 @@ int main() { long double r; char *foo, bar; r = strtold(foo, &bar);} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -11753,10 +13583,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_strtold_broken=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_strtold_broken=yes fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -11790,8 +13621,11 @@ if test "${bash_cv_decl_strtoimax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -11800,12 +13634,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11816,11 +13644,21 @@ return !strtoimax; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11829,10 +13667,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtoimax=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtoimax=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtoimax" >&5 echo "${ECHO_T}$bash_cv_decl_strtoimax" >&6 @@ -11858,8 +13698,11 @@ if test "${bash_cv_decl_strtol+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -11868,12 +13711,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11884,11 +13721,21 @@ return !strtol; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11897,10 +13744,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtol=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtol=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtol" >&5 echo "${ECHO_T}$bash_cv_decl_strtol" >&6 @@ -11926,8 +13775,11 @@ if test "${bash_cv_decl_strtoll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -11936,12 +13788,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -11952,11 +13798,21 @@ return !strtoll; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -11965,10 +13821,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtoll=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtoll=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtoll" >&5 echo "${ECHO_T}$bash_cv_decl_strtoll" >&6 @@ -11994,8 +13852,11 @@ if test "${bash_cv_decl_strtoul+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -12004,12 +13865,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -12020,11 +13875,21 @@ return !strtoul; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12033,10 +13898,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtoul=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtoul=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtoul" >&5 echo "${ECHO_T}$bash_cv_decl_strtoul" >&6 @@ -12062,8 +13929,11 @@ if test "${bash_cv_decl_strtoull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -12072,12 +13942,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -12088,11 +13952,21 @@ return !strtoull; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12101,10 +13975,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtoull=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtoull=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtoull" >&5 echo "${ECHO_T}$bash_cv_decl_strtoull" >&6 @@ -12130,8 +14006,11 @@ if test "${bash_cv_decl_strtoumax+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS # include <stdlib.h> @@ -12140,12 +14019,6 @@ else # include <inttypes.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -12156,11 +14029,21 @@ return !strtoumax; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12169,10 +14052,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_decl_strtoumax=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_strtoumax=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_strtoumax" >&5 echo "${ECHO_T}$bash_cv_decl_strtoumax" >&6 @@ -12192,7 +14077,8 @@ fi -for ac_header in sys/time.h unistd.h + +for ac_header in stdlib.h sys/time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -12208,18 +14094,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -12228,10 +14127,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -12239,20 +14139,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -12263,7 +14167,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -12271,26 +14176,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -12315,49 +14237,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12366,10 +14312,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -12390,8 +14338,11 @@ else ac_cv_func_working_mktime=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #if TIME_WITH_SYS_TIME # include <sys/time.h> @@ -12404,6 +14355,10 @@ else # endif #endif +#if HAVE_STDLIB_H +# include <stdlib.h> +#endif + #if HAVE_UNISTD_H # include <unistd.h> #endif @@ -12416,10 +14371,11 @@ else #undef putenv static time_t time_t_max; +static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *const tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -12450,15 +14406,21 @@ spring_forward_gap () } static void -mktime_test (now) +mktime_test1 (now) time_t now; { struct tm *lt; if ((lt = localtime (&now)) && mktime (lt) != now) exit (1); - now = time_t_max - now; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); +} + +static void +mktime_test (now) + time_t now; +{ + mktime_test1 (now); + mktime_test1 ((time_t) (time_t_max - now)); + mktime_test1 ((time_t) (time_t_min + now)); } static void @@ -12518,6 +14480,9 @@ main () for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) continue; time_t_max--; + if ((time_t) -1 < 0) + for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) + continue; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { @@ -12526,11 +14491,12 @@ main () for (t = 0; t <= time_t_max - delta; t += delta) mktime_test (t); - mktime_test ((time_t) 60 * 60); - mktime_test ((time_t) 60 * 60 * 24); + mktime_test ((time_t) 1); + mktime_test ((time_t) (60 * 60)); + mktime_test ((time_t) (60 * 60 * 24)); for (j = 1; 0 < j; j *= 2) - bigtime_test (j); + bigtime_test (j); bigtime_test (j - 1); } irix_6_4_bug (); @@ -12553,17 +14519,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_func_working_mktime=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 echo "${ECHO_T}$ac_cv_func_working_mktime" >&6 if test $ac_cv_func_working_mktime = no; then - LIBOBJS="$LIBOBJS mktime.$ac_objext" + case $LIBOBJS in + "mktime.$ac_objext" | \ + *" mktime.$ac_objext" | \ + "mktime.$ac_objext "* | \ + *" mktime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; +esac + fi @@ -12589,18 +14563,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -12609,10 +14596,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -12620,20 +14608,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -12644,7 +14636,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -12652,26 +14645,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -12705,18 +14715,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -12725,10 +14748,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -12736,20 +14760,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -12760,7 +14788,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -12768,26 +14797,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -12812,49 +14858,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -12863,10 +14933,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -12887,8 +14959,11 @@ else ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc @@ -12991,9 +15066,9 @@ main () data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); - data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) + MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) @@ -13031,11 +15106,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 @@ -13068,49 +15144,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13119,10 +15219,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -13164,18 +15266,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -13184,10 +15299,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -13195,20 +15311,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -13219,7 +15339,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13227,26 +15348,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -13278,18 +15416,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -13298,10 +15449,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -13309,20 +15461,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -13333,7 +15489,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13341,26 +15498,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -13392,18 +15566,31 @@ else echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -13412,10 +15599,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 @@ -13423,20 +15611,24 @@ echo "${ECHO_T}$ac_header_compiler" >&6 echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err + grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi @@ -13447,7 +15639,8 @@ if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -13455,26 +15648,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? -case $ac_header_compiler:$ac_header_preproc in - yes:no ) +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; - no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-bash@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=$ac_header_preproc" + eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 @@ -13496,49 +15706,73 @@ if test "${ac_cv_func_mbsrtowcs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mbsrtowcs to an innocuous variant, in case <limits.h> declares mbsrtowcs. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define mbsrtowcs innocuous_mbsrtowcs + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbsrtowcs (); below. */ -#include <assert.h> + which can conflict with char mbsrtowcs (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef mbsrtowcs + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mbsrtowcs (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs) choke me #else -f = mbsrtowcs; +char (*f) () = mbsrtowcs; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != mbsrtowcs; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13547,10 +15781,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_mbsrtowcs=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_mbsrtowcs=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5 echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6 @@ -13561,215 +15797,391 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for mbrtowc" >&5 -echo $ECHO_N "checking for mbrtowc... $ECHO_C" >&6 -if test "${ac_cv_func_mbrtowc+set}" = set; then +echo "$as_me:$LINENO: checking for mbrlen" >&5 +echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6 +if test "${ac_cv_func_mbrlen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define mbrlen to an innocuous variant, in case <limits.h> declares mbrlen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define mbrlen innocuous_mbrlen + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbrtowc (); below. */ -#include <assert.h> + which can conflict with char mbrlen (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef mbrlen + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char mbrtowc (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ +char mbrlen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_mbrtowc) || defined (__stub___mbrtowc) +#if defined (__stub_mbrlen) || defined (__stub___mbrlen) choke me #else -f = mbrtowc; +char (*f) () = mbrlen; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != mbrlen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (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 - ac_cv_func_mbrtowc=yes + ac_cv_func_mbrlen=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_func_mbrtowc=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_mbrlen=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 -echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6 -if test $ac_cv_func_mbrtowc = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5 +echo "${ECHO_T}$ac_cv_func_mbrlen" >&6 +if test $ac_cv_func_mbrlen = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_MBRTOWC 1 +#define HAVE_MBRLEN 1 _ACEOF fi -echo "$as_me:$LINENO: checking for mbrlen" >&5 -echo $ECHO_N "checking for mbrlen... $ECHO_C" >&6 -if test "${ac_cv_func_mbrlen+set}" = set; then + +echo "$as_me:$LINENO: checking for wcrtomb" >&5 +echo $ECHO_N "checking for wcrtomb... $ECHO_C" >&6 +if test "${ac_cv_func_wcrtomb+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wcrtomb to an innocuous variant, in case <limits.h> declares wcrtomb. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wcrtomb innocuous_wcrtomb + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mbrlen (); below. */ -#include <assert.h> + which can conflict with char wcrtomb (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wcrtomb + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char mbrlen (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ +char wcrtomb (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_mbrlen) || defined (__stub___mbrlen) +#if defined (__stub_wcrtomb) || defined (__stub___wcrtomb) choke me #else -f = mbrlen; +char (*f) () = wcrtomb; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != wcrtomb; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (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 - ac_cv_func_mbrlen=yes + ac_cv_func_wcrtomb=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_func_mbrlen=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_wcrtomb=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5 -echo "${ECHO_T}$ac_cv_func_mbrlen" >&6 -if test $ac_cv_func_mbrlen = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_wcrtomb" >&5 +echo "${ECHO_T}$ac_cv_func_wcrtomb" >&6 +if test $ac_cv_func_wcrtomb = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_MBRLEN 1 +#define HAVE_WCRTOMB 1 _ACEOF fi -echo "$as_me:$LINENO: checking for wctomb" >&5 -echo $ECHO_N "checking for wctomb... $ECHO_C" >&6 -if test "${ac_cv_func_wctomb+set}" = set; then +echo "$as_me:$LINENO: checking for wcscoll" >&5 +echo $ECHO_N "checking for wcscoll... $ECHO_C" >&6 +if test "${ac_cv_func_wcscoll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wcscoll to an innocuous variant, in case <limits.h> declares wcscoll. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wcscoll innocuous_wcscoll + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wctomb (); below. */ -#include <assert.h> + which can conflict with char wcscoll (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wcscoll + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char wctomb (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } +char wcscoll (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_wcscoll) || defined (__stub___wcscoll) +choke me +#else +char (*f) () = wcscoll; +#endif +#ifdef __cplusplus +} #endif + int main () { +return f != wcscoll; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + ac_cv_func_wcscoll=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_wcscoll=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_wcscoll" >&5 +echo "${ECHO_T}$ac_cv_func_wcscoll" >&6 +if test $ac_cv_func_wcscoll = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_WCSCOLL 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for wcsdup" >&5 +echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6 +if test "${ac_cv_func_wcsdup+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. */ +/* Define wcsdup to an innocuous variant, in case <limits.h> declares wcsdup. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wcsdup innocuous_wcsdup + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char wcsdup (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wcsdup + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char wcsdup (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wctomb) || defined (__stub___wctomb) +#if defined (__stub_wcsdup) || defined (__stub___wcsdup) choke me #else -f = wctomb; +char (*f) () = wcsdup; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != wcsdup; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (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 - ac_cv_func_wctomb=yes + ac_cv_func_wcsdup=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_func_wctomb=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_wcsdup=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wctomb" >&5 -echo "${ECHO_T}$ac_cv_func_wctomb" >&6 -if test $ac_cv_func_wctomb = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5 +echo "${ECHO_T}$ac_cv_func_wcsdup" >&6 +if test $ac_cv_func_wcsdup = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_WCTOMB 1 +#define HAVE_WCSDUP 1 _ACEOF fi @@ -13780,49 +16192,73 @@ if test "${ac_cv_func_wcwidth+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wcwidth to an innocuous variant, in case <limits.h> declares wcwidth. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wcwidth innocuous_wcwidth + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcwidth (); below. */ -#include <assert.h> + which can conflict with char wcwidth (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wcwidth + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char wcwidth (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_wcwidth) || defined (__stub___wcwidth) choke me #else -f = wcwidth; +char (*f) () = wcwidth; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != wcwidth; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -13831,10 +16267,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_wcwidth=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_wcwidth=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5 echo "${ECHO_T}$ac_cv_func_wcwidth" >&6 @@ -13845,150 +16283,293 @@ _ACEOF fi -echo "$as_me:$LINENO: checking for wcsdup" >&5 -echo $ECHO_N "checking for wcsdup... $ECHO_C" >&6 -if test "${ac_cv_func_wcsdup+set}" = set; then +echo "$as_me:$LINENO: checking for wctype" >&5 +echo $ECHO_N "checking for wctype... $ECHO_C" >&6 +if test "${ac_cv_func_wctype+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define wctype to an innocuous variant, in case <limits.h> declares wctype. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define wctype innocuous_wctype + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char wcsdup (); below. */ -#include <assert.h> + which can conflict with char wctype (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef wctype + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char wcsdup (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ +char wctype (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_wcsdup) || defined (__stub___wcsdup) +#if defined (__stub_wctype) || defined (__stub___wctype) choke me #else -f = wcsdup; +char (*f) () = wctype; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != wctype; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (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 - ac_cv_func_wcsdup=yes + ac_cv_func_wctype=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_func_wcsdup=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_wctype=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5 -echo "${ECHO_T}$ac_cv_func_wcsdup" >&6 -if test $ac_cv_func_wcsdup = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5 +echo "${ECHO_T}$ac_cv_func_wctype" >&6 +if test $ac_cv_func_wctype = yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_WCSDUP 1 +#define HAVE_WCTYPE 1 _ACEOF fi -echo "$as_me:$LINENO: checking for mbstate_t" >&5 -echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 -if test "${bash_cv_have_mbstate_t+set}" = set; then + + echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6 +if test "${ac_cv_func_mbrtowc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" - +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <wchar.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { - - mbstate_t ps; - mbstate_t *psp; - psp = (mbstate_t *)0; - +mbstate_t state; return ! (sizeof state && mbrtowc); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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 -s conftest.$ac_objext' + { 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_exeext' { (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 - bash_cv_have_mbstate_t=yes + ac_cv_func_mbrtowc=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -bash_cv_have_mbstate_t=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_mbrtowc=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $bash_cv_have_mbstate_t" >&5 -echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6 -if test $bash_cv_have_mbstate_t = yes; then +echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6 + if test $ac_cv_func_mbrtowc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBRTOWC 1 +_ACEOF + + fi + +if test $ac_cv_func_mbrtowc = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MBSTATE_T 1 _ACEOF fi + + + + + +for ac_func in iswlower iswupper towlower towupper iswctype +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+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. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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_exeext' + { (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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${bash_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <langinfo.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -13999,11 +16580,21 @@ char* cs = nl_langinfo(CODESET); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14012,10 +16603,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_langinfo_codeset=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_langinfo_codeset" >&5 echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6 @@ -14026,6 +16619,199 @@ _ACEOF fi +echo "$as_me:$LINENO: checking for wchar_t in wchar.h" >&5 +echo $ECHO_N "checking for wchar_t in wchar.h... $ECHO_C" >&6 +if test "${bash_cv_type_wchar_t+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 <wchar.h> + +int +main () +{ + + wchar_t foo; + foo = 0; + + ; + 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 + bash_cv_type_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +bash_cv_type_wchar_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $bash_cv_type_wchar_t" >&5 +echo "${ECHO_T}$bash_cv_type_wchar_t" >&6 +if test $bash_cv_type_wchar_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCHAR_T 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for wctype_t in wctype.h" >&5 +echo $ECHO_N "checking for wctype_t in wctype.h... $ECHO_C" >&6 +if test "${bash_cv_type_wctype_t+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 <wctype.h> +int +main () +{ + + wctype_t foo; + foo = 0; + + ; + 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 + bash_cv_type_wctype_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +bash_cv_type_wctype_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $bash_cv_type_wctype_t" >&5 +echo "${ECHO_T}$bash_cv_type_wctype_t" >&6 +if test $bash_cv_type_wctype_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCTYPE_T 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for wint_t in wctype.h" >&5 +echo $ECHO_N "checking for wint_t in wctype.h... $ECHO_C" >&6 +if test "${bash_cv_type_wint_t+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 <wctype.h> +int +main () +{ + + wint_t foo; + foo = 0; + + ; + 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 + bash_cv_type_wint_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +bash_cv_type_wint_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $bash_cv_type_wint_t" >&5 +echo "${ECHO_T}$bash_cv_type_wint_t" >&6 +if test $bash_cv_type_wint_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINT_T 1 +_ACEOF + +fi + if test "$opt_static_link" != yes; then @@ -14038,8 +16824,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14048,12 +16837,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14064,11 +16847,21 @@ dlopen (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14077,10 +16870,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_dl_dlopen=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 @@ -14106,49 +16901,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -#include <assert.h> + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -f = $ac_func; +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14157,10 +16976,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_var=no" fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 @@ -14174,66 +16995,86 @@ done fi -echo "$as_me:$LINENO: checking for sys_siglist declaration in signal.h or unistd.h" >&5 -echo $ECHO_N "checking for sys_siglist declaration in signal.h or unistd.h... $ECHO_C" >&6 -if test "${ac_cv_decl_sys_siglist+set}" = set; then +echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 +echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_sys_siglist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <sys/types.h> +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <signal.h> /* NetBSD declares sys_siglist in unistd.h. */ #if HAVE_UNISTD_H # include <unistd.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif + int main () { -char *msg = *(sys_siglist + 1); +#ifndef sys_siglist + char *p = (char *) sys_siglist; +#endif + ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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 - ac_cv_decl_sys_siglist=yes + ac_cv_have_decl_sys_siglist=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_decl_sys_siglist=no +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_sys_siglist=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_decl_sys_siglist" >&5 -echo "${ECHO_T}$ac_cv_decl_sys_siglist" >&6 -if test $ac_cv_decl_sys_siglist = yes; then +echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 +echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6 +if test $ac_cv_have_decl_sys_siglist = yes; then -cat >>confdefs.h <<\_ACEOF -#define SYS_SIGLIST_DECLARED 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_SYS_SIGLIST 0 _ACEOF + fi + + if test "$ac_cv_func_inet_aton" != 'yes'; then echo "$as_me:$LINENO: checking for inet_aton" >&5 @@ -14242,19 +17083,16 @@ if test "${bash_cv_func_inet_aton+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> struct in_addr ap; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14265,11 +17103,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14278,10 +17126,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_func_inet_aton=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_func_inet_aton=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_func_inet_aton" >&5 echo "${ECHO_T}$bash_cv_func_inet_aton" >&6 @@ -14291,7 +17141,14 @@ if test $bash_cv_func_inet_aton = yes; then _ACEOF else - LIBOBJS="$LIBOBJS inet_aton.$ac_objext" + case $LIBOBJS in + "inet_aton.$ac_objext" | \ + *" inet_aton.$ac_objext" | \ + "inet_aton.$ac_objext "* | \ + *" inet_aton.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" ;; +esac + fi fi @@ -14306,8 +17163,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsun $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14316,12 +17176,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getpwent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14332,11 +17186,21 @@ getpwent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14345,10 +17209,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_sun_getpwent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_sun_getpwent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getpwent" >&5 @@ -14384,8 +17250,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket -lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14394,12 +17263,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char getpeername (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14410,11 +17273,21 @@ getpeername (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14423,10 +17296,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_socket_getpeername=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_socket_getpeername=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getpeername" >&5 @@ -14464,8 +17339,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -14474,12 +17352,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char t_open (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14490,11 +17362,21 @@ t_open (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14503,10 +17385,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_nsl_t_open=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_nsl_t_open=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 @@ -14552,15 +17436,12 @@ if test "${bash_cv_have_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <netdb.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14573,11 +17454,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -14586,10 +17477,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_have_gethostbyname=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_have_gethostbyname=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -14614,13 +17507,16 @@ if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then + $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no @@ -14652,8 +17548,11 @@ else ac_cv_type_getgroups=cross else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ #include <sys/types.h> #define NGID 256 @@ -14671,7 +17570,7 @@ main () for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, - gidset); + gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); @@ -14692,21 +17591,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <unistd.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int @@ -14729,15 +17632,12 @@ if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14751,11 +17651,21 @@ if (sizeof (off_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -14764,10 +17674,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_off_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 @@ -14787,15 +17698,12 @@ if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14809,11 +17717,21 @@ if (sizeof (mode_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -14822,10 +17740,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_mode_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6 @@ -14845,13 +17764,16 @@ if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uid_t" >/dev/null 2>&1; then + $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no @@ -14880,15 +17802,12 @@ if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14902,11 +17821,21 @@ if (sizeof (pid_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -14915,10 +17844,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_pid_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 @@ -14938,15 +17868,12 @@ if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -14960,11 +17887,21 @@ if (sizeof (size_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -14973,10 +17910,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_size_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 @@ -14996,15 +17934,12 @@ if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15018,11 +17953,21 @@ if (sizeof (ssize_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15031,10 +17976,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_ssize_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 @@ -15054,15 +18000,12 @@ if test "${ac_cv_type_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15076,11 +18019,21 @@ if (sizeof (time_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15089,10 +18042,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_time_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_time_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6 @@ -15114,16 +18068,13 @@ if test "${bash_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ long long ll = 1; int i = 63; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15137,11 +18088,21 @@ return ll << i | ll >> i | llm / ll | llm % ll; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15150,10 +18111,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_type_long_long='long long' else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_type_long_long='long' fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_type_long_long" >&5 echo "${ECHO_T}$bash_cv_type_long_long" >&6 @@ -15171,16 +18134,13 @@ if test "${bash_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ unsigned long long ull = 1; int i = 63; -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15194,11 +18154,21 @@ return ull << i | ull >> i | ullmax / ull | ullmax % ull; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -15207,10 +18177,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_type_unsigned_long_long='unsigned long long' else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_type_unsigned_long_long='unsigned long' fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$bash_cv_type_unsigned_long_long" >&6 @@ -15228,8 +18200,11 @@ if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> #ifdef signal @@ -15241,12 +18216,6 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15257,11 +18226,21 @@ int i; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15270,10 +18249,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_signal=int fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 @@ -15290,15 +18270,12 @@ if test "${ac_cv_type_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15312,11 +18289,21 @@ if (sizeof (char)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15325,10 +18312,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_char=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_char=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 echo "${ECHO_T}$ac_cv_type_char" >&6 @@ -15346,15 +18334,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15367,11 +18352,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15380,15 +18375,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15401,11 +18393,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15414,29 +18416,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15449,11 +18450,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15462,15 +18473,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15483,11 +18491,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15496,37 +18514,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15539,11 +18556,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15552,37 +18579,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_char=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5 -echo "$as_me: error: cannot compute sizeof (char), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (char)); } unsigned long ulongval () { return (long) (sizeof (char)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15625,13 +18654,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77" >&5 -echo "$as_me: error: cannot compute sizeof (char), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -15652,15 +18684,12 @@ if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15674,11 +18703,21 @@ if (sizeof (short)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15687,10 +18726,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_short=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 echo "${ECHO_T}$ac_cv_type_short" >&6 @@ -15708,15 +18748,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15729,11 +18766,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15742,15 +18789,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15763,11 +18807,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15776,29 +18830,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15811,11 +18864,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15824,15 +18887,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15845,11 +18905,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15858,37 +18928,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15901,11 +18970,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -15914,37 +18993,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5 -echo "$as_me: error: cannot compute sizeof (short), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (short)); } unsigned long ulongval () { return (long) (sizeof (short)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -15987,13 +19068,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77" >&5 -echo "$as_me: error: cannot compute sizeof (short), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (short), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -16014,15 +19098,12 @@ if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16036,11 +19117,21 @@ if (sizeof (int)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16049,10 +19140,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_int=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 echo "${ECHO_T}$ac_cv_type_int" >&6 @@ -16070,15 +19162,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16091,11 +19180,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16104,15 +19203,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16125,11 +19221,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16138,29 +19244,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16173,11 +19278,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16186,15 +19301,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16207,11 +19319,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16220,37 +19342,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16263,11 +19384,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16276,37 +19407,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5 -echo "$as_me: error: cannot compute sizeof (int), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (int)); } unsigned long ulongval () { return (long) (sizeof (int)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16349,13 +19482,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5 -echo "$as_me: error: cannot compute sizeof (int), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (int), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -16376,15 +19512,12 @@ if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16398,11 +19531,21 @@ if (sizeof (long)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16411,10 +19554,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_long=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 echo "${ECHO_T}$ac_cv_type_long" >&6 @@ -16432,15 +19576,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16453,11 +19594,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16466,15 +19617,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16487,11 +19635,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16500,29 +19658,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16535,11 +19692,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16548,15 +19715,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16569,11 +19733,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16582,37 +19756,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16625,11 +19798,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16638,37 +19821,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5 -echo "$as_me: error: cannot compute sizeof (long), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long)); } unsigned long ulongval () { return (long) (sizeof (long)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16711,13 +19896,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5 -echo "$as_me: error: cannot compute sizeof (long), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -16738,15 +19926,12 @@ if test "${ac_cv_type_char_p+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16760,11 +19945,21 @@ if (sizeof (char *)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16773,10 +19968,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_char_p=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_char_p=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5 echo "${ECHO_T}$ac_cv_type_char_p" >&6 @@ -16794,15 +19990,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16815,11 +20008,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16828,15 +20031,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16849,11 +20049,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16862,29 +20072,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16897,11 +20106,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16910,15 +20129,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16931,11 +20147,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -16944,37 +20170,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -16987,11 +20212,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17000,37 +20235,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_char_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77" >&5 -echo "$as_me: error: cannot compute sizeof (char *), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char *), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (char *)); } unsigned long ulongval () { return (long) (sizeof (char *)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17073,13 +20310,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77" >&5 -echo "$as_me: error: cannot compute sizeof (char *), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char *), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (char *), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -17100,15 +20340,12 @@ if test "${ac_cv_type_double+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17122,11 +20359,21 @@ if (sizeof (double)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17135,10 +20382,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_double=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_double=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5 echo "${ECHO_T}$ac_cv_type_double" >&6 @@ -17156,15 +20404,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17177,11 +20422,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17190,15 +20445,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17211,11 +20463,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17224,29 +20486,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17259,11 +20520,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17272,15 +20543,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17293,11 +20561,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17306,37 +20584,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17349,11 +20626,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17362,37 +20649,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_double=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5 -echo "$as_me: error: cannot compute sizeof (double), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (double)); } unsigned long ulongval () { return (long) (sizeof (double)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17435,13 +20724,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77" >&5 -echo "$as_me: error: cannot compute sizeof (double), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (double), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -17462,15 +20754,12 @@ if test "${ac_cv_type_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17484,11 +20773,21 @@ if (sizeof (long long)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17497,10 +20796,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_long_long=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_long_long=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 echo "${ECHO_T}$ac_cv_type_long_long" >&6 @@ -17518,15 +20818,12 @@ else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17539,11 +20836,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17552,15 +20859,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17573,11 +20877,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17586,29 +20900,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17621,11 +20934,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17634,15 +20957,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17655,11 +20975,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17668,37 +20998,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo= ac_hi= fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17711,11 +21040,21 @@ test_array [0] = 0 _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17724,37 +21063,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;} +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac else if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5 -echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default long longval () { return (long) (sizeof (long long)); } unsigned long ulongval () { return (long) (sizeof (long long)); } #include <stdio.h> #include <stdlib.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17797,13 +21138,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77" >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77" >&2;} +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.val @@ -17825,15 +21169,12 @@ if test "${ac_cv_type_u_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17847,11 +21188,21 @@ if (sizeof (u_int)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17860,10 +21211,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_int=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_int=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int" >&5 echo "${ECHO_T}$ac_cv_type_u_int" >&6 @@ -17883,15 +21235,12 @@ if test "${ac_cv_type_u_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17905,11 +21254,21 @@ if (sizeof (u_long)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17918,10 +21277,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_long=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_long=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_long" >&5 echo "${ECHO_T}$ac_cv_type_u_long" >&6 @@ -17944,15 +21304,12 @@ if test "${ac_cv_type_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -17966,11 +21323,21 @@ if (sizeof (bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -17979,10 +21346,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 @@ -18003,15 +21371,12 @@ if test "${ac_cv_type_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18025,11 +21390,21 @@ if (sizeof (bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18038,10 +21413,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 @@ -18062,15 +21438,12 @@ if test "${ac_cv_type_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18084,11 +21457,21 @@ if (sizeof (bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18097,10 +21480,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_bits16_t" >&6 @@ -18124,15 +21508,12 @@ if test "${ac_cv_type_u_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18146,11 +21527,21 @@ if (sizeof (u_bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18159,10 +21550,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 @@ -18183,15 +21575,12 @@ if test "${ac_cv_type_u_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18205,11 +21594,21 @@ if (sizeof (u_bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18218,10 +21617,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 @@ -18242,15 +21642,12 @@ if test "${ac_cv_type_u_bits16_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18264,11 +21661,21 @@ if (sizeof (u_bits16_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18277,10 +21684,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits16_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits16_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits16_t" >&6 @@ -18304,15 +21712,12 @@ if test "${ac_cv_type_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18326,11 +21731,21 @@ if (sizeof (bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18339,10 +21754,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 @@ -18363,15 +21779,12 @@ if test "${ac_cv_type_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18385,11 +21798,21 @@ if (sizeof (bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18398,10 +21821,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 @@ -18422,15 +21846,12 @@ if test "${ac_cv_type_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18444,11 +21865,21 @@ if (sizeof (bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18457,10 +21888,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_bits32_t" >&6 @@ -18484,15 +21916,12 @@ if test "${ac_cv_type_u_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18506,11 +21935,21 @@ if (sizeof (u_bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18519,10 +21958,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 @@ -18543,15 +21983,12 @@ if test "${ac_cv_type_u_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18565,11 +22002,21 @@ if (sizeof (u_bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18578,10 +22025,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 @@ -18602,15 +22050,12 @@ if test "${ac_cv_type_u_bits32_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18624,11 +22069,21 @@ if (sizeof (u_bits32_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18637,10 +22092,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_u_bits32_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_u_bits32_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5 echo "${ECHO_T}$ac_cv_type_u_bits32_t" >&6 @@ -18664,15 +22120,12 @@ if test "${ac_cv_type_bits64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18686,11 +22139,21 @@ if (sizeof (bits64_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18699,10 +22162,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits64_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 @@ -18723,15 +22187,12 @@ if test "${ac_cv_type_bits64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18745,11 +22206,21 @@ if (sizeof (bits64_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18758,10 +22229,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits64_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 @@ -18782,15 +22254,12 @@ if test "${ac_cv_type_bits64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18804,11 +22273,21 @@ if (sizeof (bits64_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18817,10 +22296,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits64_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 @@ -18841,15 +22321,12 @@ if test "${ac_cv_type_bits64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18863,11 +22340,21 @@ if (sizeof (bits64_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18876,10 +22363,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits64_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 @@ -18900,15 +22388,12 @@ if test "${ac_cv_type_bits64_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18922,11 +22407,21 @@ if (sizeof (bits64_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18935,10 +22430,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_bits64_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_bits64_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5 echo "${ECHO_T}$ac_cv_type_bits64_t" >&6 @@ -18963,15 +22459,12 @@ if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -18985,11 +22478,21 @@ if (sizeof (ptrdiff_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -18998,10 +22501,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_ptrdiff_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 @@ -19022,15 +22526,12 @@ if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19044,11 +22545,21 @@ if (sizeof (ptrdiff_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -19057,10 +22568,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_ptrdiff_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 @@ -19081,15 +22593,12 @@ if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19103,11 +22612,21 @@ if (sizeof (ptrdiff_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -19116,10 +22635,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_ptrdiff_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 @@ -19140,15 +22660,12 @@ if test "${ac_cv_type_ptrdiff_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19162,11 +22679,21 @@ if (sizeof (ptrdiff_t)) _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -19175,10 +22702,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_type_ptrdiff_t=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_type_ptrdiff_t=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6 @@ -19201,8 +22729,11 @@ if test "${ac_cv_header_stat_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/stat.h> @@ -19232,7 +22763,7 @@ You lose. _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "You lose" >/dev/null 2>&1; then + $EGREP "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else ac_cv_header_stat_broken=no @@ -19286,18 +22817,15 @@ if test "${bash_cv_func_lstat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/stat.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19308,11 +22836,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19321,10 +22859,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_func_lstat=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_func_lstat=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_func_lstat" >&5 echo "${ECHO_T}$bash_cv_func_lstat" >&6 @@ -19350,8 +22890,11 @@ echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaultin else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef HAVE_LOCALE_H #include <locale.h> @@ -19399,11 +22942,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_func_ctype_nonascii=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -19427,8 +22971,11 @@ echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" bash_cv_dup2_broken=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <fcntl.h> @@ -19462,11 +23009,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_dup2_broken=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -19492,8 +23040,11 @@ echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- d bash_cv_pgrp_pipe=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef HAVE_UNISTD_H # include <unistd.h> @@ -19559,11 +23110,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_pgrp_pipe=yes fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -19585,15 +23137,12 @@ if test "${bash_cv_signal_vintage+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <signal.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19610,11 +23159,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19623,18 +23182,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_signal_vintage=posix else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <signal.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19648,11 +23205,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19661,20 +23228,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_signal_vintage=4.2bsd else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <signal.h> RETSIGTYPE foo() { } -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19689,11 +23254,21 @@ main () _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19702,17 +23277,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_signal_vintage=svr3 else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_signal_vintage=v7 fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi @@ -19742,15 +23321,12 @@ if test "${bash_cv_sys_errlist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <errno.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19763,11 +23339,21 @@ extern char *sys_errlist[]; _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -19776,10 +23362,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_sys_errlist=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_sys_errlist=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_sys_errlist" >&5 echo "${ECHO_T}$bash_cv_sys_errlist" >&6 @@ -19802,8 +23390,11 @@ echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaul bash_cv_sys_siglist=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> @@ -19834,11 +23425,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_sys_siglist=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -19857,20 +23449,17 @@ if test "${bash_cv_decl_under_sys_siglist+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -19881,11 +23470,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -19894,10 +23493,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_decl_under_sys_siglist=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_decl_under_sys_siglist=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_decl_under_sys_siglist" >&5 echo "${ECHO_T}$bash_cv_decl_under_sys_siglist" >&6 @@ -19920,8 +23520,11 @@ echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defau bash_cv_under_sys_siglist=no else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> @@ -19952,11 +23555,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_under_sys_siglist=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -19976,8 +23580,11 @@ if test "${bash_cv_void_sighandler+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> #ifdef signal @@ -19987,12 +23594,6 @@ else extern "C" #endif void (*signal ()) (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20003,11 +23604,21 @@ int i; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20016,10 +23627,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_void_sighandler=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_void_sighandler=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_void_sighandler" >&5 echo "${ECHO_T}$bash_cv_void_sighandler" >&6 @@ -20038,8 +23650,11 @@ if test "${bash_cv_type_clock_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20052,7 +23667,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "clock_t" >/dev/null 2>&1; then + $EGREP "clock_t" >/dev/null 2>&1; then bash_cv_type_clock_t=yes else bash_cv_type_clock_t=no @@ -20079,8 +23694,11 @@ if test "${bash_cv_type_sigset_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20093,7 +23711,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "sigset_t" >/dev/null 2>&1; then + $EGREP "sigset_t" >/dev/null 2>&1; then bash_cv_type_sigset_t=yes else bash_cv_type_sigset_t=no @@ -20120,8 +23738,11 @@ if test "${bash_cv_type_quad_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20134,7 +23755,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "quad_t" >/dev/null 2>&1; then + $EGREP "quad_t" >/dev/null 2>&1; then bash_cv_type_quad_t=yes else bash_cv_type_quad_t=no @@ -20166,8 +23787,11 @@ if test "${bash_cv_type_intmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20180,7 +23804,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "intmax_t" >/dev/null 2>&1; then + $EGREP "intmax_t" >/dev/null 2>&1; then bash_cv_type_intmax_t=yes else bash_cv_type_intmax_t=no @@ -20207,8 +23831,11 @@ if test "${bash_cv_type_uintmax_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20221,7 +23848,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "uintmax_t" >/dev/null 2>&1; then + $EGREP "uintmax_t" >/dev/null 2>&1; then bash_cv_type_uintmax_t=yes else bash_cv_type_uintmax_t=no @@ -20249,8 +23876,11 @@ if test "${bash_cv_type_socklen_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #if STDC_HEADERS #include <stdlib.h> @@ -20263,7 +23893,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "socklen_t" >/dev/null 2>&1; then + $EGREP "socklen_t" >/dev/null 2>&1; then bash_cv_type_socklen_t=yes else bash_cv_type_socklen_t=no @@ -20294,16 +23924,13 @@ if test "${bash_cv_type_rlimit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/resource.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20314,11 +23941,21 @@ rlim_t xxx; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20327,7 +23964,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_type_rlimit=rlim_t else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + if test "$cross_compiling" = yes; then { echo "$as_me:$LINENO: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5 @@ -20335,8 +23973,11 @@ echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to l bash_cv_type_rlimit=long else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/time.h> @@ -20366,14 +24007,15 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_type_rlimit=long fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi @@ -20399,19 +24041,16 @@ if test "${ac_cv_member_struct_termios_c_line+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <termios.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20424,11 +24063,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20437,10 +24086,61 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_termios_c_line=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 <termios.h> + + +int +main () +{ +static struct termios ac_aggr; +if (sizeof ac_aggr.c_line) +return 0; + ; + 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 + ac_cv_member_struct_termios_c_line=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_termios_c_line=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_termios_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termios_c_line" >&6 @@ -20459,19 +24159,16 @@ if test "${ac_cv_member_struct_termio_c_line+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <termio.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20484,11 +24181,69 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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 + ac_cv_member_struct_termio_c_line=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 <termio.h> + + +int +main () +{ +static struct termio ac_aggr; +if (sizeof ac_aggr.c_line) +return 0; + ; + 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=$? @@ -20497,10 +24252,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_termio_c_line=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_termio_c_line=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_termio_c_line" >&5 echo "${ECHO_T}$ac_cv_member_struct_termio_c_line" >&6 @@ -20519,8 +24277,11 @@ if test "${bash_cv_dirent_has_dino+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <sys/types.h> @@ -20542,12 +24303,6 @@ else # endif #endif /* HAVE_DIRENT_H */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20560,11 +24315,21 @@ struct dirent d; int z; z = d.d_ino; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20573,10 +24338,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_dirent_has_dino=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_dirent_has_dino=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_dirent_has_dino" >&5 @@ -20595,8 +24361,11 @@ if test "${bash_cv_dirent_has_d_fileno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <sys/types.h> @@ -20618,12 +24387,6 @@ else # endif #endif /* HAVE_DIRENT_H */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20636,11 +24399,21 @@ struct dirent d; int z; z = d.d_fileno; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20649,10 +24422,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_dirent_has_d_fileno=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_dirent_has_d_fileno=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_fileno" >&5 @@ -20671,8 +24445,11 @@ if test "${bash_cv_dirent_has_d_namlen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <sys/types.h> @@ -20694,12 +24471,6 @@ else # endif #endif /* HAVE_DIRENT_H */ -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20712,11 +24483,21 @@ struct dirent d; int z; z = d.d_namlen; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20725,10 +24506,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_dirent_has_d_namlen=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_dirent_has_d_namlen=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_namlen" >&5 @@ -20746,16 +24528,13 @@ if test "${bash_cv_struct_winsize_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/ioctl.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20766,11 +24545,21 @@ struct winsize x; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20779,18 +24568,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_struct_winsize_header=ioctl_h else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <termios.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20801,11 +24588,21 @@ struct winsize x; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20814,13 +24611,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_struct_winsize_header=termios_h else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_struct_winsize_header=other fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bash_cv_struct_winsize_header = ioctl_h; then @@ -20849,23 +24647,29 @@ if test "${bash_cv_struct_timeval+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/time.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "struct timeval" >/dev/null 2>&1; then + $EGREP "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <time.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "struct timeval" >/dev/null 2>&1; then + $EGREP "struct timeval" >/dev/null 2>&1; then bash_cv_struct_timeval=yes else bash_cv_struct_timeval=no @@ -20893,15 +24697,12 @@ if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ $ac_includes_default -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20914,11 +24715,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20927,10 +24738,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_stat_st_blocks=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blocks) +return 0; + ; + 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 + ac_cv_member_struct_stat_st_blocks=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_stat_st_blocks=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6 @@ -20949,17 +24807,14 @@ if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <time.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -20970,11 +24825,21 @@ struct tm *tp; tp->tm_sec; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -20983,10 +24848,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_struct_tm=sys/time.h fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 @@ -21004,18 +24870,15 @@ if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <$ac_cv_struct_tm> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -21028,11 +24891,21 @@ return 0; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -21041,10 +24914,60 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +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 <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +return 0; + ; + 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 + ac_cv_member_struct_tm_tm_zone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_member_struct_tm_tm_zone=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 @@ -21070,19 +24993,16 @@ if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <time.h> #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -21093,11 +25013,21 @@ atoi(*tzname); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21106,10 +25036,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_var_tzname=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 echo "${ECHO_T}$ac_cv_var_tzname" >&6 @@ -21129,23 +25061,29 @@ if test "${bash_cv_struct_timezone+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/time.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "struct timezone" >/dev/null 2>&1; then + $EGREP "struct timezone" >/dev/null 2>&1; then bash_cv_struct_timezone=yes else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <time.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "struct timezone" >/dev/null 2>&1; then + $EGREP "struct timezone" >/dev/null 2>&1; then bash_cv_struct_timezone=yes else bash_cv_struct_timezone=no @@ -21174,16 +25112,13 @@ if test "${bash_cv_have_strsignal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -21194,11 +25129,21 @@ char *s = (char *)strsignal(2); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21207,10 +25152,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_have_strsignal=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_have_strsignal=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_have_strsignal" >&5 @@ -21234,8 +25181,11 @@ echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <sys/types.h> @@ -21291,11 +25241,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_opendir_not_robust=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21320,8 +25271,11 @@ echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to n else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ main() { @@ -21345,11 +25299,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_ulimit_maxfds=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21374,8 +25329,11 @@ echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- de else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef HAVE_UNISTD_H # include <unistd.h> @@ -21424,11 +25382,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_getenv_redef=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21454,8 +25413,11 @@ echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-c else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #ifdef HAVE_UNISTD_H @@ -21485,11 +25447,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_getcwd_malloc=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21500,7 +25463,14 @@ cat >>confdefs.h <<\_ACEOF #define GETCWD_BROKEN 1 _ACEOF -LIBOBJS="$LIBOBJS getcwd.$ac_objext" +case $LIBOBJS in + "getcwd.$ac_objext" | \ + *" getcwd.$ac_objext" | \ + "getcwd.$ac_objext "* | \ + *" getcwd.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" ;; +esac + fi fi @@ -21517,8 +25487,11 @@ echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #ifdef HAVE_UNISTD_H #include <unistd.h> @@ -21573,11 +25546,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_func_sigsetjmp=missing fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21603,8 +25577,11 @@ echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #if defined (HAVE_LOCALE_H) @@ -21657,11 +25634,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_func_strcoll_broken=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21686,8 +25664,11 @@ if test "${bash_cv_std_putenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS #include <stdlib.h> @@ -21704,12 +25685,6 @@ extern int putenv (char *); extern int putenv (); #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -21720,11 +25695,21 @@ return (putenv == 0); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21733,11 +25718,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_std_putenv=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_std_putenv=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_std_putenv" >&5 echo "${ECHO_T}$bash_cv_std_putenv" >&6 @@ -21764,8 +25751,11 @@ if test "${bash_cv_std_unsetenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #if STDC_HEADERS #include <stdlib.h> @@ -21782,12 +25772,6 @@ extern int unsetenv (const char *); extern int unsetenv (); #endif -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -21798,11 +25782,21 @@ return (unsetenv == 0); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -21811,11 +25805,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 bash_cv_std_unsetenv=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_std_unsetenv=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_std_unsetenv" >&5 echo "${ECHO_T}$bash_cv_std_unsetenv" >&6 @@ -21845,8 +25841,11 @@ echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to n else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <stdio.h> #include <string.h> @@ -21877,11 +25876,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_printf_a_format=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -21909,8 +25909,11 @@ echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaul else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <signal.h> #ifdef HAVE_UNISTD_H @@ -21971,11 +25974,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_must_reinstall_sighandlers=yes fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -22001,8 +26005,11 @@ echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #ifdef HAVE_SYS_WAIT_H @@ -22063,11 +26070,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_job_control_missing=missing fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -22092,8 +26100,11 @@ echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaul else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/stat.h> @@ -22148,11 +26159,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_sys_named_pipes=missing fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -22166,64 +26178,17 @@ _ACEOF fi -echo "$as_me:$LINENO: checking POSIX termios" >&5 -echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 -if test "${ac_cv_sys_posix_termios+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" -#include <sys/types.h> -#include <unistd.h> -#include <termios.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ -/* SunOS 4.0.3 has termios.h but not the library calls. */ - tcgetattr(0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' - { (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 - ac_cv_sys_posix_termios=yes -else - echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 -ac_cv_sys_posix_termios=no -fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_sys_posix_termios" >&5 -echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 - -if test $ac_cv_sys_posix_termios = yes; then - echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5 +echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <termios.h> #ifdef TIOCGWINSZ @@ -22232,7 +26197,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_termios_h=yes else ac_cv_sys_tiocgwinsz_in_termios_h=no @@ -22243,7 +26208,6 @@ fi echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6 -fi if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6 @@ -22251,8 +26215,11 @@ if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/ioctl.h> #ifdef TIOCGWINSZ @@ -22261,7 +26228,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "yes" >/dev/null 2>&1; then + $EGREP "yes" >/dev/null 2>&1; then ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes else ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no @@ -22287,16 +26254,13 @@ if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/ioctl.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22307,11 +26271,21 @@ int x = TIOCSTAT; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -22320,10 +26294,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_tiocstat_in_ioctl=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_tiocstat_in_ioctl=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_tiocstat_in_ioctl" >&5 @@ -22341,16 +26316,13 @@ if test "${bash_cv_fionread_in_ioctl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/ioctl.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22361,11 +26333,21 @@ int x = FIONREAD; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -22374,10 +26356,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_fionread_in_ioctl=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_fionread_in_ioctl=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_fionread_in_ioctl" >&5 @@ -22403,8 +26386,11 @@ echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/wait.h> @@ -22441,11 +26427,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_wcontinued_broken=yes fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -22465,15 +26452,12 @@ if test "${bash_cv_speed_t_in_sys_types+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22484,11 +26468,21 @@ speed_t x; _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -22497,10 +26491,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_speed_t_in_sys_types=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_speed_t_in_sys_types=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_speed_t_in_sys_types" >&5 @@ -22518,8 +26513,11 @@ if test "${bash_cv_getpw_declared+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #ifdef HAVE_UNISTD_H @@ -22529,7 +26527,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "getpwuid" >/dev/null 2>&1; then + $EGREP "getpwuid" >/dev/null 2>&1; then bash_cv_getpw_declared=yes else bash_cv_getpw_declared=no @@ -22559,8 +26557,11 @@ echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defa else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <signal.h> @@ -22596,11 +26597,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ( exit $ac_status ) bash_cv_unusable_rtsigs=no fi -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi @@ -22632,18 +26634,15 @@ if test "${bash_cv_kernel_rlimit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #include <sys/resource.h> -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22657,11 +26656,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -22670,22 +26679,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_kernel_rlimit=no else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include <sys/types.h> #define _KERNEL #include <sys/resource.h> #undef _KERNEL -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22699,11 +26706,21 @@ main () _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&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 -s conftest.$ac_objext' + { 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=$? @@ -22712,13 +26729,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 bash_cv_kernel_rlimit=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + bash_cv_kernel_rlimit=no fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $bash_cv_kernel_rlimit" >&5 @@ -22753,49 +26771,73 @@ if test "${ac_cv_func_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define tgetent innocuous_tgetent + /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tgetent (); below. */ -#include <assert.h> + which can conflict with char tgetent (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef tgetent + /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" +{ #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -char (*f) (); - -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif -int -main () -{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_tgetent) || defined (__stub___tgetent) choke me #else -f = tgetent; +char (*f) () = tgetent; +#endif +#ifdef __cplusplus +} #endif +int +main () +{ +return f != tgetent; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22804,10 +26846,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_func_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_func_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5 echo "${ECHO_T}$ac_cv_func_tgetent" >&6 @@ -22822,8 +26866,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -22832,12 +26879,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22848,11 +26889,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22861,10 +26912,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_termcap_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 @@ -22880,8 +26933,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -22890,12 +26946,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22906,11 +26956,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22919,10 +26979,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_tinfo_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_tinfo_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5 @@ -22938,8 +27000,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -22948,12 +27013,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -22964,11 +27023,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -22977,10 +27046,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_curses_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_curses_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5 @@ -22996,8 +27067,11 @@ else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" -#include "confdefs.h" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus @@ -23006,12 +27080,6 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgetent (); -#ifdef F77_DUMMY_MAIN -# ifdef __cplusplus - extern "C" -# endif - int F77_DUMMY_MAIN() { return 1; } -#endif int main () { @@ -23022,11 +27090,21 @@ tgetent (); _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 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 -s conftest$ac_exeext' + { 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_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -23035,10 +27113,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_cv_lib_ncurses_tgetent=yes else echo "$as_me: failed program was:" >&5 -cat conftest.$ac_ext >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ncurses_tgetent=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5 @@ -23095,20 +27175,24 @@ echo $ECHO_N "checking whether /dev/fd is available... $ECHO_C" >&6 if test "${bash_cv_dev_fd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then + bash_cv_dev_fd="" +if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then # check for systems like FreeBSD 5 that only provide /dev/fd/[012] - exec 3<&0 + exec 3</dev/null if test -r /dev/fd/3; then bash_cv_dev_fd=standard else bash_cv_dev_fd=absent fi exec 3<&- - elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then - bash_cv_dev_fd=whacky - else - bash_cv_dev_fd=absent - fi +fi +if test -z "$bash_cv_dev_fd" ; then + if test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then + bash_cv_dev_fd=whacky + else + bash_cv_dev_fd=absent + fi +fi fi @@ -23343,8 +27427,8 @@ esac #AC_SUBST(ALLOCA_SOURCE) #AC_SUBST(ALLOCA_OBJECT) -ac_config_files="$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/perl/Makefile pathnames.h" -ac_config_commands="$ac_config_commands default" + ac_config_files="$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/perl/Makefile pathnames.h" + ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -23355,7 +27439,7 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overriden when +# `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. @@ -23373,13 +27457,13 @@ _ACEOF # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | @@ -23390,7 +27474,7 @@ _ACEOF t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache -if cmp -s $cache_file confcache; then :; else +if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file @@ -23409,18 +27493,33 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ + ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; +s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; -s/^[^=]*=[ ]*$//; +s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -23435,11 +27534,12 @@ cat >$CONFIG_STATUS <<_ACEOF # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -23448,46 +27548,57 @@ cat >>$CONFIG_STATUS <<\_ACEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh -# NLS nuisances. # Support unset when possible. -if (FOO=FOO; unset FOO) >/dev/null 2>&1; then +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi -(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && - { $as_unset LANG || test "${LANG+set}" != set; } || - { LANG=C; export LANG; } -(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && - { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || - { LC_ALL=C; export LC_ALL; } -(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && - { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || - { LC_TIME=C; export LC_TIME; } -(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && - { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || - { LC_CTYPE=C; export LC_CTYPE; } -(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && - { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || - { LANGUAGE=C; export LANGUAGE; } -(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && - { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || - { LC_COLLATE=C; export LC_COLLATE; } -(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && - { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || - { LC_NUMERIC=C; export LC_NUMERIC; } -(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && - { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || - { LC_MESSAGES=C; export LC_MESSAGES; } + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi # Name of the executable. -as_me=`(basename "$0") 2>/dev/null || +as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ @@ -23498,6 +27609,7 @@ echo X/"$0" | /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` + # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' @@ -23508,15 +27620,15 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conftest.sh - echo "exit 0" >>conftest.sh - chmod +x conftest.sh - if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi - rm -f conftest.sh + rm -f conf$$.sh fi @@ -23565,6 +27677,8 @@ do as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} @@ -23638,13 +27752,20 @@ else fi rm -f conf$$ conf$$.exe conf$$.file +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. -as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS @@ -23654,7 +27775,7 @@ as_nl=' IFS=" $as_nl" # CDPATH. -$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } +$as_unset CDPATH exec 6>&1 @@ -23670,8 +27791,8 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by bash $as_me 3.1-release, which was -generated by GNU Autoconf 2.53. Invocation command line was +This file was extended by bash $as_me 3.2-release, which was +generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23711,12 +27832,13 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -23732,12 +27854,11 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -bash config.status 3.1-release -configured by $0, generated by GNU Autoconf 2.53, +bash config.status 3.2-release +configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. +Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir @@ -23754,25 +27875,25 @@ do --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - shift - set dummy "$ac_option" "$ac_optarg" ${1+"$@"} - shift + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift ;; - -*);; *) # This is not an option, so the user has probably given explicit # arguments. + ac_option=$1 ac_need_defaults=false;; esac - case $1 in + case $ac_option in # Handling of the options. _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" - exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) @@ -23787,13 +27908,16 @@ Try \`$0 --help' for more information." >&2;} --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) - shift - CONFIG_FILES="$CONFIG_FILES $1" + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) - shift - CONFIG_HEADERS="$CONFIG_HEADERS $1" + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 @@ -23808,6 +27932,20 @@ Try \`$0 --help' for more information." >&2;} shift done +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + _ACEOF cat >>$CONFIG_STATUS <<_ACEOF @@ -23866,6 +28004,9 @@ if $ac_need_defaults; then test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { @@ -23874,17 +28015,17 @@ $debug || } # Create a (secure) tmp directory for tmp files. -: ${TMPDIR=/tmp} + { - tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=$TMPDIR/cs$$-$RANDOM + tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { - echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } @@ -23964,8 +28105,10 @@ s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t s,@CROSS_COMPILE@,$CROSS_COMPILE,;t t s,@SIGNAMES_H@,$SIGNAMES_H,;t t +s,@SIGNAMES_O@,$SIGNAMES_O,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@STATIC_LD@,$STATIC_LD,;t t s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t @@ -24043,6 +28186,7 @@ s,@LOCAL_LIBS@,$LOCAL_LIBS,;t t s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF @@ -24072,9 +28216,9 @@ _ACEOF (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end @@ -24092,46 +28236,51 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || - mkdir "$as_incr_dir" || - { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; } - ;; - esac -done; } + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } ac_builddir=. @@ -24158,12 +28307,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac case $INSTALL in @@ -24185,7 +28367,7 @@ echo "$as_me: creating $ac_file" >&6;} configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." + sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. @@ -24194,24 +28376,24 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } _ACEOF @@ -24253,12 +28435,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' @@ -24267,11 +28449,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac @@ -24285,28 +28467,29 @@ echo "$as_me: creating $ac_file" >&6;} case $f in -) echo $tmp/stdin ;; [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - echo $f;; + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; *) # Relative - if test -f "$f"; then - # Build tree - echo $f - elif test -f "$srcdir/$f"; then - # Source tree - echo $srcdir/$f - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } - fi;; + fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF @@ -24329,9 +28512,9 @@ s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times @@ -24345,13 +28528,13 @@ rm -f confdef2sed.sed # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail @@ -24360,7 +28543,7 @@ do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -24375,7 +28558,7 @@ do mv conftest.tail conftest.defines done rm -f conftest.defines -echo ' fi # egrep' >>$CONFIG_STATUS +echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size @@ -24387,7 +28570,7 @@ do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS @@ -24415,41 +28598,46 @@ cat >>$CONFIG_STATUS <<\_ACEOF cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` - { case "$ac_dir" in - [\\/]* | ?:[\\/]* ) as_incr_dir=;; - *) as_incr_dir=.;; -esac -as_dummy="$ac_dir" -for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do - case $as_mkdir_dir in - # Skip DOS drivespec - ?:) as_incr_dir=$as_mkdir_dir ;; - *) - as_incr_dir=$as_incr_dir/$as_mkdir_dir - test -d "$as_incr_dir" || - mkdir "$as_incr_dir" || - { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; } - ;; - esac -done; } + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file @@ -24470,16 +28658,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. if test "$ac_dir" != .; then @@ -24505,12 +28718,45 @@ case $srcdir in ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac -# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be -# absolute. -ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` -ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` -ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` -ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 @@ -24643,8 +28889,11 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. diff --git a/configure.in b/configure.in index 182d7739..0e808cde 100644 --- a/configure.in +++ b/configure.in @@ -1,11 +1,11 @@ dnl -dnl Configure script for bash-3.1 +dnl Configure script for bash-3.2 dnl dnl report bugs to chet@po.cwru.edu dnl dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 1987-2005 Free Software Foundation, Inc. +# Copyright (C) 1987-2006 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 @@ -22,12 +22,12 @@ dnl Process this file with autoconf to produce a configure script. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -AC_REVISION([for Bash 3.1, version 3.183])dnl +AC_REVISION([for Bash 3.2, version 3.190])dnl -define(bashvers, 3.1) +define(bashvers, 3.2) define(relstatus, release) -AC_INIT(bash, bashvers-relstatus, bug-bash@gnu.org) +AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org]) dnl make sure we are using a recent autoconf version AC_PREREQ(2.50) @@ -149,7 +149,7 @@ if test "$opt_curses" = yes; then fi if test -z "${DEBUGGER_START_FILE}"; then - DEBUGGER_START_FILE=${ac_default_prefix}/lib/bashdb/bashdb-main.inc + DEBUGGER_START_FILE=${ac_default_prefix}/share/bashdb/bashdb-main.inc fi dnl optional shell features in config.h.in @@ -373,6 +373,7 @@ AC_SYS_LARGEFILE dnl BEGIN changes for cross-building (currently cygwin, minGW, and dnl (obsolete) BeOS) +SIGNAMES_O= SIGNAMES_H=lsignames.h dnl load up the cross-building cache file -- add more cases and cache @@ -382,18 +383,17 @@ dnl Note that host and target machine are the same, and different than the dnl build machine. dnl Set SIGNAMES_H based on whether or not we're cross-compiling. +CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in *-cygwin*) cross_cache=${srcdir}/cross-build/cygwin32.cache - SIGNAMES_H='$(srcdir)/cross-build/win32sig.h' ;; *-mingw*) cross_cache=${srcdir}/cross-build/cygwin32.cache ;; i[[3456]]86-*-beos*) cross_cache=${srcdir}/cross-build/x86-beos.cache - SIGNAMES_H='${srcdir}/cross-build/beos-sig.h' ;; *) echo "configure: cross-compiling for $host is not supported" >&2 ;; @@ -403,10 +403,12 @@ if test "x$cross_compiling" = "xyes"; then . ${cross_cache} fi unset cross_cache + SIGNAMES_O='signames.o' CROSS_COMPILE='-DCROSS_COMPILING' AC_SUBST(CROSS_COMPILE) fi AC_SUBST(SIGNAMES_H) +AC_SUBST(SIGNAMES_O) if test -z "$CC_FOR_BUILD"; then if test "x$cross_compiling" = "xno"; then @@ -687,15 +689,16 @@ dnl checks for certain version-specific system calls and libc functions AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE)) AC_CHECK_FUNC(wait3, AC_DEFINE(HAVE_WAIT3)) AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF_IN_LIBC)) +AC_CHECK_FUNC(isnan, AC_DEFINE(HAVE_ISNAN_IN_LIBC)) dnl checks for missing libc functions AC_CHECK_FUNC(mkfifo,AC_DEFINE(HAVE_MKFIFO),AC_DEFINE(MKFIFO_MISSING)) dnl checks for system calls -AC_CHECK_FUNCS(dup2 fcntl getdtablesize getgroups gethostname getpagesize \ - getpeername getrlimit getrusage gettimeofday kill killpg \ - lstat readlink sbrk select setdtablesize tcgetpgrp uname \ - ulimit waitpid) +AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getgroups gethostname \ + getpagesize getpeername getrlimit getrusage gettimeofday \ + kill killpg lstat readlink sbrk select setdtablesize \ + tcgetpgrp uname ulimit waitpid) AC_REPLACE_FUNCS(rename) dnl checks for c library functions @@ -714,6 +717,7 @@ AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax) AC_CHECK_DECLS([confstr]) AC_CHECK_DECLS([printf]) AC_CHECK_DECLS([sbrk]) +AC_CHECK_DECLS([setregid]) AC_CHECK_DECLS([strcpy]) AC_CHECK_DECLS([strsignal]) diff --git a/cross-build/beos-sig.h b/cross-build/beos-sig.h deleted file mode 100644 index ea82f857..00000000 --- a/cross-build/beos-sig.h +++ /dev/null @@ -1,37 +0,0 @@ -/* This file is used when cross compiling bash to run native on BeOS. */ - -#ifndef __GNUC__ -# error cross compiling requires gcc -#endif - -/* A translation list so we can be polite to our users. - Use gcc labelled initializers to set up the array. Note that - some entries might wind up being NULL. */ - -char *signal_names[NSIG + 3] = { - [0] "EXIT", - [SIGHUP] "SIGHUP", - [SIGINT] "SIGINT", - [SIGQUIT] "SIGQUIT", - [SIGILL] "SIGILL", - [SIGCHLD] "SIGCHLD", - [SIGABRT] "SIGABRT", - [SIGPIPE] "SIGPIPE", - [SIGFPE] "SIGFPE", - [SIGKILL] "SIGKILL", - [SIGSTOP] "SIGSTOP", - [SIGSEGV] "SIGSEGV", - [SIGCONT] "SIGCONT", - [SIGTSTP] "SIGTSTP", - [SIGALRM] "SIGALRM", - [SIGTERM] "SIGTERM", - [SIGTTIN] "SIGTTIN", - [SIGTTOU] "SIGTTOU", - [SIGUSR1] "SIGUSR1", - [SIGUSR2] "SIGUSR2", - [SIGWINCH] "SIGWINCH", - [SIGKILLTHR] "SIGKILLTHR", - [NSIG] "DEBUG", - [NSIG + 1] "ERR", - [NSIG + 2] (char *)0x0, -}; diff --git a/cross-build/win32sig.h b/cross-build/win32sig.h deleted file mode 100644 index 41e61823..00000000 --- a/cross-build/win32sig.h +++ /dev/null @@ -1,256 +0,0 @@ -/* This file is used when cross-compiling for the CYGWIN32 environment on - a Unix machine. It gets copied to signames.h in the build directory. */ -#include <sys/types.h> -#include <signal.h> - -#ifndef __GNUC__ -# error cross compiling requires gcc -#endif - -/* A translation list so we can be polite to our users. Use gcc - labelled initializers to set up the array. Note that some entries - might wind up being NULL. */ - -char *signal_names[NSIG + 3] = { - [0] "EXIT", - -#ifdef SIGLOST - [SIGLOST] "SIGLOST", -#endif - -#ifdef SIGMSG - [SIGMSG] "SIGMSG", -#endif - -#ifdef SIGDANGER - [SIGDANGER] "SIGDANGER", -#endif - -#ifdef SIGMIGRATE - [SIGMIGRATE] "SIGMIGRATE", -#endif - -#ifdef SIGPRE - [SIGPRE] "SIGPRE", -#endif - -#ifdef SIGVIRT - [SIGVIRT] "SIGVIRT", -#endif - -#ifdef SIGALRM1 - [SIGALRM1] "SIGALRM1", -#endif - -#ifdef SIGWAITING - [SIGWAITING] "SIGWAITING", -#endif - -#ifdef SIGGRANT - [SIGGRANT] "SIGGRANT", -#endif - -#ifdef SIGKAP - [SIGKAP] "SIGKAP", -#endif - -#ifdef SIGRETRACT - [SIGRETRACT] "SIGRETRACT", -#endif - -#ifdef SIGSOUND - [SIGSOUND] "SIGSOUND", -#endif - -#ifdef SIGSAK - [SIGSAK] "SIGSAK", -#endif - -#ifdef SIGLWP - [SIGLWP] "SIGLWP", -#endif - -#ifdef SIGFREEZE - [SIGFREEZE] "SIGFREEZE", -#endif - -#ifdef SIGTHAW - [SIGTHAW] "SIGTHAW", -#endif - -#ifdef SIGCANCEL - [SIGCANCEL] "SIGCANCEL", -#endif - -#ifdef SIGDIL - [SIGDIL] "SIGDIL", -#endif - -#ifdef SIGCLD -#ifndef SIGCHLD - [SIGCLD] "SIGCLD", -#else -#if SIGCHLD != SIGCLD - [SIGCLD] "SIGCLD", -#endif -#endif -#endif - -#ifdef SIGPWR - [SIGPWR] "SIGPWR", -#endif - -#ifdef SIGPOLL -#ifndef SIGIO - [SIGPOLL] "SIGPOLL", -#else -#if SIGIO != SIGPOLL - [SIGPOLL] "SIGPOLL", -#endif -#endif -#endif - -#ifdef SIGWINDOW - [SIGWINDOW] "SIGWINDOW", -#endif - -#ifdef SIGHUP - [SIGHUP] "SIGHUP", -#endif - -#ifdef SIGINT - [SIGINT] "SIGINT", -#endif - -#ifdef SIGQUIT - [SIGQUIT] "SIGQUIT", -#endif - -#ifdef SIGILL - [SIGILL] "SIGILL", -#endif - -#ifdef SIGTRAP - [SIGTRAP] "SIGTRAP", -#endif - -#ifdef SIGIOT -#ifndef SIGABRT - [SIGIOT] "SIGIOT", -#else -#if SIGABRT != SIGIOT - [SIGIOT] "SIGIOT", -#endif -#endif -#endif - -#ifdef SIGABRT - [SIGABRT] "SIGABRT", -#endif - -#ifdef SIGEMT - [SIGEMT] "SIGEMT", -#endif - -#ifdef SIGFPE - [SIGFPE] "SIGFPE", -#endif - -#ifdef SIGKILL - [SIGKILL] "SIGKILL", -#endif - -#ifdef SIGBUS - [SIGBUS] "SIGBUS", -#endif - -#ifdef SIGSEGV - [SIGSEGV] "SIGSEGV", -#endif - -#ifdef SIGSYS - [SIGSYS] "SIGSYS", -#endif - -#ifdef SIGPIPE - [SIGPIPE] "SIGPIPE", -#endif - -#ifdef SIGALRM - [SIGALRM] "SIGALRM", -#endif - -#ifdef SIGTERM - [SIGTERM] "SIGTERM", -#endif - -#ifdef SIGURG - [SIGURG] "SIGURG", -#endif - -#ifdef SIGSTOP - [SIGSTOP] "SIGSTOP", -#endif - -#ifdef SIGTSTP - [SIGTSTP] "SIGTSTP", -#endif - -#ifdef SIGCONT - [SIGCONT] "SIGCONT", -#endif - -#ifdef SIGCHLD - [SIGCHLD] "SIGCHLD", -#endif - -#ifdef SIGTTIN - [SIGTTIN] "SIGTTIN", -#endif - -#ifdef SIGTTOU - [SIGTTOU] "SIGTTOU", -#endif - -#ifdef SIGIO - [SIGIO] "SIGIO", -#endif - -#ifdef SIGXCPU - [SIGXCPU] "SIGXCPU", -#endif - -#ifdef SIGXFSZ - [SIGXFSZ] "SIGXFSZ", -#endif - -#ifdef SIGVTALRM - [SIGVTALRM] "SIGVTALRM", -#endif - -#ifdef SIGPROF - [SIGPROF] "SIGPROF", -#endif - -#ifdef SIGWINCH - [SIGWINCH] "SIGWINCH", -#endif - -#ifdef SIGINFO - [SIGINFO] "SIGINFO", -#endif - -#ifdef SIGUSR1 - [SIGUSR1] "SIGUSR1", -#endif - -#ifdef SIGUSR2 - [SIGUSR2] "SIGUSR2", -#endif - - [NSIG] "DEBUG", - - [NSIG + 1] "ERR", - - [NSIG + 2] (char *)0x0 -}; @@ -1,4 +1,4 @@ -This is the Bash FAQ, version 3.32, for Bash version 3.1. +This is the Bash FAQ, version 3.34, for Bash version 3.2. This document contains a set of frequently-asked questions concerning Bash, the GNU Bourne-Again Shell. Bash is a freely-available command @@ -9,7 +9,7 @@ Another good source of basic information about shells is the collection of FAQ articles periodically posted to comp.unix.shell. Questions and comments concerning this document should be sent to -chet@po.cwru.edu. +chet.ramey@case.edu. This document is available for anonymous FTP with the URL @@ -36,8 +36,8 @@ A10) What is the bash `posix mode'? Section B: The latest version -B1) What's new in version 3.1? -B2) Are there any user-visible incompatibilities between bash-3.1 and +B1) What's new in version 3.2? +B2) Are there any user-visible incompatibilities between bash-3.2 and bash-2.05b? Section C: Differences from other Unix shells @@ -78,6 +78,7 @@ E10) Why does `cd //' leave $PWD as `//'? E11) If I resize my xterm while another program is running, why doesn't bash notice the change? E12) Why don't negative offsets in substring expansion work like I expect? +E13) Why does filename completion misbehave if a colon appears in the filename? Section F: Things to watch out for on certain Unix versions @@ -140,26 +141,26 @@ of Case Western Reserve University. A2) What's the latest version? -The latest version is 3.1, first made available on 09 December, 2005. +The latest version is 3.2, first made available on 12 October, 2006. A3) Where can I get it? Bash is the GNU project's shell, and so is available from the master GNU archive site, ftp.gnu.org, and its mirrors. The latest version is also available for FTP from ftp.cwru.edu. -The following URLs tell how to get version 3.1: +The following URLs tell how to get version 3.2: -ftp://ftp.gnu.org/pub/gnu/bash/bash-3.1.tar.gz -ftp://ftp.cwru.edu/pub/bash/bash-3.1.tar.gz +ftp://ftp.gnu.org/pub/gnu/bash/bash-3.2.tar.gz +ftp://ftp.cwru.edu/pub/bash/bash-3.2.tar.gz Formatted versions of the documentation are available with the URLs: -ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.1.tar.gz -ftp://ftp.cwru.edu/pub/bash/bash-doc-3.1.tar.gz +ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-3.2.tar.gz +ftp://ftp.cwru.edu/pub/bash/bash-doc-3.2.tar.gz Any patches for the current version are available with the URL: -ftp://ftp.cwru.edu/pub/bash/bash-3.1-patches/ +ftp://ftp.cwru.edu/pub/bash/bash-3.2-patches/ A4) On what machines will bash run? @@ -192,7 +193,7 @@ http://www.cygwin.com/. Cygnus originally ported bash-1.14.7, and that port was part of their early GNU-Win32 (the original name) releases. Cygnus has also done ports of bash-2.05b and bash-3.0 to the CYGWIN environment, and both -are available as part of their current release. Bash-3.1 is currently +are available as part of their current release. Bash-3.2 is currently being tested and should be available soon. Bash-2.05b and later versions should require no local Cygnus changes to @@ -216,7 +217,7 @@ Mark began to work with bash-2.05, but I don't know the current status. Bash-3.0 compiles and runs with no modifications under Microsoft's Services for Unix (SFU), once known as Interix. I do not anticipate any problems -with building bash-3.1. +with building bash-3.1 or bash-3.2. A6) How can I build bash with gcc? @@ -385,12 +386,22 @@ They are also listed in a section in the Bash Reference Manual Section B: The latest version -B1) What's new in version 3.1? +B1) What's new in version 3.2? -Bash-3.1 is the first maintenance release of the third major release of +Bash-3.2 is the second maintenance release of the third major release of bash. It contains the following significant new features (see the manual page for complete descriptions and the CHANGES and NEWS files in the -bash-3.1 distribution). +bash-3.2 distribution). + +o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing + characters when deciding whether or not a script is a binary file. + +o Quoting the string argument to the [[ command's =~ (regexp) operator now + forces string matching, as with the other pattern-matching operators. + +A short feature history dating from Bash-2.0: + +Bash-3.1 contained the following new features: o Bash-3.1 may now be configured and built in a mode that enforces strict POSIX compliance. @@ -401,8 +412,6 @@ o The `+=' assignment operator, which appends to the value of a string or o It is now possible to ignore case when matching in contexts other than filename generation using the new `nocasematch' shell option. -A short feature history dating from Bash-2.0: - Bash-3.0 contained the following new features: o Features to support the bash debugger have been implemented, and there @@ -640,10 +649,10 @@ grammar tighter and smaller (66 reduce-reduce conflicts gone) lots of code now smaller and faster test suite greatly expanded -B2) Are there any user-visible incompatibilities between bash-3.1 and +B2) Are there any user-visible incompatibilities between bash-3.2 and bash-2.05b? -There are a few incompatibilities between version 2.05b and version 3.1. +There are a few incompatibilities between version 2.05b and version 3.2. They are detailed in the file COMPAT in the bash distribution. That file is not meant to be all-encompassing; send mail to bash-maintainers@gnu.org if if you find something that's not mentioned there. @@ -697,7 +706,7 @@ Things bash has that sh does not: read -e/-p/-a/-t/-n/-d/-s/-u, readonly -a/-f/name=value, trap -l, set +o, set -b/-m/-o option/-h/-p/-B/-C/-H/-P, - unset -f/-v, ulimit -m/-p/-u, + unset -f/-v, ulimit -i/-m/-p/-q/-u/-x, type -a/-p/-t/-f/-P, suspend -f, kill -n, test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S bash reads ~/.bashrc for interactive shells, $ENV for non-interactive @@ -793,8 +802,8 @@ Things bash has or uses that ksh88 does not: set -o braceexpand/-o histexpand/-o interactive-comments/ -o notify/-o physical/-o posix/-o hashall/-o onecmd/ -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type, - typeset -a/-F/-p, ulimit -u, umask -S, alias -p, shopt, - disown, printf, complete, compgen + typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p, + shopt, disown, printf, complete, compgen `!' csh-style history expansion POSIX.2-style globbing character classes POSIX.2-style globbing equivalence classes @@ -837,7 +846,7 @@ Implementation differences: C3) Which new features in ksh-93 are not in bash, and which are? -New things in ksh-93 not in bash-3.0: +New things in ksh-93 not in bash-3.2: associative arrays floating point arithmetic and variables math library functions @@ -863,7 +872,7 @@ New things in ksh-93 not in bash-3.0: lexical scoping for local variables in `ksh' functions no scoping for local variables in `POSIX' functions -New things in ksh-93 present in bash-3.0: +New things in ksh-93 present in bash-3.2: [n]<&word- and [n]>&word- redirections (combination dup and close) for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command ?:, ++, --, `expr1 , expr2' arithmetic operators @@ -1113,7 +1122,7 @@ will try to write on a pipe without a reader. In that case, bash will print `Broken pipe' to stderr when ps is killed by a SIGPIPE. -As of bash-3.1, bash will not report SIGPIPE errors by default. You +As of bash-3.1, bash does not report SIGPIPE errors by default. You can build a version of bash that will report such errors. E3) When I have terminal escape sequences in my prompt, why does bash @@ -1390,6 +1399,32 @@ expanded value of param is unset or null, and $param otherwise. To use negative offsets that begin with a minus sign, separate the minus sign and the colon with a space. +E13) Why does filename completion misbehave if a colon appears in the filename? + +Filename completion (and word completion in general) may appear to behave +improperly if there is a colon in the word to be completed. + +The colon is special to readline's word completion code: it is one of the +characters that breaks words for the completer. Readline uses these characters +in sort of the same way that bash uses $IFS: they break or separate the words +the completion code hands to the application-specific or default word +completion functions. The original intent was to make it easy to edit +colon-separated lists (such as $PATH in bash) in various applications using +readline for input. + +This is complicated by the fact that some versions of the popular +`bash-completion' programmable completion package have problems with the +default completion behavior in the presence of colons. + +The current set of completion word break characters is available in bash as +the value of the COMP_WORDBREAKS variable. Removing `:' from that value is +enough to make the colon not special to completion: + +COMP_WORDBREAKS=${COMP_WORDBREAKS//:} + +You can also quote the colon with a backslash to achieve the same result +temporarily. + Section F: Things to watch out for on certain Unix versions F1) Why can't I use command line editing in my `cmdtool'? @@ -1575,6 +1610,9 @@ this. These variables can be set in your .inputrc or using the bash The `set' commands between the single quotes may also be placed in ~/.inputrc. +The script examples/scripts.noah/meta.bash encapsulates the bind +commands in a shell function. + G2) How do I write a function `x' to replace builtin command `x', but still invoke the command from within the function? @@ -1748,13 +1786,9 @@ ftp.cwru.edu in the `pub/bash' directory. Cameron Newham and Bill Rosenblatt have written a book on bash, published by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn Shell book. The title is ``Learning the Bash Shell'', and the ISBN number -is 1-56592-147-X. Look for it in fine bookstores near you. This book -covers bash-1.14, but has an appendix describing some of the new features -in bash-2.0. - -A second edition of this book is available, published in January, 1998. -The ISBN number is 1-56592-347-2. Look for it in the same fine bookstores -or on the web. +of the third edition, published in March, 2005, is 0-596-00965-8. Look for +it in fine bookstores near you. This edition of the book has been updated +to cover bash-3.0. The GNU Bash Reference Manual has been published as a printed book by Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Feb 2003). It covers @@ -1762,6 +1796,16 @@ bash-2.0 and is available from most online bookstores (see http://www.network-theory.co.uk/bash/manual/ for details). The publisher will donate $1 to the Free Software Foundation for each copy sold. +Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'', +published by O'Reilly. The first edition, with ISBN number 0-596-00595-4, +was published in May, 2005. + +Chris F. A. Johnson, a frequent contributor to comp.unix.shell and +gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution +Approach,'' a new book on shell scripting, concentrating on features of +the POSIX standard helpful to shell script writers. The first edition from +Apress, with ISBN number 1-59059-471-1, was published in May, 2005. + H3) What's coming in future versions? These are features I hope to include in a future version of bash. @@ -1786,9 +1830,9 @@ Some of the new ksh93 pattern matching operators, like backreferencing H5) When will the next release appear? -The next version will appear sometime in 2006. Never make predictions. +The next version will appear sometime in 2007. Never make predictions. -This document is Copyright 1995-2005 by Chester Ramey. +This document is Copyright 1995-2006 by Chester Ramey. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, and distribute diff --git a/doc/article.ps b/doc/article.ps deleted file mode 100644 index 3aadf2f3..00000000 --- a/doc/article.ps +++ /dev/null @@ -1,1418 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.16.1 -%%CreationDate: Mon Nov 19 13:06:55 2001 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%DocumentSuppliedResources: procset grops 1.16 1 -%%Pages: 11 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.16 1 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE -/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 123 Q/F1 10 -/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q -(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S -(et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 207 R -(oduction)-.18 E(Bash)97 222.6 Q/F3 10/Times-Roman@0 SF .904 -(is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G -.904(hat will appear in the GNU operating system.)-3.404 F 1.075 -(The name is an acron)72 234.6 R 1.075(ym for the \231Bourne-Ag)-.15 F -1.075(ain SHell\232, a pun on Ste)-.05 F 1.375 -.15(ve B)-.25 H 1.075 -(ourne, the author of the direct).15 F .206(ancestor of the current)72 -246.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706<ae73>C(hell)-2.706 E -F1(/bin/sh)2.706 E F3 2.706(,w)C .205(hich appeared in the Se)-2.706 F --.15(ve)-.25 G .205(nth Edition Bell Labs Research v).15 F(er)-.15 E(-) --.2 E(sion of)72 258.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387 -(Bash is an)97 274.2 R F2(sh)2.887 E F3 .387 -(\255compatible shell that incorporates useful features from the K)B -.388(orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)-2.888 F -.023(shell \()72 286.2 R F2(csh)A F3 .023 -(\), described later in this article.)B .022 -(It is ultimately intended to be a conformant implementation of the) -5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72 -298.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569 -(fers functional)-.25 F(impro)72 310.2 Q -.15(ve)-.15 G(ments o).15 E --.15(ve)-.15 G 2.5(rs).15 G 2.5(hf)-2.5 G(or both interacti)-2.5 E .3 --.15(ve a)-.25 H(nd programming use.).15 E .697 -(While the GNU operating system will most lik)97 325.8 R .697 -(ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197 -(ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 337.8 R -.015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw) --2.515 F .016(are, Bash is quite portable.)-.1 F .016 -(It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve) -72 349.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F -3.023(wo)-.25 G .523 -(ther operating systems \255 an independently-supported port e)-3.023 F -.523(xists for OS/2, and)-.15 F .706 -(there are rumors of ports to DOS and W)72 361.8 R(indo)-.4 E .706 -(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)-5.706 F F5(UNIX)3.206 E F3 -(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)-3.206 F -(are part of the distrib)72 373.8 Q(ution.)-.2 E .405 -(The original author of Bash w)97 389.4 R .405(as Brian F)-.1 F .405 -(ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F -2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 401.4 Q -.15 -(ve)-.25 G(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 -H(olunteer who w).45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU) --.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72 -425.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 441 Q F3 .343 -(is a name originally coined by Richard Stallman for a f)2.843 F .343 -(amily of open system standards based)-.1 F(on)72 453 Q F5(UNIX)3.24 E -F3 5.74(.T)C .74(here are a number of aspects of)-5.74 F F5(UNIX)3.24 E -F3 .74(under consideration for standardization, from the basic)3.24 F -.192(system services at the system call and C library le)72 465 R -.15 -(ve)-.25 G 2.692(lt).15 G 2.692(oa)-2.692 G .192 -(pplications and tools to system administration and)-2.692 F 2.5 -(management. Each)72 477 R(area of standardization is assigned to a w) -2.5 E(orking group in the 1003 series.)-.1 E 2.814 -(The POSIX Shell and Utilities standard has been de)97 492.6 R -.15(ve) --.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254 -(\(POSIX.2\).\210 It concentrates on the command interpreter interf)72 -504.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G -(cuted).15 E 1.112(from the command line or by other programs.)72 516.6 -R 1.112(An initial v)6.112 F 1.113 -(ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613(da) -.15 G(nd)-3.613 E .365(published by the IEEE, and w)72 528.6 R .365 -(ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365 -(There are four primary areas of w)5.365 F(ork)-.1 E -(in the 1003.2 standard:)72 540.6 Q 21.5<8341>72 556.2 S .835 -(spects of the shell')-21.5 F 3.335(ss)-.55 G .835 -(yntax and command language.)-3.335 F 3.335(An)5.835 G .835 -(umber of special b)-3.335 F .835(uiltins such as)-.2 F F2(cd)3.335 E F3 -(and)3.335 E F2(exec)97 568.2 Q F3 .545(are being speci\214ed as part o\ -f the shell, since their functionality usually cannot be implemented) -3.046 F(by a separate e)97 580.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5 -<8341>72 595.8 S .926 -(set of utilities to be called by shell scripts and applications.) --18.074 F .927(Examples are programs lik)5.927 F(e)-.1 E F1 .927 -(sed, tr)3.427 F(,)-1.11 E F3(and)97 607.8 Q F1(awk.)2.797 E F3 .297 -(Utilities commonly implemented as shell b)5.297 F .296 -(uiltins are described in this section, such as)-.2 F F2(test)2.796 E F3 -(and)97 619.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922 -(xpansion of this section')-3.572 F 3.423(ss)-.55 G .923 -(cope, termed the User Portability Extension, or UPE, has)-3.423 F -(standardized interacti)97 631.8 Q .3 -.15(ve p)-.25 H(rograms such as) -.15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 647.4 S -.288(group of functional interf)-18.712 F .287(aces to services pro)-.1 -F .287(vided by the shell, such as the traditional)-.15 F/F6 10 -/Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 659.4 S .789 -(ibrary function.)-3.289 F .789(There are functions to perform shell w) -5.789 F .789(ord e)-.1 F .79(xpansions, perform \214lename e)-.15 F -(xpan-)-.15 E .324(sion \()97 671.4 R F1(globbing)A F3 .324 -(\), obtain v)B .323(alues of POSIX.2 system con\214guration v)-.25 F -.323(ariables, retrie)-.25 F .623 -.15(ve v)-.25 H .323(alues of en)-.1 -F(viron-)-.4 E(ment v)97 683.4 Q(ariables \()-.25 E F6(getenv\(\))A F3 -(\), and other services;).833 E .32 LW 144 691.4 72 691.4 DL F4 -(*An earlier v)72 703.2 Q -(ersion of this article appeared in The Linux Journal.)-.12 E(\210IEEE,) -72 715 Q/F7 8/Times-Italic@0 SF 1.231(IEEE Standar)3.231 F 3.231(df) --.296 G 1.231(or Information T)-3.231 F(ec)-.736 E(hnolo)-.12 E 1.231 -(gy -- P)-.08 F 1.231(ortable Oper)-.64 F 1.232 -(ating System Interface \(POSIX\) P)-.12 F 1.232(art 2:)-.64 F -(Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-2-)282.17 48 Q 21.5<8341>72 84 S -(suite of \231de)-19 E -.15(ve)-.25 G(lopment\232 utilities such as).15 -E/F1 10/Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of) --.15 E F1(cc)2.5 E F0(\), and)A F1(yacc.)2.5 E F0 .483 -(Bash is concerned with the aspects of the shell')97 99.6 R 2.983(sb) --.55 G(eha)-2.983 E .484(vior de\214ned by POSIX.2.)-.2 F .484 -(The shell command)5.484 F 1.439 -(language has of course been standardized, including the basic \215o)72 -111.6 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15 -G 1.438(cution con-).15 F 1.284 -(structs, I/O redirection and pipelining, ar)72 123.6 R 1.284 -(gument handling, v)-.18 F 1.284(ariable e)-.25 F 1.284 -(xpansion, and quoting.)-.15 F(The)6.285 E F1(special)3.785 E F0 -.2(bu) -72 135.6 S .676 -(iltins, which must be implemented as part of the shell to pro).2 F .676 -(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676 -(re speci\214ed)-3.176 F .7(as being part of the shell; e)72 147.6 R .7 -(xamples of these are)-.15 F/F2 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201 -H(l).15 E F0(and)3.201 E F2(export)3.201 E F0 5.701(.O)C .701 -(ther utilities appear in the sections of)-5.701 F .256(POSIX.2 not de) -72 159.6 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\ - in some cases must be\) implemented as b).2 F(uiltin)-.2 E .213 -(commands, such as)72 171.6 R F2 -.18(re)2.713 G(ad).18 E F0(and)2.713 E -F2(test)2.713 E F0 5.213(.P)C .213 -(OSIX.2 also speci\214es aspects of the shell')-5.213 F 2.713(si)-.55 G -(nteracti)-2.713 E .513 -.15(ve b)-.25 H(eha).15 E .214(vior as part)-.2 -F .598(of the UPE, including job control and command line editing.)72 -183.6 R .598(Interestingly enough, only)5.598 F F1(vi)3.098 E F0 .598 -(-style line edit-)B(ing commands ha)72 195.6 Q .3 -.15(ve b)-.2 H -(een standardized;).15 E F1(emacs)2.5 E F0 -(editing commands were left out due to objections.)2.5 E 1.128 -(While POSIX.2 includes much of what the shell has traditionally pro)97 -211.2 R 1.129(vided, some important things)-.15 F(ha)72 223.2 Q .344 --.15(ve b)-.2 H .044(een omitted as being \231be).15 F .044 -(yond its scope.)-.15 F 5.043<9a54>-.7 G .043 -(here is, for instance, no mention of a dif)-5.043 F .043 -(ference between a)-.25 F F1(lo)72 235.2 Q(gin)-.1 E F0 1.445 -(shell and an)3.945 F 3.945(yo)-.15 G 1.445(ther interacti)-3.945 F -1.745 -.15(ve s)-.25 H 1.446 -(hell \(since POSIX.2 does not specify a login program\).).15 F 1.446 -(No \214x)6.446 F(ed)-.15 E(startup \214les are de\214ned, either \255 \ -the standard does not mention)72 247.2 Q F1(.pr)2.5 E(o\214le)-.45 E F0 -(.)A F2 2.5(3. Basic)72 271.2 R(Bash featur)2.5 E(es)-.18 E F0 1.448 -(Since the Bourne shell pro)97 286.8 R 1.448 -(vides Bash with most of its philosophical underpinnings, Bash inherits) --.15 F .64(most of its features and functionality from sh.)72 298.8 R -.641(Bash implements all of the traditional sh \215o)5.641 F 3.141(wc) --.25 G .641(ontrol con-)-3.141 F .8(structs \()72 310.8 R F1(for)A F0(,) -A F1(if)3.3 E F0(,)A F1(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F -.799(of the Bourne shell b)3.3 F .799 -(uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536 -(standard, appear in Bash.)72 322.8 R(Shell)5.536 E F1(functions)3.036 E -F0 3.036(,i)C .536(ntroduced in the SVR2 v)-3.036 F .537 -(ersion of the Bourne shell, are similar)-.15 F .779 -(to shell scripts, b)72 334.8 R .779 -(ut are de\214ned using a special syntax and are e)-.2 F -.15(xe)-.15 G -.779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72 -346.8 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H -2.841(naf).15 G .341(ashion upw)-2.941 F .342 -(ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447 -(certain shell v)72 358.8 R 1.446 -(ariables that Bash interprets in the same w)-.25 F 1.446 -(ay as sh, such as)-.1 F F2(PS1)3.946 E F0(,)A F2(IFS)3.946 E F0 3.946 -(,a)C(nd)-3.946 E F2 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446 -E 1.423(implements essentially the same grammar)72 370.8 R 3.924(,p)-.4 -G 1.424(arameter and v)-3.924 F 1.424(ariable e)-.25 F 1.424 -(xpansion semantics, redirection, and)-.15 F 1.06 -(quoting as the Bourne shell.)72 382.8 R 1.06(Where dif)6.06 F 1.06 -(ferences appear between the POSIX.2 standard and traditional sh)-.25 F -(beha)72 394.8 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25 -E 1.608(The K)97 410.4 R 1.608(orn Shell \()-.35 F F2(ksh)A F0 4.108 -(\)i)C 4.108(sad)-4.108 G 1.608 -(escendent of the Bourne shell written at A)-4.108 F 1.609 -(T&T Bell Laboratories by)-1.11 F(Da)72 422.4 Q 1.059(vid K)-.2 F 3.559 -(orn\207. It)-.35 F(pro)3.559 E 1.059 -(vides a number of useful features that POSIX and Bash ha)-.15 F 1.359 --.15(ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)-3.558 -G(he)-3.558 E(interacti)72 434.4 Q 1.312 -.15(ve f)-.25 H 1.012 -(acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012 -(heir roots in the ksh: for e).15 F 1.013 -(xample, the POSIX and ksh job control)-.15 F -.1(fa)72 446.4 S .513 -(cilities are nearly identical. Bash includes features from the K).1 F -.513(orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513 -(se and shell).15 F 3.905(programming. F)72 458.4 R 1.405 -(or programming, Bash pro)-.15 F 1.405(vides v)-.15 F 1.405 -(ariables such as)-.25 F F2(RANDOM)3.905 E F0(and)3.905 E F2(REPL)3.905 -E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F2(typeset)3.905 E F0 -.2(bu)72 -470.4 S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398 -(ubstrings from v).15 F .398 -(ariables based on patterns, and shell arithmetic.)-.25 F F2(RANDOM) -5.397 E F0 -.15(ex)72 482.4 S .489 -(pands to a random number each time it is referenced; assigning a v).15 -F .49(alue to)-.25 F F2(RANDOM)2.99 E F0 .49(seeds the random)2.99 F -.055(number generator)72 494.4 R(.)-.55 E F2(REPL)5.055 E(Y)-.92 E F0 -.054(is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25 -F F2 -.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2 -F .054(ariable names are sup-)-.25 F .742(plied as ar)72 506.4 R 3.243 -(guments. The)-.18 F F2(typeset)3.243 E F0 -.2(bu)3.243 G .743 -(iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15 -(ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F2 -.18(re) -3.243 G(ad-).18 E(only)72 518.4 Q F0 5.512(.B)C .512 -(ash arithmetic allo)-5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511 -(luation of an e).25 F .511 -(xpression and the substitution of the result.)-.15 F .511(Shell v)5.511 -F(ari-)-.25 E .222 -(ables may be used as operands, and the result of an e)72 530.4 R .222 -(xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F -.222(all of)2.722 F(the operators from the C language are a)72 542.4 Q --.25(va)-.2 G(ilable, with the same precedence rules:).25 E/F3 10 -/Courier@0 SF 6($e)97 560.4 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 572.4 -Q F0 -.15(Fo)72 594 S 3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25 -H .74(se, Bash implements ksh-style aliases and b).15 F .74 -(uiltins such as)-.2 F F2(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74 -(w\) and)-.25 F F2(jobs)3.24 E F0(.)A .291(Bash aliases allo)72 606 R -2.791(was)-.25 G .291(tring to be substituted for a command name.)-2.791 -F(The)5.291 E 2.791(yc)-.15 G .291(an be used to create a mnemonic) --2.791 F .568(for a)72 618 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568 -(command name \()3.068 F F3 .568(alias del=rm)B F0 .568(\), to e)B .567 -(xpand a single w)-.15 F .567(ord to a comple)-.1 F 3.067(xc)-.15 G .567 -(ommand \()-3.067 F F3(alias)A .255 -(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 630 R F0 .255 -(\), or to ensure that a command)B(is in)72 642 Q -.2(vo)-.4 G -.1(ke).2 -G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F3 -(alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 657.6 R F2(csh) -A F0 .293(\)\207, originally written by Bill Jo)B 2.792(yw)-.1 G .292 -(hile at Berk)-2.792 F(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792(sw).65 G -.292(idely used and quite popular)-2.792 F 1.499(for its interacti)72 -669.6 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499 -(includes a csh-compatible history e)3.999 F 1.5 -(xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 681.6 -R .018(xpansion, access to a stack of directories via the)-.15 F F2 -(pushd)2.518 E F0(,)A F2(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F2(dirs) -2.518 E F0 -.2(bu)2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E -1.293(to generate users' home directories.)72 693.6 R -.35(Ti)6.294 G -1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K) --.15 F 1.294(orn Shell and)-.35 F .32 LW 144 708.2 72 708.2 DL/F5 8 -/Times-Roman@0 SF(\207Morris Bolsk)72 720 Q 2(ya)-.12 G(nd Da)-2 E -(vid K)-.16 E(orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E -(ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G -(mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G(rentice Hall, 1989.)-2 -E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-3-)282.17 48 Q(POSIX.2.)72 84 Q .148 -(There were certain areas in which POSIX.2 felt standardization w)97 -99.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)-2.849 F -.149(xisting imple-)-.15 F 1.598(mentation pro)72 111.6 R 1.598 -(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w) --6.598 F 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 -(nted and standardized functionality in).15 F .674 -(these areas, which Bash implements.)72 123.6 R(The)5.674 E/F1 10 -/Times-Bold@0 SF(command)3.174 E F0 -.2(bu)3.174 G .674(iltin w).2 F -.674(as in)-.1 F -.15(ve)-.4 G .674 -(nted so that shell functions could be).15 F .996(written to replace b) -72 135.6 R .996(uiltins; it mak)-.2 F .996(es the capabilities of the b) --.1 F .995(uiltin a)-.2 F -.25(va)-.2 G .995(ilable to the function.).25 -F .995(The reserv)5.995 F(ed)-.15 E -.1(wo)72 147.6 S 1.731 -(rd \231!\232 w).1 F 1.731(as added to ne)-.1 F -.05(ga)-.15 G 1.731 -(te the return v).05 F 1.731(alue of a command or pipeline; it w)-.25 F -1.732(as nearly impossible to)-.1 F -.15(ex)72 159.6 S .286 -(press \231if not x\232 cleanly using the sh language.).15 F .286 -(There e)5.286 F .286(xist multiple incompatible implementations of the) --.15 F F1(test)72 171.6 Q F0 -.2(bu)3.163 G .663 -(iltin, which tests \214les for type and other attrib).2 F .664 -(utes and performs arithmetic and string comparisons.)-.2 F .5 -(POSIX considered none of these correct, so the standard beha)72 183.6 R -.5(vior w)-.2 F .5(as speci\214ed in terms of the number of)-.1 F(ar)72 -195.6 Q .412(guments to the command.)-.18 F .412(POSIX.2 dictates e) -5.412 F .412(xactly what will happen when four or fe)-.15 F .412(wer ar) --.25 F .412(guments are)-.18 F(gi)72 207.6 Q -.15(ve)-.25 G 5.01(nt).15 -G(o)-5.01 E F1(test)5.01 E F0 5.01(,a)C 2.51(nd lea)-5.01 F -.15(ve)-.2 -G 5.01(st).15 G 2.51(he beha)-5.01 F 2.51(vior unde\214ned when more ar) --.2 F 2.51(guments are supplied.)-.18 F 2.51(Bash uses the)7.51 F -(POSIX.2 algorithm, which w)72 219.6 Q(as concei)-.1 E -.15(ve)-.25 G -2.5(db).15 G 2.5(yD)-2.5 G -.2(av)-2.5 G(id K).2 E(orn.)-.35 E F1 2.5 -(3.1. F)72 243.6 R(eatur)-.25 E(es not in the Bour)-.18 E(ne Shell)-.15 -E F0 .718(There are a number of minor dif)97 259.2 R .719 -(ferences between Bash and the v)-.25 F .719 -(ersion of sh present on most other)-.15 F -.15(ve)72 271.2 S .874 -(rsions of).15 F/F2 9/Times-Roman@0 SF(UNIX)3.374 E F0 5.873(.T)C .873 -(he majority of these are due to the POSIX standard, b)-5.873 F .873 -(ut some are the result of Bash)-.2 F .386 -(adopting features from other shells.)72 283.2 R -.15(Fo)5.386 G 2.886 -(ri).15 G .386(nstance, Bash includes the ne)-2.886 F 2.886<7799>-.25 G -.386(!\232 reserv)-2.886 F .386(ed w)-.15 F .386(ord, the)-.1 F F1 -(command)2.886 E F0 -.2(bu)72 295.2 S .116(iltin, the ability of the).2 -F F1 -.18(re)2.616 G(ad).18 E F0 -.2(bu)2.615 G .115 -(iltin to correctly return a line ending with a backslash, symbolic ar) -.2 F(guments)-.18 E .798(to the)72 307.2 R F1(umask)3.298 E F0 -.2(bu) -3.298 G .798(iltin, v).2 F .798(ariable substring remo)-.25 F -.25(va) --.15 G .798(l, a w).25 F .799(ay to get the length of a v)-.1 F .799 -(ariable, and the ne)-.25 F 3.299(wa)-.25 G(lgo-)-3.299 E(rithm for the) -72 319.2 Q F1(test)2.5 E F0 -.2(bu)2.5 G -(iltin from the POSIX.2 standard, none of which appear in sh.).2 E 1.225 -(Bash also implements the \231$\(...\)\232 command substitution syntax,\ - which supersedes the sh `...` con-)97 334.8 R 2.851(struct. The)72 -346.8 R .351(\231$\(...\)\232 construct e)2.851 F .351(xpands to the ou\ -tput of the command contained within the parentheses, with)-.15 F .664 -(trailing ne)72 358.8 R .664(wlines remo)-.25 F -.15(ve)-.15 G 3.164 -(d. The).15 F .664(sh syntax is accepted for backw)3.164 F .664 -(ards compatibility)-.1 F 3.164(,b)-.65 G .664 -(ut the \231$\(...\)\232 form is)-3.364 F(preferred because its quoting\ - rules are much simpler and it is easier to nest.)72 370.8 Q .772 -(The Bourne shell does not pro)97 386.4 R .772 -(vide such features as brace e)-.15 F .772 -(xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283 -(and a function with the same name, local v)72 398.4 R .282 -(ariables in shell functions, the ability to enable and disable indi-) --.25 F .547(vidual b)72 410.4 R .547 -(uiltins or write a function to replace a b)-.2 F .547 -(uiltin, or a means to e)-.2 F .547 -(xport a shell function to a child pro-)-.15 F(cess.)72 422.4 Q .32 -(Bash has closed a long-standing shell security hole by not using the)97 -438 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F -(ord)-.1 E 1.254(read by the shell, b)72 450 R 1.254 -(ut splitting only the results of e)-.2 F 1.255 -(xpansion \(ksh and the 4.4 BSD sh ha)-.15 F 1.555 -.15(ve \214)-.2 H --.15(xe).15 G 3.755(dt).15 G 1.255(his as)-3.755 F 2.907(well\). Useful) -72 462 R(beha)2.907 E .407(vior such as a means to abort e)-.2 F -.15 -(xe)-.15 G .407(cution of a script read with the \231.).15 F 2.906<9a63> --.7 G .406(ommand using the)-2.906 F F1 -.18(re)72 474 S(tur).18 E(n) --.15 E F0 -.2(bu)2.742 G .242(iltin or automatically e).2 F .242 -(xporting v)-.15 F .243(ariables in the shell')-.25 F 2.743(se)-.55 G --.4(nv)-2.743 G .243(ironment to children is also not present).4 F .969 -(in the Bourne shell.)72 486 R .968(Bash pro)5.968 F .968 -(vides a much more po)-.15 F .968(werful en)-.25 F .968 -(vironment for both interacti)-.4 F 1.268 -.15(ve u)-.25 H .968 -(se and pro-).15 F(gramming.)72 498 Q F1 2.5(4. Bash-speci\214c)72 522 R --.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .491(This section details a fe)97 -537.6 R 2.991(wo)-.25 G 2.991(ft)-2.991 G .491(he features which mak) --2.991 F 2.991(eB)-.1 G .491(ash unique.)-2.991 F .492(Most of them pro) -5.491 F .492(vide impro)-.15 F -.15(ve)-.15 G(d).15 E(interacti)72 549.6 -Q 1.182 -.15(ve u)-.25 H .882(se, b).15 F .882(ut a fe)-.2 F 3.382(wp) --.25 G .882(rogramming impro)-3.382 F -.15(ve)-.15 G .882 -(ments are present as well.).15 F .882(Full descriptions of these fea-) -5.882 F(tures can be found in the Bash documentation.)72 561.6 Q F1 2.5 -(4.1. Startup)72 585.6 R(Files)2.5 E F0 .161(Bash e)97 601.2 R -.15(xe) --.15 G .161(cutes startup \214les dif).15 F .161 -(ferently than other shells.)-.25 F .162(The Bash beha)5.161 F .162 -(vior is a compromise between)-.2 F .29 -(the csh principle of startup \214les with \214x)72 613.2 R .29 -(ed names e)-.15 F -.15(xe)-.15 G .29 -(cuted for each shell and the sh \231minimalist\232 beha).15 F(vior)-.2 -E(.)-.55 E 2.955(An interacti)72 625.2 R 3.255 -.15(ve i)-.25 H 2.955 -(nstance of Bash started as a login shell reads and e).15 F -.15(xe)-.15 -G(cutes).15 E/F3 10/Times-Italic@0 SF(~/.bash_pr)5.456 E(o\214le)-.45 E -F0 2.956(\(the \214le)5.456 F .954(.bash_pro\214le in the user')72 637.2 -R 3.454(sh)-.55 G .953(ome directory\), if it e)-3.454 F 3.453 -(xists. An)-.15 F(interacti)3.453 E 1.253 -.15(ve n)-.25 H .953 -(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F3 -(~/.bashr)72 649.2 Q(c)-.37 E F0 5.641(.A)C(non-interacti)-2.5 E .942 --.15(ve s)-.25 H .642(hell \(one be).15 F .642(gun to e)-.15 F -.15(xe) --.15 G .642(cute a shell script, for e).15 F .642 -(xample\) reads no \214x)-.15 F .642(ed startup)-.15 F .342(\214le, b)72 -661.2 R .342(ut uses the v)-.2 F .342(alue of the v)-.25 F(ariable)-.25 -E F1($ENV)2.842 E F0 2.841(,i)C 2.841(fs)-2.841 G .341 -(et, as the name of a startup \214le.)-2.841 F .341 -(The ksh practice of read-)5.341 F(ing)72 673.2 Q F1($ENV)3.114 E F0 -.614(for e)3.114 F -.15(ve)-.25 G .614(ry shell, with the accompan).15 F -.615(ying dif)-.15 F .615(\214culty of de\214ning the proper v)-.25 F -.615(ariables and functions)-.25 F .721(for interacti)72 685.2 R 1.021 --.15(ve a)-.25 H .721(nd non-interacti).15 F 1.021 -.15(ve s)-.25 H .721 -(hells or ha).15 F .721(ving the \214le read only for interacti)-.2 F -1.02 -.15(ve s)-.25 H .72(hells, w).15 F .72(as considered)-.1 F .158 -(too comple)72 697.2 R 2.658(x. Ease)-.15 F .158(of use w)2.658 F .158 -(on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne) --2.658 F .159(xt release of ksh will change to reading)-.15 F F1($ENV) -2.659 E .32 LW 144 705.2 72 705.2 DL/F4 8/Times-Roman@0 SF .559 -(\207Bill Jo)72 717 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559 -(ntroduction to the C Shell,)-2.559 F/F5 8/Times-Italic@0 SF .558 -(UNIX User')2.558 F 2.558(sS)-.32 G .558(upplementary Documents)-2.558 F -F4 2.558(,U)C(ni)-2.558 E -.12(ve)-.2 G .558(rsity of California at).12 -F(Berk)72 727 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-4-)282.17 48 Q(only for interacti)72 84 Q .3 --.15(ve s)-.25 H(hells.).15 E/F1 10/Times-Bold@0 SF 2.5(4.2. New)72 108 -R(Builtin Commands)2.5 E F0 1.02(There are a fe)97 123.6 R 3.52(wb)-.25 -G 1.02(uiltins which are ne)-3.72 F 3.52(wo)-.25 G 3.52(rh)-3.52 G -2.25 --.2(av e)-3.52 H 1.02(been e)3.72 F 1.02(xtended in Bash.)-.15 F(The) -6.02 E F1(enable)3.52 E F0 -.2(bu)3.52 G 1.02(iltin allo).2 F(ws)-.25 E --.2(bu)72 135.6 S .824(iltin commands to be turned on and of).2 F 3.324 -(fa)-.25 G(rbitrarily)-3.324 E 5.824(.T)-.65 G 3.324(ou)-6.624 G .824 -(se the v)-3.324 F .824(ersion of)-.15 F/F2 10/Times-Italic@0 SF(ec) -3.324 E(ho)-.15 E F0 .825(found in a user')3.324 F 3.325(ss)-.55 G -(earch)-3.325 E .625(path rather than the Bash b)72 147.6 R(uiltin,)-.2 -E/F3 10/Courier@0 SF .625(enable -n echo)3.125 F F0(suf)3.125 E 3.125 -(\214ces. The)-.25 F F1(help)3.124 E F0 -.2(bu)3.124 G .624(iltin pro).2 -F .624(vides quick synopses)-.15 F .703(of the shell f)72 159.6 R .704 -(acilities without requiring access to a manual page.)-.1 F F1(Builtin) -5.704 E F0 .704(is similar to)3.204 F F1(command)3.204 E F0 .704 -(in that it)3.204 F .342(bypasses shell functions and directly e)72 -171.6 R -.15(xe)-.15 G .342(cutes b).15 F .342(uiltin commands.)-.2 F -.342(Access to a csh-style stack of directories)5.342 F .072(is pro)72 -183.6 R .073(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 -E F0 2.573(,a)C(nd)-2.573 E F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 -E F1(Pushd)5.073 E F0(and)2.573 E F1(popd)2.573 E F0 .073 -(insert and remo)2.573 F .373 -.15(ve d)-.15 H .073(irectories from the) -.15 F 2.858(stack, respecti)72 195.6 R -.15(ve)-.25 G(ly).15 E 5.358(,a) --.65 G(nd)-5.358 E F1(dirs)5.358 E F0 2.858(lists the stack contents.) -5.358 F 2.858(On systems that allo)7.858 F 5.358<778c>-.25 G 2.857 -(ne-grained control of)-5.358 F 1.339(resources, the)72 207.6 R F1 -(ulimit)3.839 E F0 -.2(bu)3.839 G 1.339 -(iltin can be used to tune these settings.).2 F F1(Ulimit)6.34 E F0 -(allo)3.84 E 1.34(ws a user to control, among)-.25 F 1.086 -(other things, whether core dumps are to be generated, ho)72 219.6 R -3.586(wm)-.25 G 1.086(uch memory the shell or a child process is)-3.586 -F(allo)72 231.6 Q .496(wed to allocate, and ho)-.25 F 2.996(wl)-.25 G -(ar)-2.996 E .496(ge a \214le created by a child process can gro)-.18 F -4.296 -.65(w. T)-.25 H(he).65 E F1(suspend)2.996 E F0 .497(command will) -2.997 F .744(stop the shell process when job control is acti)72 243.6 R --.15(ve)-.25 G 3.243(;m).15 G .743(ost other shells do not allo)-3.243 F -3.243(wt)-.25 G(hemselv)-3.243 E .743(es to be stopped)-.15 F(lik)72 -255.6 Q 2.717(et)-.1 G(hat.)-2.717 E F1 -.74(Ty)5.217 G(pe,).74 E F0 -.217(the Bash answer to)2.717 F F1(which)2.717 E F0(and)2.717 E F1 -(whence,)2.717 E F0(sho)2.717 E .218(ws what will happen when a w)-.25 F -.218(ord is typed as a)-.1 F(command:)72 267.6 Q F3 6($t)97 285.6 S -(ype export)-6 E(export is a shell builtin)97 297.6 Q 6($t)97 309.6 S -(ype -t export)-6 E(builtin)97 321.6 Q 6($t)97 333.6 S(ype bash)-6 E -(bash is /bin/bash)97 345.6 Q 6($t)97 357.6 S(ype cd)-6 E -(cd is a function)97 369.6 Q(cd \(\))97 381.6 Q({)97 393.6 Q -(builtin cd ${1+"$@"} && xtitle $HOST: $PWD)121 405.6 Q(})97 417.6 Q F0 --1.11(Va)72 439.2 S .682(rious modes tell what a command w)1.11 F .681 -(ord is \(reserv)-.1 F .681(ed w)-.15 F .681(ord, alias, function, b)-.1 -F .681(uiltin, or \214le\) or which v)-.2 F(er)-.15 E(-)-.2 E 1.15 -(sion of a command will be e)72 451.2 R -.15(xe)-.15 G 1.15 -(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)-3.65 F -1.15(Some of this functionality has been)6.15 F -(adopted by POSIX.2 and folded into the)72 463.2 Q F1(command)2.5 E F0 -(utility)2.5 E(.)-.65 E F1 2.5(4.3. Editing)72 487.2 R(and Completion) -2.5 E F0 .682(One area in which Bash shines is command line editing.)97 -502.8 R .682(Bash uses the)5.682 F F2 -.37(re)3.182 G(adline).37 E F0 -.681(library to read and)3.181 F .942(edit lines when interacti)72 514.8 -R -.15(ve)-.25 G 5.942(.R).15 G .942(eadline is a po)-5.942 F .942 -(werful and \215e)-.25 F .942(xible input f)-.15 F .943 -(acility that a user can con\214gure to)-.1 F(indi)72 526.8 Q .732 -(vidual tastes.)-.25 F .732(It allo)5.732 F .732(ws lines to be edited \ -using either emacs or vi commands, where those commands)-.25 F .2 -(are appropriate.)72 538.8 R .2 -(The full capability of emacs is not present \255 there is no w)5.2 F .2 -(ay to e)-.1 F -.15(xe)-.15 G .2(cute a named command).15 F 1.15 -(with M-x, for instance \255 b)72 550.8 R 1.15(ut the e)-.2 F 1.149 -(xisting commands are more than adequate.)-.15 F 1.149 -(The vi mode is compliant)6.149 F -(with the command line editing standardized by POSIX.2.)72 562.8 Q 1.69 -(Readline is fully customizable.)97 578.4 R 1.691 -(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H -1.691(indings, the library).15 F(allo)72 590.4 Q .028 -(ws users to de\214ne additional k)-.25 F .327 -.15(ey b)-.1 H .027 -(indings using a startup \214le.).15 F(The)5.027 E F2(inputr)2.527 E(c) --.37 E F0 .027(\214le, which def)2.527 F .027(aults to the \214le)-.1 F -F2(~/.inputr)72 602.4 Q(c)-.37 E F0 3.002(,i)C 3.002(sr)-3.002 G .503(e\ -ad each time readline initializes, permitting users to maintain a consi\ -stent interf)-3.002 F .503(ace across a)-.1 F .893(set of programs.)72 -614.4 R .893(Readline includes an e)5.893 F .893(xtensible interf)-.15 F -.892(ace, so each program using the library can add its)-.1 F -.25(ow)72 -626.4 S 3.56(nb).25 G 1.06(indable commands and program-speci\214c k) --3.56 F 1.361 -.15(ey b)-.1 H 3.561(indings. Bash).15 F 1.061 -(uses this f)3.561 F 1.061(acility to add bindings that)-.1 F -(perform history e)72 638.4 Q(xpansion or shell w)-.15 E(ord e)-.1 E -(xpansions on the current input line.)-.15 E .707 -(Readline interprets a number of v)97 654 R .706 -(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G -.706(ariables e)-6.816 F .706(xist to control)-.15 F .157 -(whether or not eight-bit characters are directly read as input or con) -72 666 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F -.458 -.15(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 678 Q .082 -(ed k)-.15 F .382 -.15(ey s)-.1 H .081(equence consists of the characte\ -r with the eighth bit zeroed, preceded by the).15 F F2(meta-pr)2.581 E -(e\214x)-.37 E F0(character)72 690 Q 3.233(,u)-.4 G .733 -(sually escape, which selects an alternate k)-3.233 F -.15(ey)-.1 G .734 -(map\), to decide whether to output characters with).15 F .624 -(the eighth bit set directly or as a meta-pre\214x)72 702 R .624(ed k) --.15 F .924 -.15(ey s)-.1 H .623 -(equence, whether or not to wrap to a ne).15 F 3.123(ws)-.25 G .623 -(creen line)-3.123 F 1.196 -(when a line being edited is longer than the screen width, the k)72 714 -R -.15(ey)-.1 G 1.196(map to which subsequent k).15 F 1.496 -.15(ey b) --.1 H(indings).15 E .531(should apply)72 726 R 3.031(,o)-.65 G 3.031(re) --3.031 G -.15(ve)-3.281 G 3.031(nw).15 G .531 -(hat happens when readline w)-3.031 F .531(ants to ring the terminal') --.1 F 3.03(sb)-.55 G 3.03(ell. All)-3.03 F .53(of these v)3.03 F -(ariables)-.25 E EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-5-)282.17 48 Q -(can be set in the inputrc \214le.)72 84 Q .284 -(The startup \214le understands a set of C preprocessor)97 99.6 R(-lik) --.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)-2.785 F -2.785(wv)-.25 G(ariables)-3.035 E .12(or k)72 111.6 R .42 -.15(ey b)-.1 -H .119(indings to be assigned based on the application using readline, \ -the terminal currently being used, or).15 F .338(the editing mode.)72 -123.6 R .338(Users can add program-speci\214c bindings to mak)5.338 F -2.838(et)-.1 G .338(heir li)-2.838 F -.15(ve)-.25 G 2.838(se).15 G 2.838 -(asier: I)-2.838 F(ha)2.838 E .639 -.15(ve b)-.2 H .339(indings that).15 -F(let me edit the v)72 135.6 Q(alue of)-.25 E/F1 10/Times-Bold@0 SF($P) -2.5 E -.95(AT)-.74 G(H).95 E F0(and double-quote the current or pre)2.5 -E(vious w)-.25 E(ord:)-.1 E/F2 10/Courier@0 SF 6(#M)97 153.6 S -(acros that are convenient for shell interaction)-6 E($if Bash)97 165.6 -Q 6(#e)97 177.6 S(dit the path)-6 E -("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 189.6 Q 6(#p)97 201.6 -S(repare to type a quoted word -- insert open and close double)-6 E 6 -(#q)97 213.6 S(uotes and move to just after the open quote)-6 E -("\\C-x\\"": "\\"\\"\\C-b")97 225.6 Q 6(#Q)97 237.6 S -(uote the current or previous word)-6 E("\\C-xq": "\\eb\\"\\ef\\"")97 -249.6 Q($endif)97 261.6 Q F0 .322(There is a readline command to re-rea\ -d the \214le, so users can edit the \214le, change some bindings, and b\ -e)72 283.2 R(gin)-.15 E(to use them almost immediately)72 295.2 Q(.)-.65 -E .851(Bash implements the)97 310.8 R F1(bind)3.351 E F0 -.2(bu)3.351 G -.851(iltin for more dyamic control of readline than the startup \214le \ -permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve) --.25 G .25(ral w).15 F 2.75(ays. In)-.1 F/F3 10/Times-Italic@0 SF(list) -2.75 E F0 .25(mode, it can display the current k)2.75 F .55 -.15(ey b) --.1 H .25(indings, list all the readline edit-).15 F .149(ing directi)72 -334.8 R -.15(ve)-.25 G 2.649(sa).15 G -.25(va)-2.849 G .149 -(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G --1.9 -.4(nv o)-2.649 H .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65 -(nd).25 G(irecti)-2.65 E -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)-2.65 G -.15(utput the current set of k)-2.65 F -.15(ey)-.1 G .042(bindings in a\ - format that can be incorporated directly into an inputrc \214le.)72 -346.8 R(In)5.041 E F3(batc)2.541 E(h)-.15 E F0 .041 -(mode, it reads a series of)2.541 F -.1(ke)72 358.8 S 2.858(yb)-.05 G -.359(indings directly from a \214le and passes them to readline.)-2.858 -F .359(In its most common usage,)5.359 F F1(bind)2.859 E F0(tak)2.859 E -.359(es a sin-)-.1 F 1.117(gle string and passes it directly to readlin\ -e, which interprets the line as if it had just been read from the)72 -370.8 R(inputrc \214le.)72 382.8 Q(Both k)5 E .3 -.15(ey b)-.1 H -(indings and v).15 E(ariable assignments may appear in the string gi) --.25 E -.15(ve)-.25 G 2.5(nt).15 G(o)-2.5 E F1(bind)2.5 E F0(.)A .53 -(The readline library also pro)97 398.4 R .53(vides an interf)-.15 F .53 -(ace for)-.1 F F3(wor)3.03 E 3.03(dc)-.37 G(ompletion)-3.03 E F0 5.53 -(.W)C .53(hen the)-5.53 F F3(completion)3.03 E F0(character)3.03 E 1.261 -(\(usually T)72 410.4 R 1.261(AB\) is typed, readline looks at the w) --.93 F 1.26(ord currently being entered and computes the set of \214le-) --.1 F .523(names of which the current w)72 422.4 R .523(ord is a v)-.1 F -.523(alid pre\214x.)-.25 F .524 -(If there is only one possible completion, the rest of the)5.523 F .358 -(characters are inserted directly)72 434.4 R 2.858(,o)-.65 G .358(therw\ -ise the common pre\214x of the set of \214lenames is added to the curre\ -nt)-2.858 F -.1(wo)72 446.4 S 3.199(rd. A).1 F .699(second T)3.199 F -.699(AB character entered immediately after a non-unique completion cau\ -ses readline to list)-.93 F 1.814 -(the possible completions; there is an option to ha)72 458.4 R 2.113 --.15(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 -G 1.813(eadline pro)-6.813 F(vides)-.15 E .482 -(hooks so that applications can pro)72 470.4 R .482 -(vide speci\214c types of completion before the def)-.15 F .483 -(ault \214lename completion)-.1 F .132(is attempted.)72 482.4 R .132 -(This is quite \215e)5.132 F .132 -(xible, though it is not completely user)-.15 F 2.632 -(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F -.37(complete \214lenames, command names \(including aliases, b)72 494.4 -R .37(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37 -(ords, shell functions, and)-.1 F -.15(exe)72 506.4 S .424 -(cutables found in the \214le system\), shell v).15 F .424 -(ariables, usernames, and hostnames.)-.25 F .423 -(It uses a set of heuristics)5.424 F(that, while not perfect, is genera\ -lly quite good at determining what type of completion to attempt.)72 -518.4 Q F1 2.5(4.4. History)72 542.4 R F0 .144 -(Access to the list of commands pre)97 558 R .144(viously entered \(the) --.25 F F3 .144(command history)2.644 F F0 2.644(\)i)C 2.644(sp)-2.644 G -(ro)-2.644 E .144(vided jointly by Bash)-.15 F .078 -(and the readline library)72 570 R 5.077(.B)-.65 G .077(ash pro)-5.077 F -.077(vides v)-.15 F .077(ariables \()-.25 F F1($HISTFILE)A F0(,)A F1 -($HISTSIZE)2.577 E F0 2.577(,a)C(nd)-2.577 E F1($HISTCONTR)2.577 E(OL) --.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.89 E F0(and) -2.89 E F1(fc)2.89 E F0 -.2(bu)2.89 G .39 -(iltins to manipulate the history list.).2 F .391(The v)5.391 F .391 -(alue of)-.25 F F1($HISTFILE)2.891 E F0 .391(specifes the \214le where) -2.891 F .49(Bash writes the command history on e)72 594 R .489 -(xit and reads it on startup.)-.15 F F1($HISTSIZE)5.489 E F0 .489 -(is used to limit the number)2.989 F .642(of commands sa)72 606 R -.15 -(ve)-.2 G 3.142(di).15 G 3.142(nt)-3.142 G .642(he history)-3.142 F(.) --.65 E F1($HISTCONTR)5.642 E(OL)-.3 E F0(pro)3.142 E .642 -(vides a crude form of control o)-.15 F -.15(ve)-.15 G 3.142(rw).15 G -.642(hich com-)-3.142 F .025(mands are sa)72 618 R -.15(ve)-.2 G 2.525 -(do).15 G 2.525(nt)-2.525 G .025(he history list: a v)-2.525 F .025 -(alue of)-.25 F F3(ignor)2.525 E(espace)-.37 E F0 .025(means to not sa) -2.525 F .324 -.15(ve c)-.2 H .024(ommands which be).15 F .024 -(gin with a)-.15 F .927(space; a v)72 630 R .927(alue of)-.25 F F3 -(ignor)3.427 E(edups)-.37 E F0 .927(means to not sa)3.427 F 1.228 -.15 -(ve c)-.2 H .928(ommands identical to the last command sa).15 F -.15(ve) --.2 G(d.).15 E F1($HIST)5.928 E(-)-.92 E(CONTR)72 642 Q(OL)-.3 E F0 -.1 -(wa)3.778 G 3.778(sn).1 G(amed)-3.778 E F1($history_contr)3.778 E(ol) --.18 E F0 1.278(in earlier v)3.778 F 1.278 -(ersions of Bash; the old name is still accepted for)-.15 F(backw)72 654 -Q .575(ards compatibility)-.1 F 5.575(.T)-.65 G(he)-5.575 E F1(history) -3.075 E F0 .575 -(command can read or write \214les containing the history list and dis-) -3.075 F .167(play the current list contents.)72 666 R(The)5.167 E F1(fc) -2.667 E F0 -.2(bu)2.667 G .167(iltin, adopted from POSIX.2 and the K).2 -F .167(orn Shell, allo)-.35 F .167(ws display and)-.25 F(re-e)72 678 Q --.15(xe)-.15 G .58 -(cution, with optional editing, of commands from the history list.).15 F -.58(The readline library of)5.58 F .58(fers a set of)-.25 F 1.255(comma\ -nds to search the history list for a portion of the current input line \ -or a string typed by the user)72 690 R(.)-.55 E(Finally)72 702 Q 2.535 -(,t)-.65 G(he)-2.535 E F3(history)2.535 E F0(library)2.535 E 2.535(,g) --.65 G .036(enerally incorporated directly into the readline library) --2.535 F 2.536(,i)-.65 G .036(mplements a f)-2.536 F .036(acility for) --.1 F 1.023(history recall, e)72 714 R 1.022(xpansion, and re-e)-.15 F --.15(xe)-.15 G 1.022(cution of pre).15 F 1.022(vious commands v)-.25 F -1.022(ery similar to csh \(\231bang history\232, so)-.15 F -(called because the e)72 726 Q -(xclamation point introduces a history substitution\):)-.15 E EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-6-)282.17 48 Q/F1 10/Courier@0 SF 6($e)97 84 S -(cho a b c d e)-6 E 6(abcde)97 96 S 6($!)97 108 S 6(!fghi)-6 G -(echo a b c d e f g h i)97 120 Q 6(abcdefghi)97 132 S 6($!)97 144 S(-2) --6 E(echo a b c d e)97 156 Q 6(abcde)97 168 S 6($e)97 180 S(cho !-2:1-4) --6 E(echo a b c d)97 192 Q 6(abcd)97 204 S F0 1.456 -(The command history is only sa)72 225.6 R -.15(ve)-.2 G 3.957(dw).15 G -1.457(hen the shell is interacti)-3.957 F -.15(ve)-.25 G 3.957(,s).15 G -3.957(oi)-3.957 G 3.957(ti)-3.957 G 3.957(sn)-3.957 G 1.457(ot a)-3.957 -F -.25(va)-.2 G 1.457(ilable for use by shell).25 F(scripts.)72 237.6 Q -/F2 10/Times-Bold@0 SF 2.5(4.5. New)72 261.6 R(Shell V)2.5 E(ariables) --.92 E F0 .59(There are a number of con)97 277.2 R -.15(ve)-.4 G .589 -(nience v).15 F .589(ariables that Bash interprets to mak)-.25 F 3.089 -(el)-.1 G .589(ife easier)-3.089 F 5.589(.T)-.55 G .589(hese include) --5.589 F F2(FIGNORE)72 289.2 Q F0 3.973(,w)C 1.473 -(hich is a set of \214lename suf)-3.973 F<8c78>-.25 E 1.474 -(es identifying \214les to e)-.15 F 1.474 -(xclude when completing \214lenames;)-.15 F F2(HOSTTYPE)72 301.2 Q F0 -2.932(,w)C .432 -(hich is automatically set to a string describing the type of hardw) --2.932 F .431(are on which Bash is cur)-.1 F(-)-.2 E .335(rently e)72 -313.2 R -.15(xe)-.15 G(cuting;).15 E F2(command_oriented_history)2.835 E -F0 2.835(,w)C .335(hich directs Bash to sa)-2.835 F .635 -.15(ve a)-.2 H -.336(ll lines of a multiple-line com-).15 F 1.071(mand such as a)72 -325.2 R/F3 10/Times-Italic@0 SF(while)3.571 E F0(or)3.571 E F3(for)3.571 -E F0 1.071(loop in a single history entry)3.571 F 3.57(,a)-.65 G(llo) --3.57 E 1.07(wing easy re-editing; and)-.25 F F2(IGNOREEOF)3.57 E F0(,)A -.747(whose v)72 337.2 R .747(alue indicates the number of consecuti)-.25 -F 1.047 -.15(ve E)-.25 H .747(OF characters that an interacti).15 F -1.048 -.15(ve s)-.25 H .748(hell will read before).15 F -.15(ex)72 349.2 -S 1.432(iting \255 an easy w).15 F 1.432(ay to k)-.1 F 1.432 -(eep yourself from being logged out accidentally)-.1 F 6.432(.T)-.65 G -(he)-6.432 E F2(auto_r)3.932 E(esume)-.18 E F0 -.25(va)3.932 G(riable) -.25 E .571(alters the w)72 361.2 R .571 -(ay the shell treats simple command names: if job control is acti)-.1 F --.15(ve)-.25 G 3.071(,a).15 G .571(nd this v)-3.071 F .571 -(ariable is set, sin-)-.25 F(gle-w)72 373.2 Q .239(ord simple commands \ -without redirections cause the shell to \214rst look for and restart a \ -suspended job)-.1 F(with that name before starting a ne)72 385.2 Q 2.5 -(wp)-.25 G(rocess.)-2.5 E F2 2.5(4.6. Brace)72 409.2 R(Expansion)2.5 E -F0 .653(Since sh of)97 424.8 R .653(fers no con)-.25 F -.15(ve)-.4 G -.653(nient w).15 F .653 -(ay to generate arbitrary strings that share a common pre\214x or suf) --.1 F<8c78>-.25 E 2.124(\(\214lename e)72 436.8 R 2.124 -(xpansion requires that the \214lenames e)-.15 F 2.123 -(xist\), Bash implements)-.15 F F3(br)4.623 E 2.123(ace e)-.15 F -(xpansion)-.2 E F0 4.623(,ac)C(apability)-4.623 E(pick)72 448.8 Q .773 -(ed up from csh.)-.1 F .774(Brace e)5.773 F .774 -(xpansion is similar to \214lename e)-.15 F .774(xpansion, b)-.15 F .774 -(ut the strings generated need not)-.2 F 1.211(correspond to e)72 460.8 -R 1.211(xisting \214les.)-.15 F 3.711(Ab)6.211 G 1.211(race e)-3.711 F -1.211(xpression consists of an optional)-.15 F F3(pr)3.71 E(eamble)-.37 -E F0 3.71(,f)C(ollo)-3.71 E 1.21(wed by a pair of)-.25 F 2.938 -(braces enclosing a series of comma-separated strings, and an optional) -72 472.8 R F3(postamble)5.438 E F0 7.938(.T)C 2.938(he preamble is) --7.938 F(prepended to each string within the braces, and the postamble \ -is then appended to each resulting string:)72 484.8 Q F1 6($e)97 502.8 S -(cho a{d,c,b}e)-6 E(ade ace abe)97 514.8 Q F0 .306(As this e)72 536.4 R -.306(xample demonstrates, the results of brace e)-.15 F .305 -(xpansion are not sorted, as the)-.15 F 2.805(ya)-.15 G .305 -(re by \214lename e)-2.805 F(xpan-)-.15 E(sion.)72 548.4 Q F2 2.5 -(4.7. Pr)72 572.4 R(ocess Substitution)-.18 E F0 .457 -(On systems that can support it, Bash pro)97 588 R .457(vides a f)-.15 F -.457(acility kno)-.1 F .458(wn as)-.25 F F3(pr)2.958 E .458 -(ocess substitution)-.45 F F0 5.458(.P)C .458(rocess sub-)-5.458 F .347 -(stitution is similar to command substitution in that its speci\214cati\ -on includes a command to e)72 600 R -.15(xe)-.15 G .346(cute, b).15 F -.346(ut the)-.2 F .181(shell does not collect the command')72 612 R -2.681(so)-.55 G .181(utput and insert it into the command line.)-2.681 F -(Rather)5.181 E 2.681(,B)-.4 G .182(ash opens a pipe)-2.681 F 1.861 -(to the command, which is run in the background.)72 624 R 1.861 -(The shell uses named pipes \(FIFOs\) or the)6.861 F F3(/de)4.361 E -(v/fd)-.15 E F0 .961(method of naming open \214les to e)72 636 R .962(x\ -pand the process substitution to a \214lename which connects to the pip\ -e)-.15 F .104(when opened.)72 648 R .103 -(This \214lename becomes the result of the e)5.104 F 2.603 -(xpansion. Process)-.15 F .103(substitution can be used to com-)2.603 F -(pare the outputs of tw)72 660 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E -(ersions of an application as part of a re)-.15 E(gression test:)-.15 E -F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-7-)282.17 48 Q/F1 10/Times-Bold@0 SF 2.5 -(4.8. Pr)72 84 R(ompt Customization)-.18 E F0 2.229 -(One of the more popular interacti)97 99.6 R 2.529 -.15(ve f)-.25 H -2.229(eatures that Bash pro).15 F 2.23 -(vides is the ability to customize the)-.15 F 3.234(prompt. Both)72 -111.6 R F1($PS1)3.234 E F0(and)3.234 E F1($PS2,)3.234 E F0 .734 -(the primary and secondary prompts, are e)3.234 F .733 -(xpanded before being displayed.)-.15 F -.15(Pa)72 123.6 S .804 -(rameter and v).15 F .804(ariable e)-.25 F .805 -(xpansion is performed when the prompt string is e)-.15 F .805 -(xpanded, so an)-.15 F 3.305(ys)-.15 G .805(hell v)-3.305 F(ariable)-.25 -E .729(can be put into the prompt \(e.g.,)72 135.6 R F1($SHL)3.228 E(VL) --.92 E F0 3.228(,w)C .728(hich indicates ho)-3.228 F 3.228(wd)-.25 G -.728(eeply the current shell is nested\).)-3.228 F(Bash)5.728 E 1.895(s\ -pecially interprets characters in the prompt string preceded by a backs\ -lash.)72 147.6 R 1.895(Some of these backslash)6.895 F .874 -(escapes are replaced with the current time, the date, the current w)72 -159.6 R .874(orking directory)-.1 F 3.373(,t)-.65 G .873 -(he username, and the)-3.373 F .78 -(command number or history number of the command being entered.)72 171.6 -R .781(There is e)5.781 F -.15(ve)-.25 G 3.281(nab).15 G .781 -(ackslash escape to)-3.281 F .007 -(cause the shell to change its prompt when running as root after an)72 -183.6 R/F2 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007 -(efore printing each primary prompt,)-5.007 F .305(Bash e)72 195.6 R -.305(xpands the v)-.15 F(ariable)-.25 E F1($PR)2.805 E(OMPT_COMMAND)-.3 -E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G -.306(cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735 -(ac)72 207.6 S 1.235(ommand, allo)-3.735 F 1.234 -(wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re) -.15 G 1.234(xample, this assignment causes the current)-3.884 F(user)72 -219.6 Q 2.917(,t)-.4 G .417 -(he current host, the time, the last component of the current w)-2.917 F -.417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)-2.917 F -.15(ve) --.25 G 2.918(lo).15 G 2.918(fs)-2.918 G .418(hell nest-)-2.918 F(ing, a\ -nd the history number of the current command to be embedded into the pr\ -imary prompt:)72 231.6 Q/F3 10/Courier@0 SF 6($P)97 249.6 S -(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')-6 E -(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 261.6 Q -(chet@odin [21:03:54] src\(2:637\)$)97 273.6 Q F0 .146(The string being\ - assigned is surrounded by single quotes so that if it is e)72 295.2 R -.146(xported, the v)-.15 F .146(alue of)-.25 F F1($SHL)2.646 E(VL)-.92 E -F0(will)2.646 E(be updated by a child shell:)72 307.2 Q F3 -(chet@odin [21:17:35] src\(2:638\)$ export PS1)97 325.2 Q -(chet@odin [21:17:40] src\(2:639\)$ bash)97 337.2 Q -(chet@odin [21:17:46] src\(3:696\)$)97 349.2 Q F0 -(The \\$ escape is displayed as \231)72 370.8 Q F1($)A F0 2.5<9a77>C -(hen running as a normal user)-2.5 E 2.5(,b)-.4 G(ut as \231)-2.7 E F1 -(#)A F0 2.5<9a77>C(hen running as root.)-2.5 E F1 2.5(4.9. File)72 394.8 -R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 410.4 R(ele)-.1 E -2.529(yi)-.15 G .029 -(ntroduced symbolic links in 4.2 BSD, one of their most anno)-2.529 F -.03(ying properties has been)-.1 F .764(the \231w)72 422.4 R .764 -(arping\232 to a completely dif)-.1 F .764 -(ferent area of the \214le system when using)-.25 F F1(cd)3.263 E F0 -3.263(,a)C .763(nd the resultant non-intu-)-3.263 F(iti)72 434.4 Q .704 --.15(ve b)-.25 H(eha).15 E .405(vior of \231)-.2 F F1 .405(cd ..)B F0 -2.905(\232. The)B/F4 9/Times-Roman@0 SF(UNIX)2.905 E F0 -.1(ke)2.905 G -.405(rnel treats symbolic links).1 F F2(physically)2.905 E F0 5.405(.W)C -.405(hen the k)-5.405 F .405(ernel is translating)-.1 F 3.223(ap)72 -446.4 S .723(athname in which one component is a symbolic link, it repl\ -aces all or part of the pathname while pro-)-3.223 F .668 -(cessing the link.)72 458.4 R .668 -(If the contents of the symbolic link be)5.668 F .669 -(gin with a slash, the k)-.15 F .669(ernel replaces the pathname)-.1 F -.219(entirely; if not, the link contents replace the current component.) -72 470.4 R .219(In either case, the symbolic link is visible.)5.219 F -.058(If the link v)72 482.4 R .058(alue is an absolute pathname, the us\ -er \214nds himself in a completely dif)-.25 F .059 -(ferent part of the \214le sys-)-.25 F(tem.)72 494.4 Q .704(Bash pro)97 -510 R .704(vides a)-.15 F F2(lo)3.203 E(gical)-.1 E F0(vie)3.203 E 3.203 -(wo)-.25 G 3.203(ft)-3.203 G .703(he \214le system.)-3.203 F .703 -(In this def)5.703 F .703(ault mode, command and \214lename com-)-.1 F -.522(pletion and b)72 522 R .522(uiltin commands such as)-.2 F F1(cd) -3.022 E F0(and)3.022 E F1(pushd)3.022 E F0 .522 -(which change the current w)3.022 F .522(orking directory transpar)-.1 F -(-)-.2 E .127(ently follo)72 534 R 2.627(ws)-.25 G .127 -(ymbolic links as if the)-2.627 F 2.627(yw)-.15 G .127(ere directories.) --2.627 F(The)5.126 E F1($PWD)2.626 E F0 -.25(va)2.626 G .126 -(riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)-2.626 -F .366(the current w)72 546 R .366(orking directory)-.1 F 2.866(,d)-.65 -G .367 -(epends on the path used to reach the directory rather than its ph) --2.866 F .367(ysical loca-)-.05 F -(tion in the local \214le system hierarch)72 558 Q 3.8 -.65(y. F)-.05 H -(or e).5 E(xample:)-.15 E F3 6($c)97 576 S 6(d/)-6 G(usr/local/bin)-6 E -6($e)97 588 S(cho $PWD)-6 E(/usr/local/bin)97 600 Q 6($p)97 612 S(wd)-6 -E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E -(/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p) -97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E -(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-8-)282.17 48 Q/F1 10/Courier@0 SF 6($p)97 84 S -(wd)-6 E(/usr)97 96 Q 6($/)97 108 S(bin/pwd)-6 E(/usr)97 120 Q F0 .3(On\ -e problem with this, of course, arises when programs that do not unders\ -tand the shell')72 141.6 R 2.8(sl)-.55 G .3(ogical notion of)-2.8 F .217 -(the \214le system interpret \231..)72 153.6 R 2.718<9a64>-.7 G(if) --2.718 E(ferently)-.25 E 5.218(.T)-.65 G .218 -(his generally happens when Bash completes \214lenames containing)-5.218 -F(\231..)72 165.6 Q 3.384<9a61>-.7 G .884 -(ccording to a logical hierarch)-3.384 F 3.384(yw)-.05 G .884 -(hich does not correspond to their ph)-3.384 F .883(ysical location.) --.05 F -.15(Fo)5.883 G 3.383(ru).15 G .883(sers who)-3.383 F -(\214nd this troublesome, a corresponding)72 177.6 Q/F2 10 -/Times-Italic@0 SF(physical)2.5 E F0(vie)2.5 E 2.5(wo)-.25 G 2.5(ft)-2.5 -G(he \214le system is a)-2.5 E -.25(va)-.2 G(ilable:).25 E F1 6($c)97 -195.6 S 6(d/)-6 G(usr/local/bin)-6 E 6($p)97 207.6 S(wd)-6 E -(/usr/local/bin)97 219.6 Q 6($s)97 231.6 S(et -o physical)-6 E 6($p)97 -243.6 S(wd)-6 E(/net/share/sun4/local/bin)97 255.6 Q/F3 10/Times-Bold@0 -SF 2.5(4.10. Inter)72 285.6 R(nationalization)-.15 E F0 .145 -(One of the most signi\214cant impro)97 301.2 R -.15(ve)-.15 G .145 -(ments in v).15 F .145(ersion 1.13 of Bash w)-.15 F .145 -(as the change to \231eight-bit clean-)-.1 F 2.933(liness\232. Pre)72 -313.2 R .433(vious v)-.25 F .432 -(ersions used the eighth bit of characters to mark whether or not the) --.15 F 2.932(yw)-.15 G .432(ere quoted when)-2.932 F 1.495(performing w) -72 325.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495 -(this did not af)3.995 F 1.496 -(fect the majority of users, most of whom used only)-.25 F(se)72 337.2 Q --.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.) -.15 F(Be)6.236 E 1.236(ginning with v)-.15 F 1.236 -(ersion 1.13, Bash implemented a)-.15 F(dif)72 349.2 Q .02(ferent quoti\ -ng mechanism that did not alter the eighth bit of characters.)-.25 F -.021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .427 -(\214les with \231odd\232 characters in their names, b)72 361.2 R .427 -(ut did nothing to help users enter those names, so v)-.2 F .426 -(ersion 1.13)-.15 F 1.458 -(introduced changes to readline that made it eight-bit clean as well.)72 -373.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F -.744(attach no special signi\214cance to characters with the eighth bit\ - set \(the def)72 385.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F --.15(ve)-.4 G .744(rt these).15 F .641(characters to meta-pre\214x)72 -397.2 R .641(ed k)-.15 F .941 -.15(ey s)-.1 H .642 -(equences\) and to output these characters without con).15 F -.15(ve)-.4 -G .642(rsion to meta-pre-).15 F<8c78>72 409.2 Q .008(ed sequences.)-.15 -F .007(These changes, along with the e)5.007 F .007(xpansion of k)-.15 F --.15(ey)-.1 G .007(maps to a full eight bits, enable readline to).15 F --.1(wo)72 421.2 S(rk with most of the ISO-8859 f).1 E -(amily of character sets, used by man)-.1 E 2.5(yE)-.15 G -(uropean countries.)-2.5 E F3 2.5(4.11. POSIX)72 445.2 R(Mode)2.5 E F0 -.584(Although Bash is intended to be POSIX.2 conformant, there are area\ -s in which the def)97 460.8 R .584(ault beha)-.1 F(vior)-.2 E .463 -(is not compatible with the standard.)72 472.8 R -.15(Fo)5.463 G 2.962 -(ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)-2.962 F -.462(vironment, Bash)-.4 F .505(implements a)72 484.8 R F2 .505 -(POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)-5.505 F --.15(ve)-.25 G 3.005(,B).15 G .505(ash modi\214es its def)-3.005 F .505 -(ault operation where it dif)-.1 F(fers)-.25 E .267 -(from POSIX.2 to match the standard.)72 496.8 R .266 -(POSIX mode is entered when Bash is started with the)5.267 F F3(-posix) -2.766 E F0(option.)2.766 E .149(This feature is also a)72 508.8 R -.25 -(va)-.2 G .149(ilable as an option to the).25 F F3(set)2.649 E F0 -.2 -(bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149 -(or compatibility with other GNU)-5.299 F(softw)72 520.8 Q 4.02(are tha\ -t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the \ -v)-.1 F(ariable)-.25 E F3($POSIXL)72 532.8 Q(Y_CORRECT)-.92 E F0 5.824 -(is set when Bash is started or assigned a v)8.324 F 5.825 -(alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72 -544.8 Q(ANTIC)-.35 E F0 .27 -(is accepted as well, to be compatible with some older GNU utilities.) -2.77 F .27(When Bash is)5.27 F .506(started in POSIX mode, for e)72 -556.8 R .506(xample, it sources the \214le named by the v)-.15 F .507 -(alue of)-.25 F F3($ENV)3.007 E F0 .507(rather than the \231nor)3.007 F -(-)-.2 E(mal\232 startup \214les, and does not allo)72 568.8 Q 2.5(wr) --.25 G(eserv)-2.5 E(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5(5. New) -72 592.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G -(lans)-2.5 E F0 1.632(There are se)97 608.4 R -.15(ve)-.25 G 1.632 -(ral features introduced in the current v).15 F 1.631(ersion of Bash, v) --.15 F 1.631(ersion 1.14, and a number)-.15 F .241 -(under consideration for future releases.)72 620.4 R .242 -(This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242 -(eatures in v)-2.742 F .242(ersion 1.14 and)-.15 F(describe se)72 632.4 -Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.) --.15 E F3 2.5(5.1. New)72 656.4 R -.25(Fe)2.5 G(atur).25 E -(es in Bash-1.14)-.18 E F0 .884(The ne)97 672 R 3.384(wf)-.25 G .884 -(eatures a)-3.384 F -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25 -F -.15(ve)-.25 G .883(ral of the most common requests for enhance-).15 F -2.931(ments. Most)72 684 R(notably)2.931 E 2.931(,t)-.65 G .432(here is\ - a mechanism for including non-visible character sequences in prompts, \ -such)-2.931 F .136 -(as those which cause a terminal to print characters in dif)72 696 R -.135(ferent colors or in standout mode.)-.25 F .135(There w)5.135 F .135 -(as noth-)-.1 F .558(ing pre)72 708 R -.15(ve)-.25 G .558 -(nting the use of these sequences in earlier v).15 F .559(ersions, b) --.15 F .559(ut the readline redisplay algorithm assumed)-.2 F -(each character occupied ph)72 720 Q(ysical screen space and w)-.05 E -(ould wrap lines prematurely)-.1 E(.)-.65 E EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-9-)282.17 48 Q .13(Readline has a fe)97 84 R -2.63(wn)-.25 G .63 -.25(ew va)-2.63 H .13(riables, se).25 F -.15(ve)-.25 -G .13(ral ne).15 F 2.63(wb)-.25 G .13 -(indable commands, and some additional emacs mode)-2.63 F(def)72 96 Q -.918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418 -E 3.418(wh)-.25 G .919(istory search mode has been implemented: in this\ - mode, readline searches)-3.418 F .336(the history for lines be)72 108 R -.336(ginning with the characters between the be)-.15 F .336 -(ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e) -72 120 R .556(xisting readline incremental search commands no longer ma\ -tch identical lines more than once.)-.15 F(File-)5.556 E 1.979 -(name completion no)72 132 R 4.479(we)-.25 G 1.979(xpands v)-4.629 F -1.979(ariables in directory names.)-.25 F 1.978(The history e)6.978 F -1.978(xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449 -(nearly completely csh-compatible: missing modi\214ers ha)72 144 R 1.749 --.15(ve b)-.2 H 1.449(een added and history substitution has been).15 F --.15(ex)72 156 S(tended.).15 E(Se)97 171.6 Q -.15(ve)-.25 G .474 -(ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as) --2.973 F/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 E -F1($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)-2.973 F -2.973(wi)-.25 G(n)-2.973 E -.15(ve)72 183.6 S .106(rsion 1.14.).15 F -.106(There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)-2.606 F -(ariable,)-.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)-2.606 G .106 -(hich Bash assigns a v)-2.606 F .106(alue that identi\214es the v)-.25 F -(er)-.15 E(-)-.2 E 1.38(sion of)72 195.6 R/F2 9/Times-Roman@0 SF(UNIX) -3.88 E F0(it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for puttin\ -g architecture-speci\214c binary directories into the)-3.879 F F1($P) -3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 207.6 T -.25(va) -6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:) -.15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1 -($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd)-5.416 E F1 -($HOSTFILE)5.416 E F0(replaces)72 219.6 Q F1 -($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)-5.021 G -.021(oth cases, the old names are accepted for backw)-2.521 F .02 -(ards compatibil-)-.1 F(ity)72 231.6 Q 5.788(.T)-.65 G .788(he ksh) --5.788 F/F3 10/Times-Italic@0 SF(select)3.288 E F0 .788 -(construct, which allo)3.288 F .788 -(ws the generation of simple menus, has been implemented.)-.25 F(Ne) -5.788 E(w)-.25 E 1.496(capabilities ha)72 243.6 R 1.796 -.15(ve b)-.2 H -1.496(een added to e).15 F 1.495(xisting v)-.15 F(ariables:)-.25 E F1 -($auto_r)3.995 E(esume)-.18 E F0 1.495(can no)3.995 F 3.995(wt)-.25 G -(ak)-3.995 E 3.995(ev)-.1 G 1.495(alues of)-4.245 F F3 -.2(ex)3.995 G -(act).2 E F0(or)3.995 E F3(sub-)3.995 E(string)72 255.6 Q F0 4.843(,a)C -(nd)-4.843 E F1($HISTCONTR)4.843 E(OL)-.3 E F0 2.343(understands the v) -4.843 F(alue)-.25 E F3(ignor)4.844 E(eboth)-.37 E F0 4.844(,w)C 2.344 -(hich combines the tw)-4.844 F 4.844(op)-.1 G(re)-4.844 E(viously)-.25 E -1.556(acceptable v)72 267.6 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0 --.2(bu)4.056 G 1.556(iltin has acquired options to print out speci\214c\ - members of the directory).2 F 3.062(stack. The)72 279.6 R F1($nolinks) -3.062 E F0 -.25(va)3.062 G .562(riable, which forces a ph).25 F .562 -(ysical vie)-.05 F 3.062(wo)-.25 G 3.062(ft)-3.062 G .563 -(he \214le system, has been superseded by the)-3.062 F F1<ad50>72 291.6 -Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2(bu)2.994 G .494 -(iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494(set -o ph) -2.994 F(ysical)-.15 E F0 .493(\); the v)B .493 -(ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72 -303.6 Q 5.196(.T)-.65 G .196(he v)-5.196 F .196 -(ersion string contained in)-.15 F F1($B)2.696 E(ASH_VERSION)-.3 E F0 -(no)2.696 E 2.696(wi)-.25 G .196(ncludes an indication of the patch le) --2.696 F -.15(ve)-.25 G 2.696(la).15 G(s)-2.696 E .85(well as the \231b) -72 315.6 R .85(uild v)-.2 F 3.35(ersion\232. Some)-.15 F .85 -(little-used features ha)3.35 F 1.15 -.15(ve b)-.2 H .85(een remo).15 F --.15(ve)-.15 G 3.35(d: the).15 F F1(by)3.35 E(e)-.1 E F0(synon)3.35 E -.85(ym for)-.15 F F1(exit)3.35 E F0(and)3.35 E(the)72 327.6 Q F1($NO_PR) -3.498 E(OMPT_V)-.3 E(ARS)-1.35 E F0 -.25(va)3.498 G .998 -(riable are gone.).25 F .998(There is no)5.998 F 3.498(wa)-.25 G 3.498 -(no)-3.498 G -2.19 -.18(rg a)-3.498 H .998 -(nized test suite that can be run as a).18 F(re)72 339.6 Q -(gression test when b)-.15 E(uilding a ne)-.2 E 2.5(wv)-.25 G -(ersion of Bash.)-2.65 E 1.696(The documentation has been thoroughly o) -97 355.2 R -.15(ve)-.15 G 1.696(rhauled: there is a ne).15 F 4.196(wm) --.25 G 1.695(anual page on the readline)-4.196 F .467(library and the)72 -367.2 R F3(info)2.967 E F0 .467 -(\214le has been updated to re\215ect the current v)2.967 F 2.968 -(ersion. As)-.15 F(al)2.968 E -.1(wa)-.1 G .468(ys, as man).1 F 2.968 -(yb)-.15 G .468(ugs as possi-)-3.168 F(ble ha)72 379.2 Q .3 -.15(ve b) --.2 H(een \214x).15 E(ed, although some surely remain.)-.15 E F1 2.5 -(5.2. Other)72 403.2 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 1.68 -(There are a fe)97 418.8 R 4.18(wf)-.25 G 1.68 -(eatures that I hope to include in later Bash releases.)-4.18 F 1.68 -(Some are based on w)6.68 F(ork)-.1 E(already done in other shells.)72 -430.8 Q .958(In addition to simple v)97 446.4 R .959(ariables, a future\ - release of Bash will include one-dimensional arrays, using)-.25 F .206 -(the ksh implementation of arrays as a model.)72 458.4 R .205 -(Additions to the ksh syntax, such as)5.205 F F3(varname)2.705 E F0 .205 -(=\( ... \) to assign)B 2.587(al)72 470.4 S .087(ist of w)-2.587 F .088 -(ords directly to an array and a mechanism to allo)-.1 F 2.588(wt)-.25 G -(he)-2.588 E F1 -.18(re)2.588 G(ad).18 E F0 -.2(bu)2.588 G .088 -(iltin to read a list of v).2 F .088(alues directly)-.25 F .092 -(into an array)72 482.4 R 2.592(,w)-.65 G .092(ould be desirable.)-2.692 -F(Gi)5.092 E -.15(ve)-.25 G 2.592(nt).15 G .092(hose e)-2.592 F .092 -(xtensions, the ksh)-.15 F F1 .092(set \255A)2.592 F F0 .091 -(syntax may not be w)2.591 F .091(orth support-)-.1 F(ing \(the)72 494.4 -Q F1<ad41>2.5 E F0(option assigns a list of v)2.5 E(alues to an array) --.25 E 2.5(,b)-.65 G(ut is a rather peculiar special case\).)-2.7 E .76 -(Some shells include a means of)97 510 R F3(pr)3.26 E -.1(og)-.45 G -.15 -(ra).1 G(mmable).15 E F0 -.1(wo)3.26 G .76 -(rd completion, where the user speci\214es on a per).1 F(-)-.2 E .163 -(command basis ho)72 522 R 2.663(wt)-.25 G .163(he ar)-2.663 F .163(gum\ -ents of the command are to be treated when completion is attempted: as \ -\214le-)-.18 F .194(names, hostnames, e)72 534 R -.15(xe)-.15 G .194 -(cutable \214les, and so on.).15 F .195 -(The other aspects of the current Bash implementation could)5.195 F .482 -(remain as-is; the e)72 546 R .482(xisting heuristics w)-.15 F .481 -(ould still be v)-.1 F 2.981(alid. Only)-.25 F .481 -(when completing the ar)2.981 F .481(guments to a simple)-.18 F -(command w)72 558 Q(ould the programmable completion be in ef)-.1 E -(fect.)-.25 E .479(It w)97 573.6 R .479(ould also be nice to gi)-.1 F -.779 -.15(ve t)-.25 H .479(he user \214ner).15 F .479 -(-grained control o)-.2 F -.15(ve)-.15 G 2.98(rw).15 G .48 -(hich commands are sa)-2.98 F -.15(ve)-.2 G 2.98(do).15 G .48(nto the) --2.98 F 1.786(history list.)72 585.6 R 1.786(One proposal is for a v) -6.786 F 1.786(ariable, tentati)-.25 F -.15(ve)-.25 G 1.786(ly named).15 -F F1(HISTIGNORE)4.286 E F0 4.285(,w)C 1.785(hich w)-4.285 F 1.785 -(ould contain a)-.1 F .496(colon-separated list of commands.)72 597.6 R -.496(Lines be)5.496 F .496 -(ginning with these commands, after the restrictions of)-.15 F F1($HIST) -2.997 E(-)-.92 E(CONTR)72 609.6 Q(OL)-.3 E F0(ha)2.65 E .45 -.15(ve b) --.2 H .15(een applied, w).15 F .15 -(ould not be placed onto the history list.)-.1 F .15 -(The shell pattern-matching capa-)5.15 F(bilities could also be a)72 -621.6 Q -.25(va)-.2 G(ilable when specifying the contents of).25 E F1 -($HISTIGNORE)2.5 E F0(.)A .729(One thing that ne)97 637.2 R .729 -(wer shells such as)-.25 F F1(wksh)3.229 E F0 .729(\(also kno)3.229 F -.729(wn as)-.25 F F1(dtksh)3.23 E F0 3.23(\)p)C(ro)-3.23 E .73 -(vide is a command to dynami-)-.15 F 1.189 -(cally load code implementing additional b)72 649.2 R 1.189 -(uiltin commands into a running shell.)-.2 F 1.188(This ne)6.188 F 3.688 -(wb)-.25 G 1.188(uiltin w)-3.888 F(ould)-.1 E(tak)72 661.2 Q 2.875(ea) --.1 G 2.875(no)-2.875 G .375 -(bject \214le or shared library implementing the \231body\232 of the b) --2.875 F .375(uiltin \()-.2 F F3(xxx_b)A(uiltin\(\))-.2 E F0 .375 -(for those f)2.875 F(amiliar)-.1 E .052 -(with Bash internals\) and a structure containing the name of the ne)72 -673.2 R 2.552(wc)-.25 G .051(ommand, the function to call when the) --2.552 F(ne)72 685.2 Q 3.458(wb)-.25 G .958(uiltin is in)-3.658 F -.2 -(vo)-.4 G -.1(ke).2 G 3.458(d\().1 G .959 -(presumably de\214ned in the shared object speci\214ed as an ar)-3.458 F -.959(gument\), and the docu-)-.18 F 1.352 -(mentation to be printed by the)72 697.2 R F1(help)3.851 E F0 1.351 -(command \(possibly present in the shared object as well\).)3.851 F -1.351(It w)6.351 F(ould)-.1 E(manage the details of e)72 709.2 Q -(xtending the internal table of b)-.15 E(uiltins.)-.2 E EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-10-)279.67 48 Q 3.291(Af)97 84 S 1.291 -.25 -(ew o)-3.291 H .791(ther b).25 F .791(uiltins w)-.2 F .791 -(ould also be desirable: tw)-.1 F 3.291(oa)-.1 G .791(re the POSIX.2) --3.291 F/F1 10/Times-Bold@0 SF(getconf)3.292 E F0 .792 -(command, which prints)3.292 F 1.412(the v)72 96 R 1.412 -(alues of system con\214guration v)-.25 F 1.411 -(ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0 --.2(bu)3.911 G 1.411(iltin, which causes a).2 F 1.347 -(shell running with job control acti)72 108 R 1.647 -.15(ve t)-.25 H -3.847<6f99>.15 G(for)-3.847 E 1.347 -(get about\232 one or more background jobs in its internal jobs)-.18 F -3.465(table. Using)72 120 R F1(getconf)3.465 E F0 3.465(,f)C .965(or e) --3.465 F .965(xample, a user could retrie)-.15 F 1.264 -.15(ve a v)-.25 -H .964(alue for)-.1 F F1($P)3.464 E -.95(AT)-.74 G(H).95 E F0 .964 -(guaranteed to \214nd all of the)3.464 F .884 -(POSIX standard utilities, or \214nd out ho)72 132 R 3.385(wl)-.25 G -.885 -(ong \214lenames may be in the \214le system containing a speci\214ed) --3.385 F(directory)72 144 Q(.)-.65 E 1.521 -(There are no implementation timetables for an)97 159.6 R 4.021(yo)-.15 -G 4.021(ft)-4.021 G 1.52(hese features, nor are there concrete plans to) --4.021 F(include them.)72 171.6 Q(If an)5 E(yone has comments on these \ -proposals, feel free to send me electronic mail.)-.15 E F1 2.5 -(6. Re\215ections)72 195.6 R(and Lessons Lear)2.5 E(ned)-.15 E F0 .433 -(The lesson that has been repeated most often during Bash de)97 211.2 R --.15(ve)-.25 G .433(lopment is that there are dark corners).15 F .181 -(in the Bourne shell, and people use all of them.)72 223.2 R .18 -(In the original description of the Bourne shell, quoting and)5.181 F -.073(the shell grammar are both poorly speci\214ed and incomplete; subs\ -equent descriptions ha)72 235.2 R .373 -.15(ve n)-.2 H .073 -(ot helped much.).15 F 1.856(The grammar presented in Bourne')72 247.2 R -4.356(sp)-.55 G 1.856(aper describing the shell distrib)-4.356 F 1.855 -(uted with the Se)-.2 F -.15(ve)-.25 G 1.855(nth Edition of).15 F/F2 9 -/Times-Roman@0 SF(UNIX)72 259.2 Q F0 2.5<8769>C 2.5(ss)-2.5 G 2.5(of) --2.5 G(ar of)-2.6 E 2.5(ft)-.25 G(hat it does not allo)-2.5 E 2.5(wt) --.25 G(he command)-2.5 E/F3 10/Courier@0 SF(who|wc)2.5 E F0 5(.I)C 2.5 -(nf)-5 G(act, as T)-2.6 E(om Duf)-.8 E 2.5(fs)-.25 G(tates:)-2.5 E 1.375 -(Nobody really kno)97 274.8 R 1.375(ws what the Bourne shell')-.25 F -3.875(sg)-.55 G 1.375(rammar is.)-3.875 F(Ev)6.376 E 1.376(en e)-.15 F -1.376(xamination of the source)-.15 F(code is little help.\210)97 286.8 -Q .382(The POSIX.2 standard includes a)72 302.4 R/F4 10/Times-Italic@0 -SF(yacc)2.882 E F0 .382 -(grammar that comes close to capturing the Bourne shell')2.882 F 2.882 -(sb)-.55 G(eha)-2.882 E(vior)-.2 E(,)-.4 E -.2(bu)72 314.4 S 3.246(ti).2 -G 3.246(td)-3.246 G(isallo)-3.246 E .747(ws some constructs which sh ac\ -cepts without complaint \255 and there are scripts out there that)-.25 F -.501(use them.)72 326.4 R .501(It took a fe)5.501 F 3.001(wv)-.25 G .501 -(ersions and se)-3.151 F -.15(ve)-.25 G .501(ral b).15 F .5 -(ug reports before Bash implemented sh-compatible quoting,)-.2 F .279 -(and there are still some \231le)72 338.4 R -.05(ga)-.15 G .279 -(l\232 sh constructs which Bash \215ags as syntax errors.).05 F .28 -(Complete sh compatibility)5.28 F(is a tough nut.)72 350.4 Q 1.231 -(The shell is bigger and slo)97 366 R 1.231(wer than I w)-.25 F 1.231 -(ould lik)-.1 F 1.23(e, though the current v)-.1 F 1.23 -(ersion is substantially f)-.15 F(aster)-.1 E .086(than pre)72 378 R -(viously)-.25 E 5.086(.T)-.65 G .087 -(he readline library could stand a substantial re)-5.086 F 2.587 -(write. A)-.25 F .087(hand-written parser to replace the)2.587 F -(current)72 390 Q F4(yacc)2.978 E F0 .478(-generated one w)B .477 -(ould probably result in a speedup, and w)-.1 F .477(ould solv)-.1 F -2.977(eo)-.15 G .477(ne glaring problem:)-2.977 F(the)5.477 E .384 -(shell could parse commands in \231$\(...\)\232 constructs as the)72 402 -R 2.884(ya)-.15 G .385 -(re entered, rather than reporting errors when the)-2.884 F -(construct is e)72 414 Q(xpanded.)-.15 E 1.064(As al)97 429.6 R -.1(wa) --.1 G 1.064(ys, there is some chaf).1 F 3.564(ft)-.25 G 3.564(og)-3.564 -G 3.564(ow)-3.564 G 1.064(ith the wheat.)-3.564 F 1.063 -(Areas of duplicated functionality need to be)6.063 F .382(cleaned up.) -72 441.6 R .382(There are se)5.382 F -.15(ve)-.25 G .382 -(ral cases where Bash treats a v).15 F .382 -(ariable specially to enable functionality a)-.25 F -.25(va)-.2 G -(ilable).25 E .185(another w)72 453.6 R .185(ay \()-.1 F F1($notify)A F0 -(vs.)2.684 E F1 .184(set -o notify)5.184 F F0(and)2.684 E F1($nolinks) -2.684 E F0(vs.)2.684 E F1 .184(set -o ph)2.684 F(ysical)-.15 E F0 2.684 -(,f)C .184(or instance\); the special treatment)-2.684 F 3.421(of the v) -72 465.6 R 3.421(ariable name should probably be remo)-.25 F -.15(ve) --.15 G 5.921(d. A).15 F(fe)5.921 E 5.921(wm)-.25 G 3.422 -(ore things could stand remo)-5.921 F -.25(va)-.15 G 3.422(l; the).25 F -F1($allo)72 477.6 Q(w_null_glob_expansion)-.1 E F0(and)4.112 E F1 -($glob_dot_\214lenames)4.112 E F0 -.25(va)4.111 G 1.611 -(riables are of particularly questionable v).25 F(alue.)-.25 E(The)72 -489.6 Q F1($[...])3.977 E F0 1.477(arithmetic e)3.977 F -.25(va)-.25 G -1.478(luation syntax is redundant no).25 F 3.978(wt)-.25 G 1.478 -(hat the POSIX-mandated)-3.978 F F1($\(\(...\)\))3.978 E F0 1.478 -(construct has)3.978 F .326(been implemented, and could be deleted.)72 -501.6 R .326(It w)5.326 F .326(ould be nice if the te)-.1 F .326 -(xt output by the)-.15 F F1(help)2.825 E F0 -.2(bu)2.825 G .325 -(iltin were e).2 F(xter)-.15 E(-)-.2 E .061 -(nal to the shell rather than compiled into it.)72 513.6 R .062 -(The beha)5.062 F .062(vior enabled by)-.2 F F1 -($command_oriented_history)2.562 E F0 2.562(,w)C(hich)-2.562 E 1.125 -(causes the shell to attempt to sa)72 525.6 R 1.424 -.15(ve a)-.2 H -1.124(ll lines of a multi-line command in a single history entry).15 F -3.624(,s)-.65 G 1.124(hould be)-3.624 F(made the def)72 537.6 Q -(ault and the v)-.1 E(ariable remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5 -(7. A)72 561.6 R -.1(va)-1 G(ilability).1 E F0 .047 -(As with all other GNU softw)97 577.2 R .047(are, Bash is a)-.1 F -.25 -(va)-.2 G .047(ilable for anon).25 F .047(ymous FTP from)-.15 F F4(pr) -2.547 E(ep.ai.mit.edu:/pub/gnu)-.37 E F0 1.05(and from other GNU softw) -72 589.2 R 1.05(are mirror sites.)-.1 F 1.049(The current v)6.049 F -1.049(ersion is in)-.15 F F4(bash-1.14.1.tar)3.549 E(.gz)-1.11 E F0 -1.049(in that directory)3.549 F(.)-.65 E(Use)72 601.2 Q F4(ar)5.965 E --.15(ch)-.37 G(ie).15 E F0 3.465(to \214nd the nearest archi)5.965 F -3.766 -.15(ve s)-.25 H 5.966(ite. The).15 F 3.466(latest v)5.966 F 3.466 -(ersion is al)-.15 F -.1(wa)-.1 G 3.466(ys a).1 F -.25(va)-.2 G 3.466 -(ilable for FTP from).25 F F4(bash.CWR)72 613.2 Q -.25(U.)-.4 G -(Edu:/pub/dist.).25 E F0(Bash documentation is a)5 E -.25(va)-.2 G -(ilable for FTP from).25 E F4(bash.CWR)2.5 E -.25(U.)-.4 G -(Edu:/pub/bash.).25 E F0 1.169(The Free Softw)97 628.8 R 1.169(are F)-.1 -F 1.169(oundation sells tapes and CD-R)-.15 F 1.168 -(OMs containing Bash; send electronic mail to)-.4 F F3 -(gnu@prep.ai.mit.edu)72 640.8 Q F0(or call)2.5 E F3(+1-617-876-3296)2.5 -E F0(for more information.)2.5 E .694(Bash is also distrib)97 656.4 R -.694(uted with se)-.2 F -.15(ve)-.25 G .694(ral v).15 F .694(ersions of) --.15 F F2(UNIX)3.194 E F0 .694(-compatible systems.)B .695 -(It is included as /bin/sh)5.694 F .948(and /bin/bash on se)72 668.4 R --.15(ve)-.25 G .948(ral Linux distrib).15 F .948 -(utions \(more about the dif)-.2 F .948 -(ference in a moment\), and as contrib)-.25 F(uted)-.2 E .32 LW 144 -676.4 72 676.4 DL/F5 8/Times-Roman@0 SF .781 -(\207S. R. Bourne, \231UNIX T)72 688.2 R .781(ime-Sharing System:)-.28 F -.781(The UNIX Shell\232,)4.781 F/F6 8/Times-Italic@0 SF .78 -(Bell System T)2.78 F(ec)-.736 E .78(hnical J)-.12 F(ournal)-.2 E F5 -2.78(,5)C .78(7\(6\), July-)-2.78 F(August, 1978, pp. 1971-1990.)72 -698.2 Q<8854>72 710 Q .431(om Duf)-.64 F .431 -(f, \231Rc \255 A Shell for Plan 9 and)-.2 F/F7 7/Times-Roman@0 SF(UNIX) -2.432 E F5(systems\232,)2.432 E F6(Pr)2.432 E .432 -(oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.432(,L)C -(on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(-11-)279.67 48 Q(softw)72 84 Q(are in BSDI')-.1 -E 2.5(sB)-.55 G(SD/386* and FreeBSD.)-2.5 E .598(The Linux distrib)97 -99.6 R .598(ution deserv)-.2 F .598(es special mention.)-.15 F .598 -(There are tw)5.598 F 3.099(oc)-.1 G .599 -(on\214gurations included in the stan-)-3.099 F .733(dard Bash distrib) -72 111.6 R .732(ution: a \231normal\232 con\214guration, in which all o\ -f the standard features are included, and a)-.2 F .519(\231minimal\232 \ -con\214guration, which omits job control, aliases, history and command \ -line editing, the directory)72 123.6 R .886(stack and)72 135.6 R/F1 10 -/Times-Bold@0 SF(pushd/popd/dirs,)3.386 E F0 .886(process substitution,\ - prompt string special character decoding, and the)3.386 F/F2 10 -/Times-Italic@0 SF(select)3.385 E F0 3.368(construct. This)72 147.6 R -.868(minimal v)3.368 F .869 -(ersion is designed to be a drop-in replacement for the traditional)-.15 -F/F3 9/Times-Roman@0 SF(UNIX)3.369 E F0(/bin/sh,)3.369 E -(and is included as the Linux /bin/sh in se)72 159.6 Q -.15(ve)-.25 G -(ral packagings.).15 E F1 2.5(8. Conclusion)72 183.6 R F0 .8 -(Bash is a w)97 199.2 R(orth)-.1 E 3.3(ys)-.05 G .8(uccessor to sh.)-3.3 -F .8(It is suf)5.8 F .8(\214ciently portable to run on nearly e)-.25 F --.15(ve)-.25 G .8(ry v).15 F .8(ersion of)-.15 F F3(UNIX)3.299 E F0 .31 -(from 4.3 BSD to SVR4.2, and se)72 211.2 R -.15(ve)-.25 G(ral).15 E F3 -(UNIX)2.81 E F0 -.1(wo)2.81 G(rkalik).1 E 2.81(es. It)-.1 F .311(is rob) -2.81 F .311(ust enough to replace sh on most of those)-.2 F 1.515 -(systems, and pro)72 223.2 R 1.515(vides more functionality)-.15 F 6.515 -(.I)-.65 G 4.015(th)-6.515 G 1.515(as se)-4.015 F -.15(ve)-.25 G 1.515 -(ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F -(helped to mak)72 235.2 Q 2.5(ei)-.1 G 2.5(ta)-2.5 G 2.5(sg)-2.5 G -(ood as it is today \255 a testament to the bene\214ts of free softw) --2.5 E(are.)-.1 E .32 LW 144 708.2 72 708.2 DL/F4 8/Times-Roman@0 SF -(*BSD/386 is a trademark of Berk)72 720 Q(ele)-.08 E 2(yS)-.12 G(oftw)-2 -E(are Design, Inc.)-.08 E EP -%%Trailer -end -%%EOF @@ -1,4 +1,4 @@ -\" +.\" .\" MAN PAGE COMMENTS to .\" .\" Chet Ramey @@ -6,12 +6,12 @@ .\" Case Western Reserve University .\" chet@po.cwru.edu .\" -.\" Last Change: Sat Aug 27 13:28:44 EDT 2005 +.\" Last Change: Thu Sep 28 10:25:59 EDT 2006 .\" .\" bash_builtins, strip all but Built-Ins section .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY -.TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1" +.TH BASH 1 "2006 September 28" "GNU Bash-3.2" .\" .\" There's some problem with having a `@' .\" in a tagged paragraph with the BSD man macros. @@ -62,8 +62,9 @@ also incorporates useful features from the \fIKorn\fP and \fIC\fP shells (\fBksh\fP and \fBcsh\fP). .PP .B Bash -is intended to be a conformant implementation of the IEEE -POSIX Shell and Tools specification (IEEE Working Group 1003\.2). +is intended to be a conformant implementation of the +Shell and Utilities portion of the IEEE POSIX specification +(IEEE Standard 1003.1). .B Bash can be configured to be POSIX-conformant by default. .SH OPTIONS @@ -223,7 +224,7 @@ This option is on by default if the shell is invoked as .TP .B \-\-posix Change the behavior of \fBbash\fP where the default operation differs -from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP). +from the POSIX standard to match the standard (\fIposix mode\fP). .TP .B \-\-restricted The shell becomes restricted (see @@ -677,8 +678,8 @@ If the shell option .B nocasematch is enabled, the match is performed without regard to the case of alphabetic characters. -The return value is 0 if the string matches or does not match -the pattern, respectively, and 1 otherwise. +The return value is 0 if the string matches (\fB==\fP) or does not match +(\fB!=\fP) the pattern, and 1 otherwise. Any part of the pattern may be quoted to force it to be matched as a string. .if t .sp 0.5 @@ -807,6 +808,12 @@ it against each \fIpattern\fP in turn, using the same matching rules as for pathname expansion (see .B Pathname Expansion below). +The \fIword\fP is expanded using tilde +expansion, parameter and variable expansion, arithmetic substitution, +command substitution, process substitution and quote removal. +Each \fIpattern\fP examined is expanded using tilde +expansion, parameter and variable expansion, arithmetic substitution, +command substitution, and process substitution. If the shell option .B nocasematch is enabled, the match is performed without regard to the case @@ -971,7 +978,7 @@ quotes (see .B PARAMETERS below). .PP -Words of the form \fB$\fP'\fIstring\fP' are treated specially. The +Words of the form \fB$\fP\(aq\fIstring\fP\(aq are treated specially. The word expands to \fIstring\fP, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences, if present, are decoded as follows: @@ -1005,7 +1012,7 @@ vertical tab .B \e\e backslash .TP -.B \e' +.B \e\(aq single quote .TP .B \e\fInnn\fP @@ -1368,6 +1375,8 @@ subsequently reset. .B COMP_WORDS An array variable (see \fBArrays\fP below) consisting of the individual words in the current command line. +The words are split on shell metacharacters as the shell parser would +separate them. This variable is available only in shell functions invoked by the programmable completion facilities (see \fBProgrammable Completion\fP below). @@ -1686,7 +1695,8 @@ command history is not saved when an interactive shell exits. .B HISTFILESIZE The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, if -necessary, to contain no more than that number of lines. The default +necessary, by removing the oldest entries, +to contain no more than that number of lines. The default value is 500. The history file is also truncated to this size after writing it when an interactive shell exits. .TP @@ -1839,7 +1849,7 @@ the current mailfile. Example: .RS .PP -\fBMAILPATH\fP='/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"' +\fBMAILPATH\fP=\(aq/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"\(aq .PP .B Bash supplies a default value for this variable, but the location of the user @@ -1973,7 +1983,7 @@ The value of \fIp\fP determines whether or not the fraction is included. .IP If this variable is not set, \fBbash\fP acts as if it had the -value \fB$'\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS'\fP. +value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS\(aq\fP. If the value is null, no timing information is displayed. A trailing newline is added when the format string is displayed. .TP @@ -2525,17 +2535,12 @@ the pattern removal operation is applied to each member of the array in turn, and the expansion is the resultant list. .TP ${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP} -.PD 0 -.TP -${\fIparameter\fP\fB//\fP\fIpattern\fP\fB/\fP\fIstring\fP} -.PD The \fIpattern\fP is expanded to produce a pattern just as in pathname expansion. \fIParameter\fP is expanded and the longest match of \fIpattern\fP against its value is replaced with \fIstring\fP. -In the first form, only the first match is replaced. -The second form causes all matches of \fIpattern\fP to be -replaced with \fIstring\fP. +If \Ipattern\fP begins with \fB/\fP, all matches of \fIpattern\fP are +replaced with \fIstring\fP. Normally only the first match is replaced. If \fIpattern\fP begins with \fB#\fP, it must match at the beginning of the expanded value of \fIparameter\fP. If \fIpattern\fP begins with \fB%\fP, it must match at the end @@ -2702,7 +2707,7 @@ If the value of .B IFS is null, no word splitting occurs. .PP -Explicit null arguments (\^\f3"\^"\fP or \^\f3'\^'\fP\^) are retained. +Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained. Unquoted implicit null arguments, resulting from the expansion of parameters that have no values, are removed. If a parameter with no value is expanded within double quotes, a @@ -2861,7 +2866,7 @@ and .BR ] , \fIcharacter classes\fP can be specified using the syntax \fB[:\fP\fIclass\fP\fB:]\fP, where \fIclass\fP is one of the -following classes defined in the POSIX.2 standard: +following classes defined in the POSIX standard: .PP .RS .B @@ -2924,7 +2929,7 @@ Matches anything except one of the given patterns After the preceding expansions, all unquoted occurrences of the characters .BR \e , -.BR ' , +.BR \(aq , and \^\f3"\fP\^ that did not result from one of the above expansions are removed. .SH REDIRECTION @@ -3417,6 +3422,10 @@ automatically have them defined with the option to the .B export builtin. +A function definition may be deleted using the \fB\-f\fP option to +the +.B unset +builtin. Note that shell functions and variables with the same name may result in multiple identically-named entries in the environment passed to the shell's children. @@ -4489,8 +4498,8 @@ backslash .B \e" literal " .TP -.B \e' -literal ' +.B \e\(aq +literal \(aq .RE .PD .PP @@ -4538,7 +4547,7 @@ be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, the backslash escapes described above are expanded. Backslash will quote any other character in the macro text, -including " and '. +including " and \(aq. .PP .B Bash allows the current readline key bindings to be displayed or modified @@ -6635,10 +6644,6 @@ backslash the eight-bit character whose value is the octal value \fInnn\fP (zero to three octal digits) .TP -.B \e\fInnn\fP -the eight-bit character whose value is the octal value \fInnn\fP -(one to three octal digits) -.TP .B \ex\fIHH\fP the eight-bit character whose value is the hexadecimal value \fIHH\fP (one or two hex digits) @@ -7314,7 +7319,7 @@ format specifications, each of which causes printing of the next successive In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes \fBprintf\fP to expand backslash escape sequences in the corresponding \fIargument\fP (except that \fB\ec\fP terminates output, backslashes in -\fB\e'\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes +\fB\e\(aq\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes beginning with \fB\e0\fP may contain up to four digits), and \fB%q\fP causes \fBprintf\fP to output the corresponding \fIargument\fP in a format that can be reused as shell input. @@ -7712,7 +7717,7 @@ This option is disabled by default. Change the behavior of .B bash where the default operation differs -from the POSIX 1003.2 standard to match the standard (\fIposix mode\fP). +from the POSIX standard to match the standard (\fIposix mode\fP). .TP 8 .B privileged Same as @@ -8031,7 +8036,7 @@ If set, the extended pattern matching features described above under \fBPathname Expansion\fP are enabled. .TP 8 .B extquote -If set, \fB$\fP'\fIstring\fP' and \fB$\fP"\fIstring\fP" quoting is +If set, \fB$\fP\(aq\fIstring\fP\(aq and \fB$\fP"\fIstring\fP" quoting is performed within \fB${\fP\fIparameter\fP\fB}\fP expansions enclosed in double quotes. This option is enabled by default. .TP 8 @@ -8400,8 +8405,8 @@ the command is executed each time a shell function or a script executed with the \fB.\fP or \fBsource\fP builtins finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. -Trapped signals are reset to their original values in a child -process when it is created. +Trapped signals that are not being ignored are reset to their original +values in a child process when it is created. The return status is false if any .I sigspec is invalid; otherwise @@ -8484,7 +8489,7 @@ option suppresses shell function lookup, as with the \fBcommand\fP builtin. returns true if any of the arguments are found, false if none are found. .TP -\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]] +\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]] Provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is @@ -8520,8 +8525,14 @@ The maximum size of core files created .B \-d The maximum size of a process's data segment .TP +.B \-e +The maximum scheduling priority ("nice") +.TP .B \-f -The maximum size of files created by the shell +The maximum size of files written by the shell and its children +.TP +.B \-i +The maximum number of pending signals .TP .B \-l The maximum size that may be locked into memory @@ -8536,6 +8547,12 @@ allow this value to be set) .B \-p The pipe size in 512-byte blocks (this may not be set) .TP +.B \-q +The maximum number of bytes in POSIX message queues +.TP +.B \-r +The maximum real-time scheduling priority +.TP .B \-s The maximum stack size .TP @@ -8547,6 +8564,9 @@ The maximum number of processes available to a single user .TP .B \-v The maximum amount of virtual memory available to the shell +.TP +.B \-x +The maximum number of file locks .PD .PP If diff --git a/doc/bashref.info b/doc/bashref.info index ce029be9..3b74eb63 100644 --- a/doc/bashref.info +++ b/doc/bashref.info @@ -2,10 +2,10 @@ This is bashref.info, produced by makeinfo version 4.7 from /Users/chet/src/bash/src/doc/bashref.texi. This text is a brief description of the features that are present in -the Bash shell (version 3.1-beta1, 5 September 2005). +the Bash shell (version 3.2, 28 September 2006). - This is Edition 3.1-beta1, last updated 5 September 2005, of `The -GNU Bash Reference Manual', for `Bash', Version 3.1-beta1. + This is Edition 3.2, last updated 28 September 2006, of `The GNU +Bash Reference Manual', for `Bash', Version 3.2. Copyright (C) 1988-2005 Free Software Foundation, Inc. @@ -15,7 +15,7 @@ preserved on all copies. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, - Version 1.1 or any later version published by the Free Software + Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled @@ -37,10 +37,10 @@ Bash Features ************* This text is a brief description of the features that are present in -the Bash shell (version 3.1-beta1, 5 September 2005).. +the Bash shell (version 3.2, 28 September 2006). - This is Edition 3.1-beta1, last updated 5 September 2005, of `The -GNU Bash Reference Manual', for `Bash', Version 3.1-beta1. + This is Edition 3.2, last updated 28 September 2006, of `The GNU +Bash Reference Manual', for `Bash', Version 3.2. Bash contains features that appear in other popular shells, and some features that only appear in Bash. Some of the shells that Bash has @@ -107,8 +107,9 @@ Labs Research version of Unix. Bash is largely compatible with `sh' and incorporates useful features from the Korn shell `ksh' and the C shell `csh'. It is intended to be a conformant implementation of the IEEE POSIX Shell and -Tools specification (IEEE Working Group 1003.2). It offers functional -improvements over `sh' for both interactive and programming use. +Tools portion of the IEEE POSIX specification (IEEE Standard 1003.1). +It offers functional improvements over `sh' for both interactive and +programming use. While the GNU operating system provides other shells, including a version of `csh', Bash is the default shell. Like other GNU software, @@ -177,7 +178,8 @@ These definitions are used throughout the remainder of this manual. `POSIX' A family of open system standards based on Unix. Bash is - concerned with POSIX 1003.2, the Shell and Tools Standard. + primarily concerned with the Shell and Utilities portion of the + POSIX 1003.1 standard. `blank' A space or tab character. @@ -247,7 +249,7 @@ These definitions are used throughout the remainder of this manual. `special builtin' A shell builtin command that has been classified as special by the - POSIX 1003.2 standard. + POSIX standard. `token' A sequence of characters considered a single unit by the shell. @@ -841,9 +843,9 @@ File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Pre shell option `nocasematch' (see the description of `shopt' in *Note Bash Builtins::) is enabled, the match is performed without regard to the case of alphabetic characters. The return value is - 0 if the string matches or does not match the pattern, - respectively, and 1 otherwise. Any part of the pattern may be - quoted to force it to be matched as a string. + 0 if the string matches (`==') or does not match (`!=')the + pattern, and 1 otherwise. Any part of the pattern may be quoted + to force it to be matched as a string. An additional binary operator, `=~', is available, with the same precedence as `==' and `!='. When it is used, the string to the @@ -944,6 +946,9 @@ specified as the name of a command. Any redirections (*note Redirections::) associated with the shell function are performed when the function is executed. + A function definition may be deleted using the `-f' option to the +`unset' builtin (*note Bourne Shell Builtins::). + The exit status of a function definition is zero unless a syntax error occurs or a readonly function with the same name already exists. When executed, the exit status of a function is the exit status of the @@ -1433,15 +1438,14 @@ if the colon is omitted, the operator tests only for existence. list. `${PARAMETER/PATTERN/STRING}' -`${PARAMETER//PATTERN/STRING}' The PATTERN is expanded to produce a pattern just as in filename expansion. PARAMETER is expanded and the longest match of PATTERN - against its value is replaced with STRING. In the first form, - only the first match is replaced. The second form causes all - matches of PATTERN to be replaced with STRING. If PATTERN begins - with `#', it must match at the beginning of the expanded value of - PARAMETER. If PATTERN begins with `%', it must match at the end - of the expanded value of PARAMETER. If STRING is null, matches of + against its value is replaced with STRING. If PATTERN begins with + `/', all matches of PATTERN are replaced with STRING. Normally + only the first match is replaced. If PATTERN begins with `#', it + must match at the beginning of the expanded value of PARAMETER. + If PATTERN begins with `%', it must match at the end of the + expanded value of PARAMETER. If STRING is null, matches of PATTERN are deleted and the `/' following PATTERN may be omitted. If PARAMETER is `@' or `*', the substitution operation is applied to each positional parameter in turn, and the expansion is the @@ -1645,7 +1649,7 @@ characters must be quoted if they are to be matched literally. Within `[' and `]', CHARACTER CLASSES can be specified using the syntax `[:'CLASS`:]', where CLASS is one of the following classes - defined in the POSIX 1003.2 standard: + defined in the POSIX standard: alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit A character class matches any character belonging to that class. @@ -2244,7 +2248,7 @@ File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev * The Set Builtin:: This builtin is so overloaded it deserves its own section. * Special Builtins:: Builtin commands classified specially by - POSIX.2. + POSIX. Builtin commands are contained within the shell itself. When the name of a builtin command is used as the first word of a simple command @@ -2253,9 +2257,9 @@ without invoking another program. Builtin commands are necessary to implement functionality impossible or inconvenient to obtain with separate utilities. - This section briefly the builtins which Bash inherits from the -Bourne Shell, as well as the builtin commands which are unique to or -have been extended in Bash. + This section briefly describes the builtins which Bash inherits from +the Bourne Shell, as well as the builtin commands which are unique to +or have been extended in Bash. Several builtin commands are described in other chapters: builtin commands which provide the Bash interface to the job control facilities @@ -2278,7 +2282,7 @@ File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: She ========================= The following shell builtin commands are inherited from the Bourne -Shell. These commands are implemented as specified by the POSIX 1003.2 +Shell. These commands are implemented as specified by the POSIX standard. `: (a colon)' @@ -2416,7 +2420,7 @@ standard. character found. `hash' - hash [-'r] [-p FILENAME] [-dt] [NAME] + hash [-r] [-p FILENAME] [-dt] [NAME] Remember the full pathnames of commands specified as NAME arguments, so they need not be searched for on subsequent invocations. The commands are found by searching through the @@ -2588,8 +2592,8 @@ standard. finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. - Trapped signals are reset to their original values in a child - process when it is created. + Trapped signals that are not being ignored are reset to their + original values in a child process when it is created. The return status is zero unless a SIGSPEC does not specify a valid signal. @@ -2628,7 +2632,7 @@ File: bashref.info, Node: Bash Builtins, Next: The Set Builtin, Prev: Bourne This section describes builtin commands which are unique to or have been extended in Bash. Some of these commands are specified in the -POSIX 1003.2 standard. +POSIX standard. `alias' alias [`-p'] [NAME[=VALUE] ...] @@ -2858,10 +2862,6 @@ POSIX 1003.2 standard. the eight-bit character whose value is the octal value NNN (zero to three octal digits) - `\NNN' - the eight-bit character whose value is the octal value NNN - (one to three octal digits) - `\xHH' the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) @@ -3283,7 +3283,7 @@ POSIX 1003.2 standard. builtin command. `ulimit' - ulimit [-acdflmnpstuvSH] [LIMIT] + ulimit [-acdefilmnpqrstuvxSH] [LIMIT] `ulimit' provides control over the resources available to processes started by the shell, on systems that allow such control. If an option is given, it is interpreted as follows: @@ -3302,8 +3302,15 @@ POSIX 1003.2 standard. `-d' The maximum size of a process's data segment. + `-e' + The maximum scheduling priority ("nice"). + `-f' - The maximum size of files created by the shell. + The maximum size of files written by the shell and its + children. + + `-i' + The maximum number of pending signals. `-l' The maximum size that may be locked into memory. @@ -3317,6 +3324,12 @@ POSIX 1003.2 standard. `-p' The pipe buffer size. + `-q' + The maximum number of bytes in POSIX message queues. + + `-r' + The maximum real-time scheduling priority. + `-s' The maximum stack size. @@ -3329,6 +3342,9 @@ POSIX 1003.2 standard. `-v' The maximum amount of virtual memory available to the process. + `-x' + The maximum number of file locks. + If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `hard', `soft', and `unlimited' stand for @@ -3484,9 +3500,9 @@ This builtin is so complicated that it deserves its own section. `posix' Change the behavior of Bash where the default operation - differs from the POSIX 1003.2 standard to match the - standard (*note Bash POSIX Mode::). This is intended to - make Bash behave as a strict superset of that standard. + differs from the POSIX standard to match the standard + (*note Bash POSIX Mode::). This is intended to make + Bash behave as a strict superset of that standard. `privileged' Same as `-p'. @@ -3525,13 +3541,12 @@ This builtin is so complicated that it deserves its own section. Print shell input lines as they are read. `-x' - Print a trace of simple commands, \fBfor\fP commands, - \fBcase\fP commands, \fBselect\fP commands, and arithmetic - \fBfor\fP commands and their arguments or associated word - lists after they are expanded and before they are executed. - The value of the `PS4' variable is expanded and the resultant - value is printed before the command and its expanded - arguments. + Print a trace of simple commands, `for' commands, `case' + commands, `select' commands, and arithmetic `for' commands + and their arguments or associated word lists after they are + expanded and before they are executed. The value of the `PS4' + variable is expanded and the resultant value is printed before + the command and its expanded arguments. `-B' The shell will perform brace expansion (*note Brace @@ -3607,9 +3622,9 @@ File: bashref.info, Node: Special Builtins, Prev: The Set Builtin, Up: Shell 4.4 Special Builtins ==================== -For historical reasons, the POSIX 1003.2 standard has classified -several builtin commands as _special_. When Bash is executing in POSIX -mode, the special builtins differ from other builtin commands in three +For historical reasons, the POSIX standard has classified several +builtin commands as _special_. When Bash is executing in POSIX mode, +the special builtins differ from other builtin commands in three respects: 1. Special builtins are found before shell functions during command @@ -3834,9 +3849,10 @@ Variables::). `COMP_WORDS' An array variable consisting of the individual words in the - current command line. This variable is available only in shell - functions invoked by the programmable completion facilities (*note - Programmable Completion::). + current command line. The words are split on shell metacharacters + as the shell parser would separate them. This variable is + available only in shell functions invoked by the programmable + completion facilities (*note Programmable Completion::). `COMPREPLY' An array variable from which Bash reads the possible completions @@ -3936,9 +3952,10 @@ Variables::). `HISTFILESIZE' The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, - if necessary, to contain no more than that number of lines. The - history file is also truncated to this size after writing it when - an interactive shell exits. The default value is 500. + if necessary, by removing the oldest entries, to contain no more + than that number of lines. The history file is also truncated to + this size after writing it when an interactive shell exits. The + default value is 500. `HISTIGNORE' A colon-separated list of patterns used to decide which command @@ -4270,10 +4287,9 @@ the single-character options to be recognized. `--posix' Change the behavior of Bash where the default operation differs - from the POSIX 1003.2 standard to match the standard. This is - intended to make Bash behave as a strict superset of that - standard. *Note Bash POSIX Mode::, for a description of the Bash - POSIX mode. + from the POSIX standard to match the standard. This is intended + to make Bash behave as a strict superset of that standard. *Note + Bash POSIX Mode::, for a description of the Bash POSIX mode. `--restricted' Make the shell a restricted shell (*note The Restricted Shell::). @@ -5222,8 +5238,8 @@ File: bashref.info, Node: Bash POSIX Mode, Prev: The Restricted Shell, Up: Ba Starting Bash with the `--posix' command-line option or executing `set -o posix' while Bash is running will cause Bash to conform more closely -to the POSIX 1003.2 standard by changing the behavior to match that -specified by POSIX in areas where the Bash default differs. +to the POSIX standard by changing the behavior to match that specified +by POSIX in areas where the Bash default differs. When invoked as `sh', Bash enters POSIX mode after reading the startup files. @@ -5248,13 +5264,13 @@ startup files. 5. Reserved words appearing in a context where reserved words are recognized do not undergo alias expansion. - 6. The POSIX 1003.2 `PS1' and `PS2' expansions of `!' to the history - number and `!!' to `!' are enabled, and parameter expansion is - performed on the values of `PS1' and `PS2' regardless of the - setting of the `promptvars' option. + 6. The POSIX `PS1' and `PS2' expansions of `!' to the history number + and `!!' to `!' are enabled, and parameter expansion is performed + on the values of `PS1' and `PS2' regardless of the setting of the + `promptvars' option. - 7. The POSIX 1003.2 startup files are executed (`$ENV') rather than - the normal Bash files. + 7. The POSIX startup files are executed (`$ENV') rather than the + normal Bash files. 8. Tilde expansion is only performed on assignments preceding a command name, rather than on all assignment statements on the line. @@ -5285,12 +5301,12 @@ startup files. may not start with a digit. Declaring a function with an invalid name causes a fatal syntax error in non-interactive shells. - 17. POSIX 1003.2 special builtins are found before shell functions - during command lookup. + 17. POSIX special builtins are found before shell functions during + command lookup. - 18. If a POSIX 1003.2 special builtin returns an error status, a + 18. If a POSIX special builtin returns an error status, a non-interactive shell exits. The fatal errors are those listed in - the POSIX.2 standard, and include things like passing incorrect + the POSIX standard, and include things like passing incorrect options, redirection errors, variable assignment errors for assignments preceding the command name, and so on. @@ -5311,15 +5327,15 @@ startup files. 22. Process substitution is not available. - 23. Assignment statements preceding POSIX 1003.2 special builtins - persist in the shell environment after the builtin completes. + 23. Assignment statements preceding POSIX special builtins persist in + the shell environment after the builtin completes. 24. Assignment statements preceding shell function calls persist in the shell environment after the function returns, as if a POSIX special builtin command had been executed. 25. The `export' and `readonly' builtin commands display their output - in the format required by POSIX 1003.2. + in the format required by POSIX. 26. The `trap' builtin displays signal names without the leading `SIG'. @@ -5381,7 +5397,7 @@ startup files. displayed, after escape characters are converted. - There is other POSIX 1003.2 behavior that Bash does not implement by + There is other POSIX behavior that Bash does not implement by default even when in POSIX mode. Specifically: 1. The `fc' builtin checks `$EDITOR' as a program to edit history @@ -5916,7 +5932,8 @@ of keybindings. Any user can customize programs that use Readline by putting commands in an "inputrc" file, conventionally in his home directory. The name of this file is taken from the value of the shell variable `INPUTRC'. If that variable is unset, the default is -`~/.inputrc'. +`~/.inputrc'. If that file does not exist or cannot be read, the +ultimate default is `/etc/inputrc'. When a program which uses the Readline library starts up, the init file is read, and the key bindings are set. @@ -6128,9 +6145,10 @@ Key Bindings Once you know the name of the command, simply place on a line in the init file the name of the key you wish to bind the command to, - a colon, and then the name of the command. The name of the key - can be expressed in different ways, depending on what you find most - comfortable. + a colon, and then the name of the command. There can be no space + between the key name and the colon - that will be interpreted as + part of the key name. The name of the key can be expressed in + different ways, depending on what you find most comfortable. In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a MACRO). @@ -8141,9 +8159,9 @@ Appendix B Major Differences From The Bourne Shell Bash implements essentially the same grammar, parameter and variable expansion, redirection, and quoting as the Bourne Shell. Bash uses the -POSIX 1003.2 standard as the specification of how these features are to -be implemented. There are some differences between the traditional -Bourne shell and Bash; this section quickly details the differences of +POSIX standard as the specification of how these features are to be +implemented. There are some differences between the traditional Bourne +shell and Bash; this section quickly details the differences of significance. A number of these differences are explained in greater depth in previous sections. This section uses the version of `sh' included in SVR4.2 (the last version of the historical Bourne shell) as @@ -8267,9 +8285,9 @@ the baseline reference. not all words (*note Word Splitting::). This closes a longstanding shell security hole. - * Bash implements the full set of POSIX 1003.2 filename expansion - operators, including CHARACTER CLASSES, EQUIVALENCE CLASSES, and - COLLATING SYMBOLS (*note Filename Expansion::). + * Bash implements the full set of POSIX filename expansion operators, + including CHARACTER CLASSES, EQUIVALENCE CLASSES, and COLLATING + SYMBOLS (*note Filename Expansion::). * Bash implements extended pattern matching features when the `extglob' shell option is enabled (*note Pattern Matching::). @@ -8491,9 +8509,8 @@ many of the limitations of the SVR4.2 shell. For instance: begins with a `-'. * The SVR4.2 shell exits a script if any builtin fails; Bash exits a - script only if one of the POSIX 1003.2 special builtins fails, and - only for certain failures, as enumerated in the POSIX 1003.2 - standard. + script only if one of the POSIX special builtins fails, and only + for certain failures, as enumerated in the POSIX standard. * The SVR4.2 shell behaves differently when invoked as `jsh' (it turns on job control). @@ -8978,7 +8995,7 @@ Index of Shell Builtin Commands * disown: Job Control Builtins. (line 83) * echo: Bash Builtins. (line 191) -* enable: Bash Builtins. (line 247) +* enable: Bash Builtins. (line 243) * eval: Bourne Shell Builtins. (line 63) * exec: Bourne Shell Builtins. @@ -8995,24 +9012,24 @@ Index of Shell Builtin Commands (line 103) * hash: Bourne Shell Builtins. (line 145) -* help: Bash Builtins. (line 275) +* help: Bash Builtins. (line 271) * history: Bash History Builtins. (line 39) * jobs: Job Control Builtins. (line 25) * kill: Job Control Builtins. (line 57) -* let: Bash Builtins. (line 284) -* local: Bash Builtins. (line 291) -* logout: Bash Builtins. (line 301) +* let: Bash Builtins. (line 280) +* local: Bash Builtins. (line 287) +* logout: Bash Builtins. (line 297) * popd: Directory Stack Builtins. (line 37) -* printf: Bash Builtins. (line 305) +* printf: Bash Builtins. (line 301) * pushd: Directory Stack Builtins. (line 58) * pwd: Bourne Shell Builtins. (line 163) -* read: Bash Builtins. (line 330) +* read: Bash Builtins. (line 326) * readonly: Bourne Shell Builtins. (line 172) * return: Bourne Shell Builtins. @@ -9020,8 +9037,8 @@ Index of Shell Builtin Commands * set: The Set Builtin. (line 9) * shift: Bourne Shell Builtins. (line 200) -* shopt: Bash Builtins. (line 391) -* source: Bash Builtins. (line 622) +* shopt: Bash Builtins. (line 387) +* source: Bash Builtins. (line 618) * suspend: Job Control Builtins. (line 94) * test: Bourne Shell Builtins. @@ -9030,12 +9047,12 @@ Index of Shell Builtin Commands (line 278) * trap: Bourne Shell Builtins. (line 283) -* type: Bash Builtins. (line 626) -* typeset: Bash Builtins. (line 657) -* ulimit: Bash Builtins. (line 663) +* type: Bash Builtins. (line 622) +* typeset: Bash Builtins. (line 653) +* ulimit: Bash Builtins. (line 659) * umask: Bourne Shell Builtins. (line 324) -* unalias: Bash Builtins. (line 725) +* unalias: Bash Builtins. (line 737) * unset: Bourne Shell Builtins. (line 341) * wait: Job Control Builtins. @@ -9131,65 +9148,65 @@ Parameter and Variable Index * COMP_WORDS: Bash Variables. (line 131) * completion-query-items: Readline Init File Syntax. (line 60) -* COMPREPLY: Bash Variables. (line 137) +* COMPREPLY: Bash Variables. (line 138) * convert-meta: Readline Init File Syntax. (line 70) -* DIRSTACK: Bash Variables. (line 142) +* DIRSTACK: Bash Variables. (line 143) * disable-completion: Readline Init File Syntax. (line 76) * editing-mode: Readline Init File Syntax. (line 81) -* EMACS: Bash Variables. (line 152) +* EMACS: Bash Variables. (line 153) * enable-keypad: Readline Init File Syntax. (line 87) -* EUID: Bash Variables. (line 157) +* EUID: Bash Variables. (line 158) * expand-tilde: Readline Init File Syntax. (line 92) -* FCEDIT: Bash Variables. (line 161) -* FIGNORE: Bash Variables. (line 165) -* FUNCNAME: Bash Variables. (line 171) -* GLOBIGNORE: Bash Variables. (line 180) -* GROUPS: Bash Variables. (line 186) -* histchars: Bash Variables. (line 192) -* HISTCMD: Bash Variables. (line 207) -* HISTCONTROL: Bash Variables. (line 212) -* HISTFILE: Bash Variables. (line 228) -* HISTFILESIZE: Bash Variables. (line 232) -* HISTIGNORE: Bash Variables. (line 239) +* FCEDIT: Bash Variables. (line 162) +* FIGNORE: Bash Variables. (line 166) +* FUNCNAME: Bash Variables. (line 172) +* GLOBIGNORE: Bash Variables. (line 181) +* GROUPS: Bash Variables. (line 187) +* histchars: Bash Variables. (line 193) +* HISTCMD: Bash Variables. (line 208) +* HISTCONTROL: Bash Variables. (line 213) +* HISTFILE: Bash Variables. (line 229) +* HISTFILESIZE: Bash Variables. (line 233) +* HISTIGNORE: Bash Variables. (line 241) * history-preserve-point: Readline Init File Syntax. (line 96) -* HISTSIZE: Bash Variables. (line 258) -* HISTTIMEFORMAT: Bash Variables. (line 262) +* HISTSIZE: Bash Variables. (line 260) +* HISTTIMEFORMAT: Bash Variables. (line 264) * HOME: Bourne Shell Variables. (line 13) * horizontal-scroll-mode: Readline Init File Syntax. (line 101) -* HOSTFILE: Bash Variables. (line 269) -* HOSTNAME: Bash Variables. (line 280) -* HOSTTYPE: Bash Variables. (line 283) +* HOSTFILE: Bash Variables. (line 271) +* HOSTNAME: Bash Variables. (line 282) +* HOSTTYPE: Bash Variables. (line 285) * IFS: Bourne Shell Variables. (line 18) -* IGNOREEOF: Bash Variables. (line 286) +* IGNOREEOF: Bash Variables. (line 288) * input-meta: Readline Init File Syntax. (line 108) -* INPUTRC: Bash Variables. (line 296) +* INPUTRC: Bash Variables. (line 298) * isearch-terminators: Readline Init File Syntax. (line 115) * keymap: Readline Init File Syntax. (line 122) -* LANG: Bash Variables. (line 300) -* LC_ALL: Bash Variables. (line 304) -* LC_COLLATE: Bash Variables. (line 308) -* LC_CTYPE: Bash Variables. (line 315) +* LANG: Bash Variables. (line 302) +* LC_ALL: Bash Variables. (line 306) +* LC_COLLATE: Bash Variables. (line 310) +* LC_CTYPE: Bash Variables. (line 317) * LC_MESSAGES <1>: Locale Translation. (line 11) -* LC_MESSAGES: Bash Variables. (line 320) -* LC_NUMERIC: Bash Variables. (line 324) -* LINENO: Bash Variables. (line 328) -* LINES: Bash Variables. (line 332) -* MACHTYPE: Bash Variables. (line 337) +* LC_MESSAGES: Bash Variables. (line 322) +* LC_NUMERIC: Bash Variables. (line 326) +* LINENO: Bash Variables. (line 330) +* LINES: Bash Variables. (line 334) +* MACHTYPE: Bash Variables. (line 339) * MAIL: Bourne Shell Variables. (line 22) -* MAILCHECK: Bash Variables. (line 341) +* MAILCHECK: Bash Variables. (line 343) * MAILPATH: Bourne Shell Variables. (line 27) * mark-modified-lines: Readline Init File Syntax. @@ -9200,46 +9217,46 @@ Parameter and Variable Index (line 145) * meta-flag: Readline Init File Syntax. (line 108) -* OLDPWD: Bash Variables. (line 349) +* OLDPWD: Bash Variables. (line 351) * OPTARG: Bourne Shell Variables. (line 34) -* OPTERR: Bash Variables. (line 352) +* OPTERR: Bash Variables. (line 354) * OPTIND: Bourne Shell Variables. (line 38) -* OSTYPE: Bash Variables. (line 356) +* OSTYPE: Bash Variables. (line 358) * output-meta: Readline Init File Syntax. (line 152) * page-completions: Readline Init File Syntax. (line 157) * PATH: Bourne Shell Variables. (line 42) -* PIPESTATUS: Bash Variables. (line 359) -* POSIXLY_CORRECT: Bash Variables. (line 364) -* PPID: Bash Variables. (line 373) -* PROMPT_COMMAND: Bash Variables. (line 377) +* PIPESTATUS: Bash Variables. (line 361) +* POSIXLY_CORRECT: Bash Variables. (line 366) +* PPID: Bash Variables. (line 375) +* PROMPT_COMMAND: Bash Variables. (line 379) * PS1: Bourne Shell Variables. (line 48) * PS2: Bourne Shell Variables. (line 53) -* PS3: Bash Variables. (line 381) -* PS4: Bash Variables. (line 386) -* PWD: Bash Variables. (line 392) -* RANDOM: Bash Variables. (line 395) -* REPLY: Bash Variables. (line 400) -* SECONDS: Bash Variables. (line 403) -* SHELL: Bash Variables. (line 409) -* SHELLOPTS: Bash Variables. (line 414) -* SHLVL: Bash Variables. (line 423) +* PS3: Bash Variables. (line 383) +* PS4: Bash Variables. (line 388) +* PWD: Bash Variables. (line 394) +* RANDOM: Bash Variables. (line 397) +* REPLY: Bash Variables. (line 402) +* SECONDS: Bash Variables. (line 405) +* SHELL: Bash Variables. (line 411) +* SHELLOPTS: Bash Variables. (line 416) +* SHLVL: Bash Variables. (line 425) * show-all-if-ambiguous: Readline Init File Syntax. (line 167) * show-all-if-unmodified: Readline Init File Syntax. (line 173) * TEXTDOMAIN: Locale Translation. (line 11) * TEXTDOMAINDIR: Locale Translation. (line 11) -* TIMEFORMAT: Bash Variables. (line 428) -* TMOUT: Bash Variables. (line 466) -* TMPDIR: Bash Variables. (line 478) -* UID: Bash Variables. (line 482) +* TIMEFORMAT: Bash Variables. (line 430) +* TMOUT: Bash Variables. (line 468) +* TMPDIR: Bash Variables. (line 480) +* UID: Bash Variables. (line 484) * visible-stats: Readline Init File Syntax. (line 182) @@ -9366,7 +9383,7 @@ Concept Index * Bourne shell: Basic Shell Features. (line 6) * brace expansion: Brace Expansion. (line 6) -* builtin: Definitions. (line 16) +* builtin: Definitions. (line 17) * command editing: Readline Bare Essentials. (line 6) * command execution: Command Search and Execution. @@ -9393,7 +9410,7 @@ Concept Index * completion builtins: Programmable Completion Builtins. (line 6) * configuration: Basic Installation. (line 6) -* control operator: Definitions. (line 20) +* control operator: Definitions. (line 21) * directory stack: The Directory Stack. (line 6) * editing command lines: Readline Bare Essentials. (line 6) @@ -9403,7 +9420,7 @@ Concept Index * execution environment: Command Execution Environment. (line 6) * exit status <1>: Exit Status. (line 6) -* exit status: Definitions. (line 24) +* exit status: Definitions. (line 25) * expansion: Shell Expansions. (line 6) * expansion, arithmetic: Arithmetic Expansion. (line 6) @@ -9418,8 +9435,8 @@ Concept Index (line 6) * FDL, GNU Free Documentation License: GNU Free Documentation License. (line 6) -* field: Definitions. (line 28) -* filename: Definitions. (line 33) +* field: Definitions. (line 29) +* filename: Definitions. (line 34) * filename expansion: Filename Expansion. (line 9) * foreground: Job Control Basics. (line 6) * functions, shell: Shell Functions. (line 6) @@ -9431,30 +9448,30 @@ Concept Index (line 6) * History, how to use: Programmable Completion Builtins. (line 209) -* identifier: Definitions. (line 49) +* identifier: Definitions. (line 50) * initialization file, readline: Readline Init File. (line 6) * installation: Basic Installation. (line 6) * interaction, readline: Readline Interaction. (line 6) * interactive shell <1>: Interactive Shells. (line 6) -* interactive shell: Invoking Bash. (line 128) +* interactive shell: Invoking Bash. (line 127) * internationalization: Locale Translation. (line 6) -* job: Definitions. (line 36) -* job control <1>: Definitions. (line 40) +* job: Definitions. (line 37) +* job control <1>: Definitions. (line 41) * job control: Job Control Basics. (line 6) * kill ring: Readline Killing Commands. (line 19) * killing text: Readline Killing Commands. (line 6) * localization: Locale Translation. (line 6) -* login shell: Invoking Bash. (line 125) +* login shell: Invoking Bash. (line 124) * matching, pattern: Pattern Matching. (line 6) -* metacharacter: Definitions. (line 44) -* name: Definitions. (line 49) +* metacharacter: Definitions. (line 45) +* name: Definitions. (line 50) * native languages: Locale Translation. (line 6) * notation, readline: Readline Bare Essentials. (line 6) -* operator, shell: Definitions. (line 55) +* operator, shell: Definitions. (line 56) * parameter expansion: Shell Parameter Expansion. (line 6) * parameters: Shell Parameters. (line 6) @@ -9466,8 +9483,8 @@ Concept Index * pipeline: Pipelines. (line 6) * POSIX: Definitions. (line 9) * POSIX Mode: Bash POSIX Mode. (line 6) -* process group: Definitions. (line 59) -* process group ID: Definitions. (line 63) +* process group: Definitions. (line 60) +* process group ID: Definitions. (line 64) * process substitution: Process Substitution. (line 6) * programmable completion: Programmable Completion. @@ -9478,28 +9495,28 @@ Concept Index * Readline, how to use: Job Control Variables. (line 24) * redirection: Redirections. (line 6) -* reserved word: Definitions. (line 67) +* reserved word: Definitions. (line 68) * restricted shell: The Restricted Shell. (line 6) -* return status: Definitions. (line 72) +* return status: Definitions. (line 73) * shell arithmetic: Shell Arithmetic. (line 6) * shell function: Shell Functions. (line 6) * shell script: Shell Scripts. (line 6) * shell variable: Shell Parameters. (line 6) * shell, interactive: Interactive Shells. (line 6) -* signal: Definitions. (line 75) +* signal: Definitions. (line 76) * signal handling: Signals. (line 6) -* special builtin <1>: Definitions. (line 79) +* special builtin <1>: Definitions. (line 80) * special builtin: Special Builtins. (line 6) * startup files: Bash Startup Files. (line 6) * suspending jobs: Job Control Basics. (line 6) * tilde expansion: Tilde Expansion. (line 6) -* token: Definitions. (line 83) +* token: Definitions. (line 84) * translation, native languages: Locale Translation. (line 6) * variable, shell: Shell Parameters. (line 6) * variables, readline: Readline Init File Syntax. (line 37) -* word: Definitions. (line 87) +* word: Definitions. (line 88) * word splitting: Word Splitting. (line 6) * yanking text: Readline Killing Commands. (line 6) @@ -9507,129 +9524,129 @@ Concept Index Tag Table: -Node: Top1375 -Node: Introduction3475 -Node: What is Bash?3703 -Node: What is a shell?4796 -Node: Definitions7337 -Node: Basic Shell Features10078 -Node: Shell Syntax11297 -Node: Shell Operation12327 -Node: Quoting13621 -Node: Escape Character14924 -Node: Single Quotes15409 -Node: Double Quotes15757 -Node: ANSI-C Quoting16882 -Node: Locale Translation17838 -Node: Comments18734 -Node: Shell Commands19348 -Node: Simple Commands20114 -Node: Pipelines20745 -Node: Lists22620 -Node: Compound Commands24251 -Node: Looping Constructs25035 -Node: Conditional Constructs27482 -Node: Command Grouping34942 -Node: Shell Functions36391 -Node: Shell Parameters40681 -Node: Positional Parameters43011 -Node: Special Parameters43911 -Node: Shell Expansions46875 -Node: Brace Expansion48800 -Node: Tilde Expansion51125 -Node: Shell Parameter Expansion53476 -Node: Command Substitution60985 -Node: Arithmetic Expansion62318 -Node: Process Substitution63168 -Node: Word Splitting64218 -Node: Filename Expansion65679 -Node: Pattern Matching67815 -Node: Quote Removal71140 -Node: Redirections71435 -Node: Executing Commands79165 -Node: Simple Command Expansion79835 -Node: Command Search and Execution81765 -Node: Command Execution Environment83771 -Node: Environment86542 -Node: Exit Status88202 -Node: Signals89406 -Node: Shell Scripts91370 -Node: Shell Builtin Commands93888 -Node: Bourne Shell Builtins95549 -Node: Bash Builtins112632 -Node: The Set Builtin141675 -Node: Special Builtins150082 -Node: Shell Variables151059 -Node: Bourne Shell Variables151499 -Node: Bash Variables153480 -Node: Bash Features173666 -Node: Invoking Bash174549 -Node: Bash Startup Files180370 -Node: Interactive Shells185228 -Node: What is an Interactive Shell?185638 -Node: Is this Shell Interactive?186288 -Node: Interactive Shell Behavior187103 -Node: Bash Conditional Expressions190379 -Node: Shell Arithmetic193958 -Node: Aliases196704 -Node: Arrays199272 -Node: The Directory Stack202621 -Node: Directory Stack Builtins203335 -Node: Printing a Prompt206226 -Node: The Restricted Shell208940 -Node: Bash POSIX Mode210772 -Node: Job Control218589 -Node: Job Control Basics219056 -Node: Job Control Builtins223432 -Node: Job Control Variables227759 -Node: Command Line Editing228917 -Node: Introduction and Notation229916 -Node: Readline Interaction231538 -Node: Readline Bare Essentials232729 -Node: Readline Movement Commands234518 -Node: Readline Killing Commands235483 -Node: Readline Arguments237403 -Node: Searching238447 -Node: Readline Init File240633 -Node: Readline Init File Syntax241692 -Node: Conditional Init Constructs253908 -Node: Sample Init File256441 -Node: Bindable Readline Commands259558 -Node: Commands For Moving260765 -Node: Commands For History261626 -Node: Commands For Text264781 -Node: Commands For Killing267454 -Node: Numeric Arguments269596 -Node: Commands For Completion270735 -Node: Keyboard Macros274328 -Node: Miscellaneous Commands274899 -Node: Readline vi Mode280210 -Node: Programmable Completion281124 -Node: Programmable Completion Builtins286916 -Node: Using History Interactively294512 -Node: Bash History Facilities295192 -Node: Bash History Builtins297887 -Node: History Interaction301744 -Node: Event Designators304300 -Node: Word Designators305315 -Node: Modifiers306954 -Node: Installing Bash308360 -Node: Basic Installation309490 -Node: Compilers and Options312182 -Node: Compiling For Multiple Architectures312923 -Node: Installation Names314587 -Node: Specifying the System Type315405 -Node: Sharing Defaults316121 -Node: Operation Controls316794 -Node: Optional Features317752 -Node: Reporting Bugs326683 -Node: Major Differences From The Bourne Shell327877 -Node: Copying This Manual344575 -Node: GNU Free Documentation License344851 -Node: Builtin Index367257 -Node: Reserved Word Index373806 -Node: Variable Index376242 -Node: Function Index387175 -Node: Concept Index393895 +Node: Top1359 +Node: Introduction3442 +Node: What is Bash?3670 +Node: What is a shell?4783 +Node: Definitions7324 +Node: Basic Shell Features10091 +Node: Shell Syntax11310 +Node: Shell Operation12340 +Node: Quoting13634 +Node: Escape Character14937 +Node: Single Quotes15422 +Node: Double Quotes15770 +Node: ANSI-C Quoting16895 +Node: Locale Translation17851 +Node: Comments18747 +Node: Shell Commands19361 +Node: Simple Commands20127 +Node: Pipelines20758 +Node: Lists22633 +Node: Compound Commands24264 +Node: Looping Constructs25048 +Node: Conditional Constructs27495 +Node: Command Grouping34954 +Node: Shell Functions36403 +Node: Shell Parameters40812 +Node: Positional Parameters43142 +Node: Special Parameters44042 +Node: Shell Expansions47006 +Node: Brace Expansion48931 +Node: Tilde Expansion51256 +Node: Shell Parameter Expansion53607 +Node: Command Substitution61077 +Node: Arithmetic Expansion62410 +Node: Process Substitution63260 +Node: Word Splitting64310 +Node: Filename Expansion65771 +Node: Pattern Matching67907 +Node: Quote Removal71225 +Node: Redirections71520 +Node: Executing Commands79250 +Node: Simple Command Expansion79920 +Node: Command Search and Execution81850 +Node: Command Execution Environment83856 +Node: Environment86627 +Node: Exit Status88287 +Node: Signals89491 +Node: Shell Scripts91455 +Node: Shell Builtin Commands93973 +Node: Bourne Shell Builtins95642 +Node: Bash Builtins112744 +Node: The Set Builtin142004 +Node: Special Builtins150379 +Node: Shell Variables151349 +Node: Bourne Shell Variables151789 +Node: Bash Variables153770 +Node: Bash Features174084 +Node: Invoking Bash174967 +Node: Bash Startup Files180776 +Node: Interactive Shells185634 +Node: What is an Interactive Shell?186044 +Node: Is this Shell Interactive?186694 +Node: Interactive Shell Behavior187509 +Node: Bash Conditional Expressions190785 +Node: Shell Arithmetic194364 +Node: Aliases197110 +Node: Arrays199678 +Node: The Directory Stack203027 +Node: Directory Stack Builtins203741 +Node: Printing a Prompt206632 +Node: The Restricted Shell209346 +Node: Bash POSIX Mode211178 +Node: Job Control218937 +Node: Job Control Basics219404 +Node: Job Control Builtins223780 +Node: Job Control Variables228107 +Node: Command Line Editing229265 +Node: Introduction and Notation230264 +Node: Readline Interaction231886 +Node: Readline Bare Essentials233077 +Node: Readline Movement Commands234866 +Node: Readline Killing Commands235831 +Node: Readline Arguments237751 +Node: Searching238795 +Node: Readline Init File240981 +Node: Readline Init File Syntax242128 +Node: Conditional Init Constructs254459 +Node: Sample Init File256992 +Node: Bindable Readline Commands260109 +Node: Commands For Moving261316 +Node: Commands For History262177 +Node: Commands For Text265332 +Node: Commands For Killing268005 +Node: Numeric Arguments270147 +Node: Commands For Completion271286 +Node: Keyboard Macros274879 +Node: Miscellaneous Commands275450 +Node: Readline vi Mode280761 +Node: Programmable Completion281675 +Node: Programmable Completion Builtins287467 +Node: Using History Interactively295063 +Node: Bash History Facilities295743 +Node: Bash History Builtins298438 +Node: History Interaction302295 +Node: Event Designators304851 +Node: Word Designators305866 +Node: Modifiers307505 +Node: Installing Bash308911 +Node: Basic Installation310041 +Node: Compilers and Options312733 +Node: Compiling For Multiple Architectures313474 +Node: Installation Names315138 +Node: Specifying the System Type315956 +Node: Sharing Defaults316672 +Node: Operation Controls317345 +Node: Optional Features318303 +Node: Reporting Bugs327234 +Node: Major Differences From The Bourne Shell328428 +Node: Copying This Manual345093 +Node: GNU Free Documentation License345369 +Node: Builtin Index367775 +Node: Reserved Word Index374324 +Node: Variable Index376760 +Node: Function Index387693 +Node: Concept Index394413 End Tag Table diff --git a/doc/bashref.texi b/doc/bashref.texi index b25dad91..2acf21f6 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -24,7 +24,7 @@ are preserved on all copies. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is @@ -74,7 +74,7 @@ USA @* @top Bash Features This text is a brief description of the features that are present in -the Bash shell (version @value{VERSION}, @value{UPDATED}).. +the Bash shell (version @value{VERSION}, @value{UPDATED}). This is Edition @value{EDITION}, last updated @value{UPDATED}, of @cite{The GNU Bash Reference Manual}, @@ -142,7 +142,8 @@ of Unix. Bash is largely compatible with @code{sh} and incorporates useful features from the Korn shell @code{ksh} and the C shell @code{csh}. It is intended to be a conformant implementation of the @sc{ieee} -@sc{posix} Shell and Tools specification (@sc{ieee} Working Group 1003.2). +@sc{posix} Shell and Tools portion of the @sc{ieee} @sc{posix} +specification (@sc{ieee} Standard 1003.1). It offers functional improvements over @code{sh} for both interactive and programming use. @@ -217,7 +218,8 @@ These definitions are used throughout the remainder of this manual. @item POSIX @cindex POSIX A family of open system standards based on Unix. Bash -is concerned with @sc{posix} 1003.2, the Shell and Tools Standard. +is primarily concerned with the Shell and Utilities portion of the +@sc{posix} 1003.1 standard. @item blank A space or tab character. @@ -307,7 +309,7 @@ of an event occurring in the system. @item special builtin @cindex special builtin A shell builtin command that has been classified as special by the -@sc{posix} 1003.2 standard. +@sc{posix} standard. @item token @cindex token @@ -961,8 +963,8 @@ If the shell option @code{nocasematch} (see the description of @code{shopt} in @ref{Bash Builtins}) is enabled, the match is performed without regard to the case of alphabetic characters. -The return value is 0 if the string matches or does not match -the pattern, respectively, and 1 otherwise. +The return value is 0 if the string matches (@samp{==}) or does not +match (@samp{!=})the pattern, and 1 otherwise. Any part of the pattern may be quoted to force it to be matched as a string. @@ -1084,6 +1086,9 @@ name of a command. Any redirections (@pxref{Redirections}) associated with the shell function are performed when the function is executed. +A function definition may be deleted using the @option{-f} option to the +@code{unset} builtin (@pxref{Bourne Shell Builtins}). + The exit status of a function definition is zero unless a syntax error occurs or a readonly function with the same name already exists. When executed, the exit status of a function is the exit status of the @@ -1652,15 +1657,13 @@ the pattern removal operation is applied to each member of the array in turn, and the expansion is the resultant list. @item $@{@var{parameter}/@var{pattern}/@var{string}@} -@itemx $@{@var{parameter}//@var{pattern}/@var{string}@} The @var{pattern} is expanded to produce a pattern just as in filename expansion. @var{Parameter} is expanded and the longest match of @var{pattern} against its value is replaced with @var{string}. -In the first form, only the first match is replaced. -The second form causes all matches of @var{pattern} to be -replaced with @var{string}. +If @var{pattern} begins with @samp{/}, all matches of @var{pattern} are +replaced with @var{string}. Normally only the first match is replaced. If @var{pattern} begins with @samp{#}, it must match at the beginning of the expanded value of @var{parameter}. If @var{pattern} begins with @samp{%}, it must match at the end @@ -1903,7 +1906,7 @@ force the use of the C locale by setting the @env{LC_COLLATE} or Within @samp{[} and @samp{]}, @var{character classes} can be specified using the syntax @code{[:}@var{class}@code{:]}, where @var{class} is one of the -following classes defined in the @sc{posix} 1003.2 standard: +following classes defined in the @sc{posix} standard: @example alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit @@ -2588,7 +2591,7 @@ under another shell. * The Set Builtin:: This builtin is so overloaded it deserves its own section. * Special Builtins:: Builtin commands classified specially by - POSIX.2. + POSIX. @end menu Builtin commands are contained within the shell itself. @@ -2598,7 +2601,7 @@ the command directly, without invoking another program. Builtin commands are necessary to implement functionality impossible or inconvenient to obtain with separate utilities. -This section briefly the builtins which Bash inherits from +This section briefly describes the builtins which Bash inherits from the Bourne Shell, as well as the builtin commands which are unique to or have been extended in Bash. @@ -2621,7 +2624,7 @@ builtins do not accept options. @section Bourne Shell Builtins The following shell builtin commands are inherited from the Bourne Shell. -These commands are implemented as specified by the @sc{posix} 1003.2 standard. +These commands are implemented as specified by the @sc{posix} standard. @table @code @item : @r{(a colon)} @@ -2809,7 +2812,7 @@ If @code{getopts} is silent, then a colon (@samp{:}) is placed in @item hash @btindex hash @example -hash [-'r] [-p @var{filename}] [-dt] [@var{name}] +hash [-r] [-p @var{filename}] [-dt] [@var{name}] @end example Remember the full pathnames of commands specified as @var{name} arguments, so they need not be searched for on subsequent invocations. @@ -3027,8 +3030,8 @@ each time a shell function or a script executed with the @code{.} or @code{source} builtins finishes executing. Signals ignored upon entry to the shell cannot be trapped or reset. -Trapped signals are reset to their original values in a child -process when it is created. +Trapped signals that are not being ignored are reset to their original +values in a child process when it is created. The return status is zero unless a @var{sigspec} does not specify a valid signal. @@ -3073,7 +3076,7 @@ The return status is zero unless a @var{name} is readonly. This section describes builtin commands which are unique to or have been extended in Bash. -Some of these commands are specified in the @sc{posix} 1003.2 standard. +Some of these commands are specified in the @sc{posix} standard. @table @code @@ -3338,9 +3341,6 @@ backslash @item \0@var{nnn} the eight-bit character whose value is the octal value @var{nnn} (zero to three octal digits) -@item \@var{nnn} -the eight-bit character whose value is the octal value @var{nnn} -(one to three octal digits) @item \x@var{HH} the eight-bit character whose value is the hexadecimal value @var{HH} (one or two hex digits) @@ -3833,7 +3833,7 @@ builtin command. @item ulimit @btindex ulimit @example -ulimit [-acdflmnpstuvSH] [@var{limit}] +ulimit [-acdefilmnpqrstuvxSH] [@var{limit}] @end example @code{ulimit} provides control over the resources available to processes started by the shell, on systems that allow such control. If an @@ -3854,8 +3854,14 @@ The maximum size of core files created. @item -d The maximum size of a process's data segment. +@item -e +The maximum scheduling priority ("nice"). + @item -f -The maximum size of files created by the shell. +The maximum size of files written by the shell and its children. + +@item -i +The maximum number of pending signals. @item -l The maximum size that may be locked into memory. @@ -3869,6 +3875,12 @@ The maximum number of open file descriptors. @item -p The pipe buffer size. +@item -q +The maximum number of bytes in POSIX message queues. + +@item -r +The maximum real-time scheduling priority. + @item -s The maximum stack size. @@ -3881,6 +3893,9 @@ The maximum number of processes available to a single user. @item -v The maximum amount of virtual memory available to the process. +@item -x +The maximum number of file locks. + @end table If @var{limit} is given, it is the new value of the specified resource; @@ -4045,7 +4060,7 @@ This option is disabled by default. @item posix Change the behavior of Bash where the default operation differs -from the @sc{posix} 1003.2 standard to match the standard +from the @sc{posix} standard to match the standard (@pxref{Bash POSIX Mode}). This is intended to make Bash behave as a strict superset of that standard. @@ -4089,8 +4104,8 @@ shell will exit. Print shell input lines as they are read. @item -x -Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP -commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands +Print a trace of simple commands, @code{for} commands, @code{case} +commands, @code{select} commands, and arithmetic @code{for} commands and their arguments or associated word lists after they are expanded and before they are executed. The value of the @env{PS4} variable is expanded and the resultant value is printed before @@ -4172,7 +4187,7 @@ The return status is always zero unless an invalid option is supplied. @section Special Builtins @cindex special builtin -For historical reasons, the @sc{posix} 1003.2 standard has classified +For historical reasons, the @sc{posix} standard has classified several builtin commands as @emph{special}. When Bash is executing in @sc{posix} mode, the special builtins differ from other builtin commands in three respects: @@ -4414,6 +4429,8 @@ even if it is subsequently reset. @item COMP_WORDS An array variable consisting of the individual words in the current command line. +The words are split on shell metacharacters as the shell parser would +separate them. This variable is available only in shell functions invoked by the programmable completion facilities (@pxref{Programmable Completion}). @@ -4525,7 +4542,8 @@ default value is @file{~/.bash_history}. @item HISTFILESIZE The maximum number of lines contained in the history file. When this variable is assigned a value, the history file is truncated, if -necessary, to contain no more than that number of lines. +necessary, by removing the oldest entries, +to contain no more than that number of lines. The history file is also truncated to this size after writing it when an interactive shell exits. The default value is 500. @@ -4875,7 +4893,7 @@ invoked as @code{sh}. @item --posix Change the behavior of Bash where the default operation differs -from the @sc{posix} 1003.2 standard to match the standard. This +from the @sc{posix} standard to match the standard. This is intended to make Bash behave as a strict superset of that standard. @xref{Bash POSIX Mode}, for a description of the Bash @sc{posix} mode. @@ -5888,7 +5906,7 @@ the shell spawned to execute the script. Starting Bash with the @option{--posix} command-line option or executing @samp{set -o posix} while Bash is running will cause Bash to conform more -closely to the @sc{posix} 1003.2 standard by changing the behavior to +closely to the @sc{posix} standard by changing the behavior to match that specified by @sc{posix} in areas where the Bash default differs. When invoked as @code{sh}, Bash enters @sc{posix} mode after reading the @@ -5921,13 +5939,13 @@ Reserved words appearing in a context where reserved words are recognized do not undergo alias expansion. @item -The @sc{posix} 1003.2 @env{PS1} and @env{PS2} expansions of @samp{!} to +The @sc{posix} @env{PS1} and @env{PS2} expansions of @samp{!} to the history number and @samp{!!} to @samp{!} are enabled, and parameter expansion is performed on the values of @env{PS1} and @env{PS2} regardless of the setting of the @code{promptvars} option. @item -The @sc{posix} 1003.2 startup files are executed (@env{$ENV}) rather than +The @sc{posix} startup files are executed (@env{$ENV}) rather than the normal Bash files. @item @@ -5969,13 +5987,13 @@ may not start with a digit. Declaring a function with an invalid name causes a fatal syntax error in non-interactive shells. @item -@sc{posix} 1003.2 special builtins are found before shell functions +@sc{posix} special builtins are found before shell functions during command lookup. @item -If a @sc{posix} 1003.2 special builtin returns an error status, a +If a @sc{posix} special builtin returns an error status, a non-interactive shell exits. The fatal errors are those listed in -the POSIX.2 standard, and include things like passing incorrect options, +the POSIX standard, and include things like passing incorrect options, redirection errors, variable assignment errors for assignments preceding the command name, and so on. @@ -6003,7 +6021,7 @@ variable in a @code{for} statement or the selection variable in a Process substitution is not available. @item -Assignment statements preceding @sc{posix} 1003.2 special builtins +Assignment statements preceding @sc{posix} special builtins persist in the shell environment after the builtin completes. @item @@ -6013,7 +6031,7 @@ special builtin command had been executed. @item The @code{export} and @code{readonly} builtin commands display their -output in the format required by @sc{posix} 1003.2. +output in the format required by @sc{posix}. @item The @code{trap} builtin displays signal names without the leading @@ -6092,7 +6110,7 @@ escape characters are converted. @end enumerate -There is other @sc{posix} 1003.2 behavior that Bash does not implement by +There is other @sc{posix} behavior that Bash does not implement by default even when in @sc{posix} mode. Specifically: @@ -6915,7 +6933,7 @@ Please send all reports concerning this manual to Bash implements essentially the same grammar, parameter and variable expansion, redirection, and quoting as the Bourne Shell. -Bash uses the @sc{posix} 1003.2 standard as the specification of +Bash uses the @sc{posix} standard as the specification of how these features are to be implemented. There are some differences between the traditional Bourne shell and Bash; this section quickly details the differences of significance. A @@ -7079,7 +7097,7 @@ not all words (@pxref{Word Splitting}). This closes a longstanding shell security hole. @item -Bash implements the full set of @sc{posix} 1003.2 filename expansion operators, +Bash implements the full set of @sc{posix} filename expansion operators, including @var{character classes}, @var{equivalence classes}, and @var{collating symbols} (@pxref{Filename Expansion}). @@ -7364,8 +7382,8 @@ with a @samp{-}. @item The SVR4.2 shell exits a script if any builtin fails; Bash exits -a script only if one of the @sc{posix} 1003.2 special builtins fails, and -only for certain failures, as enumerated in the @sc{posix} 1003.2 standard. +a script only if one of the @sc{posix} special builtins fails, and +only for certain failures, as enumerated in the @sc{posix} standard. @item The SVR4.2 shell behaves differently when invoked as @code{jsh} diff --git a/doc/rose94.ps b/doc/rose94.ps deleted file mode 100644 index 1fff283e..00000000 --- a/doc/rose94.ps +++ /dev/null @@ -1,1581 +0,0 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.08 -%%DocumentNeededResources: font Times-Bold -%%+ font Times-Italic -%%+ font Times-Roman -%%+ font Courier -%%+ font Symbol -%%DocumentSuppliedResources: procset grops 1.08 0 -%%Pages: 13 -%%PageOrder: Ascend -%%Orientation: Portrait -%%EndComments -%%BeginProlog -%%BeginResource: procset grops 1.08 0 -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}bind def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/FL{ -currentgray exch setgray fill setgray -}bind def -/BL/fill load def -/LW/setlinewidth load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -}bind def -/PEND{ -clear -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%IncludeResource: font Times-Bold -%%IncludeResource: font Times-Italic -%%IncludeResource: font Times-Roman -%%IncludeResource: font Courier -%%IncludeResource: font Symbol -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL -792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron -/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space -/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft -/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four -/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C -/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash -/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q -/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase -/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger -/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar -/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus -/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu -/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright -/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde -/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute -/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls -/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute -/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve -/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex -/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0 -ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0 -/Times-Bold RE -%%EndProlog -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 12/Times-Bold@0 SF(Bash, the Bour)210.99 123 Q(ne\255Again Shell)-.18 E/F1 -10/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q -(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S(et@po.cwru.edu) -.15 E(ABSTRA)264.535 213 Q(CT)-.3 E/F2 10/Times-Roman@0 SF .019(An o)133 237 R --.15(ve)-.15 G(rvie).15 E 2.519(wo)-.25 G 2.519(f/)191.918 237 S .018 -(bin/sh\255compatible shells is presented, as well as an introduction to) -200.547 237 R .128(the POSIX.2 shell and tools standard.)108 249 R .128 -(These serv)5.128 F 2.628(ea)-.15 G 2.628(sa)318.562 249 S 2.628(ni)329.52 249 -S .128(ntroduction to bash.)339.928 249 R 2.628(Ac)5.128 G(ompar)439.32 249 Q -(-)-.2 E .188(ison of bash to sh and ksh is presented, as well as a discussion\ - of features unique to bash.)108 261 R(Finally)108 273 Q 3.178(,s)-.65 G .678 -(ome of the changes and ne)145.258 273 R 3.178(wf)-.25 G .678 -(eatures to appear in the ne)268.486 273 R .678(xt bash release will be)-.15 F -(discussed.)108 285 Q/F3 10/Times-Bold@0 SF 2.5(1. Intr)72 321 R(oduction)-.18 -E(Bash)97 336.6 Q F2 .904(is the shell, or command language interpreter)3.404 F -3.404(,t)-.4 G .904(hat will appear in the GNU operating system.)316.032 336.6 -R .782(The name is an acron)72 348.6 R .782(ym for the `)-.15 F(`Bourne\255Ag) --.74 E .782(ain SHell')-.05 F .782(', a pun on Ste)-.74 F 1.082 -.15(ve B)-.25 -H .783(ourne, the author of the direct).15 F .212(ancestor of the current)72 -360.6 R/F4 9/Times-Roman@0 SF(UNIX)2.712 E F2 2.712<8773>C(hell)199.131 360.6 Q -F1(/bin/sh)2.712 E F2 2.712(,w)C .212(hich appeared in the Se)256.505 360.6 R --.15(ve)-.25 G .211(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)-.2 E -(sion of)72 372.6 Q F4(UNIX)2.5 E F2([1].).833 E .191(Bash is an)97 388.2 R F3 -(sh)2.691 E F2 .192 -(\255compatible shell that incorporates useful features from the K)B .192 -(orn shell \()-.35 F F3(ksh)A F2 .833(\)[)C .192(2] and the)-.833 F 2.767(Cs)72 -400.2 S .267(hell \()85.327 400.2 R F3(csh)A F2 .833(\)[)C .267 -(3], described later in this article.)-.833 F .266 -(It is ultimately intended to be a conformant implementation)5.267 F 1.965 -(of the IEEE POSIX Shell and T)72 412.2 R 1.966(ools speci\214cation \(IEEE W) --.8 F 1.966(orking Group 1003.2\).)-.8 F 1.966(It of)6.966 F 1.966 -(fers functional)-.25 F(impro)72 424.2 Q -.15(ve)-.15 G(ments o).15 E -.15(ve) --.15 G 2.5(rs).15 G 2.5(hf)155.28 424.2 S(or both interacti)166.11 424.2 Q .3 --.15(ve a)-.25 H(nd programming use.).15 E .802 -(While the GNU operating system will most lik)97 439.8 R .801(ely include a v) --.1 F .801(ersion of the Berk)-.15 F(ele)-.1 E 3.301(ys)-.15 G .801 -(hell csh, bash)448.238 439.8 R .108(will be the def)72 451.8 R .108 -(ault shell.)-.1 F(Lik)5.108 E 2.608(eo)-.1 G .108(ther GNU softw)199.658 451.8 -R .108(are, bash is quite portable.)-.1 F .109(It currently runs on nearly e) -5.109 F -.15(ve)-.25 G(ry).15 E -.15(ve)72 463.8 S .367(rsion of).15 F F4(UNIX) -2.867 E F2 .367(and a fe)2.867 F 2.867(wo)-.25 G .367 -(ther operating systems \255 an independently-supported port e)187.933 463.8 R -.366(xists for OS/2, and)-.15 F .706(there are rumors of ports to DOS and W)72 -475.8 R(indo)-.4 E .706(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)295.97 475.8 -R F4(UNIX)3.206 E F2(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix) -372.979 475.8 R(are part of the distrib)72 487.8 Q(ution.)-.2 E .51 -(The original author of bash w)97 503.4 R .51(as Brian F)-.1 F .509 -(ox, an emplo)-.15 F .509(yee of the Free Softw)-.1 F .509(are F)-.1 F 3.009 -(oundation. The)-.15 F(cur)3.009 E(-)-.2 E(rent de)72 515.4 Q -.15(ve)-.25 G -(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 H(olunteer who w) -.45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)458.91 515.4 Q --.15(ve)-.25 G(rsity).15 E(.)-.65 E F3 2.5(2. What)72 539.4 R(is a shell?)2.5 E -F2 1.241(At its base, a shell is simply a macro processor that e)97 555 R -.15 -(xe)-.15 G 1.242(cutes commands.).15 F(A)6.242 E F4(UNIX)3.742 E F2 1.242 -(shell is both a)3.742 F .189(command interpreter)72 567 R 2.688(,w)-.4 G .188 -(hich pro)167.787 567 R .188(vides the user interf)-.15 F .188 -(ace to the rich set of)-.1 F F4(UNIX)2.688 E F2 .188 -(utilities, and a programming)2.688 F .751(language, allo)72 579 R .752 -(wing these utilitites to be combined.)-.25 F .752 -(The shell reads commands either from a terminal or a)5.752 F 2.52 -(\214le. Files)72 591 R .019 -(containing commands can be created, and become commands themselv)2.52 F 2.519 -(es. These)-.15 F(ne)2.519 E 2.519(wc)-.25 G(ommands)465.11 591 Q(ha)72 603 Q -.395 -.15(ve t)-.2 H .095(he same status as system commands in directories lik) -.15 F(e)-.1 E F3(/bin)2.595 E F2 2.595(,a)C(llo)342.575 603 Q .096 -(wing users or groups to establish cus-)-.25 F(tom en)72 615 Q(vironments.)-.4 -E F3 2.5(2.1. Command)72 639 R(Inter)2.5 E(pr)-.1 E(eter)-.18 E F2 2.926(As)97 -654.6 S .426(hell allo)111.036 654.6 R .426(ws e)-.25 F -.15(xe)-.15 G .426 -(cution of).15 F F4(UNIX)2.926 E F2 .426 -(commands, both synchronously and asynchronously)2.926 F 5.425(.T)-.65 G(he) -460.165 654.6 Q F1 -.37(re)2.925 G(dir).37 E(ec-)-.37 E(tion)72 666.6 Q F2 .334 -(constructs permit \214ne-grained control of the input and output of those com\ -mands, and the shell allo)2.833 F(ws)-.25 E .559(control o)72 678.6 R -.15(ve) --.15 G 3.058(rt).15 G .558(he contents of their en)126.697 678.6 R(vironment.) --.4 E F4(UNIX)5.558 E F2 .558(shells also pro)3.058 F .558 -(vide a small set of b)-.15 F .558(uilt-in commands)-.2 F(\()72 690.6 Q F1 -.2 -(bu)C(iltins).2 E F2 4.611(\)i)C 2.112 -(mplementing functionality impossible \(e.g.,)115.861 690.6 R F3(cd)4.612 E F2 -(,)A F3(br)4.612 E(eak)-.18 E F2(,)A F3(continue)4.612 E F2 4.612(,a)C(nd) -399.074 690.6 Q F3(exec)4.612 E F2 4.612(\)o)C 4.612(ri)444.948 690.6 S(ncon) -455.67 690.6 Q -.15(ve)-.4 G(nient).15 E .32 LW 76 700.6 72 700.6 DL 80 700.6 -76 700.6 DL 84 700.6 80 700.6 DL 88 700.6 84 700.6 DL 92 700.6 88 700.6 DL 96 -700.6 92 700.6 DL 100 700.6 96 700.6 DL 104 700.6 100 700.6 DL 108 700.6 104 -700.6 DL 112 700.6 108 700.6 DL 116 700.6 112 700.6 DL 120 700.6 116 700.6 DL -124 700.6 120 700.6 DL 128 700.6 124 700.6 DL 132 700.6 128 700.6 DL 136 700.6 -132 700.6 DL 140 700.6 136 700.6 DL 144 700.6 140 700.6 DL/F5 8/Times-Roman@0 -SF 2<8755>72 710.6 S(NIX is a trademark of X/OPEN)83.776 710.6 Q EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-2-)279.67 48 S(\()72 84 Q/F1 10/Times-Bold@0 SF -(history)A F0(,)A F1(getopts)3.505 E F0(,)A F1(kill)3.505 E F0 3.505(,o)C(r) -172.795 84 Q F1(pwd)3.505 E F0 3.505(,f)C 1.005(or e)207.305 84 R 1.005 -(xample\) to obtain via separate utilities.)-.15 F 1.005 -(Shells may be used interac-)6.005 F(ti)72 96 Q -.15(ve)-.25 G -(ly or non-interacti).15 E -.15(ve)-.25 G 2.5(ly: the).15 F 2.5(ya)-.15 G -(ccept input typed from the k)207.42 96 Q -.15(ey)-.1 G -(board or from a \214le.).15 E F1 2.5(2.2. Pr)72 120 R(ogramming Language)-.18 -E F0 .501(While e)97 135.6 R -.15(xe)-.15 G .501 -(cuting commands is essential, most of the po).15 F .501(wer \(and comple)-.25 -F .502(xity\) of shells is due to their)-.15 F .05 -(embedded programming languages.)72 147.6 R(Lik)5.049 E 2.549(ea)-.1 G .349 --.15(ny h)245.398 147.6 T(igh-le).15 E -.15(ve)-.25 G 2.549(ll).15 G .049 -(anguage, the shell pro)303.276 147.6 R .049(vides v)-.15 F .049 -(ariables, \215o)-.25 F 2.549(wc)-.25 G(ontrol)480.11 147.6 Q -(constructs, quoting, and functions.)72 159.6 Q .475 -(The basic syntactic element is a)97 175.2 R/F2 10/Times-Italic@0 SF .475 -(simple command)2.975 F F0 5.475(.A)C .475 -(simple command consists of an optional set of)315.405 175.2 R -.25(va)72 187.2 -S .525(riable assignments, a command w).25 F .525 -(ord, and an optional list of ar)-.1 F 3.024(guments. Operators)-.18 F .524 -(to redirect input and)3.024 F(output may appear an)72 199.2 Q -(ywhere in a simple command.)-.15 E(Some e)5 E(xamples are:)-.15 E/F3 10 -/Courier@0 SF(who)97 211.2 Q(trn -e -S1 -N)97 223.2 Q(ls -l /bin > binfiles)97 -235.2 Q(make > make.out 2>make.errs)97 247.2 Q F0 2.518(Ap)97 262.8 S .018 -(ipeline is a sequence of tw)111.738 262.8 R 2.518(oo)-.1 G 2.518(rm)230.056 -262.8 S .018(ore commands separated by the character)243.684 262.8 R/F4 10 -/Symbol SF<ef>2.519 E F0 5.019(.T)C .019(he standard output)430.082 262.8 R -(of the \214rst command is connected to the standard input of the second.)72 -274.8 Q(Examples of pipelines include:)5 E F3(who | wc -l)97 286.8 Q -(ls -l | sort +3nr)97 298.8 Q F0 .578 -(Simple commands and pipelines may be combined into)97 314.4 R F2(lists)3.078 E -F0 5.578(.A)C .578(list is a sequence of pipelines sepa-)360.002 314.4 R .289 -(rated by one of)72 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E F0(,)A F1(&&)2.789 -E F0 2.789(,o)C(r)185.103 326.4 Q F4<efef>2.789 E F0 2.789(,a)C .289 -(nd optionally terminated by)210.831 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E -F0 2.789(,o)C 2.789(ran)352.555 326.4 S -.25(ew)370.903 326.4 S 2.789 -(line. Commands).25 F .289(separated by)2.789 F F1(;)72 338.4 Q F0 .336(are e) -2.836 F -.15(xe)-.15 G .336(cuted sequentially; the shell w).15 F .335 -(aits for each to complete in turn.)-.1 F .335(If a command is terminated by) -5.335 F F1(&)2.835 E F0(,)A .007(the shell e)72 350.4 R -.15(xe)-.15 G .007 -(cutes it in the).15 F F2(bac)2.507 E(kgr)-.2 E(ound)-.45 E F0 2.508(,a)1.666 G -.008(nd does not w)236.076 350.4 R .008(ait for it to \214nish.)-.1 F .008 -(If tw)5.008 F 2.508(oc)-.1 G .008(ommands are separated by)397.616 350.4 R F1 -(&&)72 362.4 Q F0 3.008(,t)C .508(he second command e)96.948 362.4 R -.15(xe) --.15 G .508(cutes only if the \214rst command succeeds.).15 F 3.007(As)5.508 G -.507(eparator of)383.575 362.4 R F4<efef>3.007 E F0 .507(causes the sec-)3.007 -F(ond command to e)72 374.4 Q -.15(xe)-.15 G(cute only if the \214rst f).15 E -2.5(ails. Some)-.1 F -.15(ex)2.5 G(amples are:).15 E F3(who ; date)97 386.4 Q -(cd /usr/src || exit 1)97 398.4 Q(cd "$@" && xtitle $HOST: $PWD)97 410.4 Q F0 -1.36(The shell programming language pro)97 426 R 1.361(vides a v)-.15 F 1.361 -(ariety of \215o)-.25 F 3.861(wc)-.25 G 1.361(ontrol structures.)353.276 426 R -(The)6.361 E F1 -.25(fo)3.861 G(r).25 E F0(command)3.861 E(allo)72 438 Q .654 -(ws a list of commands to be e)-.25 F -.15(xe)-.15 G .654 -(cuted once for each w).15 F .654(ord in a w)-.1 F .654(ord list.)-.1 F(The) -5.654 E F1(case)3.154 E F0 .654(command allo)3.154 F .654(ws a)-.25 F .627 -(list to be e)72 450 R -.15(xe)-.15 G .628(cuted if a w).15 F .628 -(ord matches a speci\214ed pattern.)-.1 F(The)5.628 E F1(while)3.128 E F0(and) -3.128 E F1(until)3.128 E F0 .628(commands e)3.128 F -.15(xe)-.15 G .628 -(cute a list of).15 F 1.559 -(commands as long as a guard command completes successfully or f)72 462 R 1.559 -(ails, respecti)-.1 F -.15(ve)-.25 G(ly).15 E 6.559(.T)-.65 G(he)440.892 462 Q -F1(if)4.059 E F0(command)4.059 E(allo)72 474 Q(ws e)-.25 E -.15(xe)-.15 G -(cution of dif).15 E(ferent command lists depending on the e)-.25 E -(xit status of a guard command.)-.15 E(A)97 489.6 Q F2 .385(shell function) -2.885 F F0 .385(associates a list of commands with a name.)2.885 F .386 -(Each time the name is used as a simple)5.385 F .938(command, the list is e)72 -501.6 R -.15(xe)-.15 G 3.438(cuted. This).15 F -.15(exe)3.438 G .938 -(cution tak).15 F .938(es place in the current shell conte)-.1 F .937 -(xt; no ne)-.15 F 3.437(wp)-.25 G .937(rocess is)468.903 501.6 R 2.5 -(created. Functions)72 513.6 R(may ha)2.5 E .3 -.15(ve t)-.2 H(heir o).15 E -(wn ar)-.25 E(gument lists and local v)-.18 E(ariables, and may be recursi)-.25 -E -.15(ve)-.25 G(.).15 E .722(The shell language pro)97 529.2 R .722(vides v) --.15 F .722(ariables, which may be both set and referenced.)-.25 F 3.222(An) -5.722 G .722(umber of special)435.906 529.2 R 1.02 -(parameters are present, such as)72 541.2 R F1($@)3.519 E F0 3.519(,w)C 1.019 -(hich returns the shell')231.257 541.2 R 3.519(sp)-.55 G 1.019 -(ositional parameters \(command-line ar)333.103 541.2 R(gu-)-.18 E(ments\),)72 -553.2 Q F1($?)2.906 E F0 2.906(,t)C .406(he e)122.812 553.2 R .406 -(xit status of the pre)-.15 F .406(vious command, and)-.25 F F1($$)2.906 E F0 -2.906(,t)C .406(he shell')322.436 553.2 R 2.906(sp)-.55 G .406(rocess I.D.) -368.248 553.2 R .407(In addition to pro)5.406 F(vid-)-.15 E .129 -(ing special parameters and user)72 565.2 R .129(-de\214ned v)-.2 F .129 -(ariables, the shell permits the v)-.25 F .128(alues of certain v)-.25 F .128 -(ariables to control)-.25 F .16(its beha)72 577.2 R(vior)-.2 E 5.16(.S)-.55 G -.16(ome of these v)131.57 577.2 R .16(ariables include)-.25 F F1(IFS)2.661 E F0 -2.661(,w)C .161(hich controls ho)284.202 577.2 R 2.661(wt)-.25 G .161 -(he shell splits w)361.375 577.2 R(ords,)-.1 E F1 -.74(PA)2.661 G(TH)-.21 E F0 -2.661(,w)C(hich)486.78 577.2 Q .392 -(tells the shell where to look for commands, and)72 589.2 R F1(PS1)2.892 E F0 -2.892(,w)C .392(hose v)297.01 589.2 R .392 -(alue is the string the shell uses to prompt for)-.25 F 3.371(commands. There) -72 601.2 R .871(are a fe)3.371 F 3.371(wv)-.25 G .871(ariables whose v)196.645 -601.2 R .871(alues are set by the shell and normally only referenced by)-.25 F -(users;)72 613.2 Q F1(PWD)3.663 E F0 3.663(,w)C 1.163(hose v)135.706 613.2 R -1.163(alue is the pathname of the shell')-.25 F 3.662(sc)-.55 G 1.162(urrent w) -313.068 613.2 R 1.162(orking directory)-.1 F 3.662(,i)-.65 G 3.662(so)421.894 -613.2 S 1.162(ne such v)434.446 613.2 R(ariable.)-.25 E -1.11(Va)72 625.2 S -.008(riables can be used in nearly an)1.11 F 2.509(ys)-.15 G .009(hell conte) -219.37 625.2 R .009(xt and are particularly v)-.15 F .009 -(aluable when used with control struc-)-.25 F(tures.)72 637.2 Q .583 -(There are se)97 652.8 R -.15(ve)-.25 G .583(ral shell).15 F F2 -.2(ex)3.083 G -(pansions).2 E F0 5.583(.A)C -.25(va)254.298 652.8 S(riable).25 E F2(name)3.083 -E F0 .583(is e)3.083 F .582(xpanded to its v)-.15 F .582(alue using ${)-.25 F -F2(name)A F0 .582(}, where)B 1.387(the braces are optional.)72 664.8 R 1.387 -(There are a number of parameter e)6.387 F 1.388(xpansions a)-.15 F -.25(va)-.2 -G 3.888(ilable. F).25 F 1.388(or e)-.15 F 1.388(xample, there are)-.15 F(${)72 -676.8 Q F2(name)A F0<3aad>A F2(wor)A(d)-.37 E F0 .891(}, which e)B .891 -(xpands to)-.15 F F2(wor)3.391 E(d)-.37 E F0(if)3.391 E F2(name)3.391 E F0 .891 -(is unset or null, and the in)3.391 F -.15(ve)-.4 G .89(rse ${).15 F F2(name)A -F0(:+)A F2(wor)A(d)-.37 E F0 .89(}, which)B -.15(ex)72 688.8 S 1.203(pands to) -.15 F F2(wor)3.703 E(d)-.37 E F0(if)3.703 E F2(name)3.703 E F0 1.203 -(is set and not null.)3.703 F F2 1.203(Command substitution)6.203 F F0(allo) -3.703 E 1.204(ws the output of a command to)-.25 F .918 -(replace the command name.)72 700.8 R .918(The syntax is `)5.918 F F2(command)A -F0(`.)A F2(Command)5.918 E F0 .918(is e)3.418 F -.15(xe)-.15 G .918 -(cuted and it and the backquotes).15 F .299 -(are replaced by its output, with trailing ne)72 712.8 R .299(wlines remo)-.25 -F -.15(ve)-.15 G(d.).15 E F2 -.8(Pa)5.299 G .299(thname e).8 F(xpansion)-.2 E -F0 .299(is a w)2.799 F .299(ay to e)-.1 F .299(xpand a w)-.15 F(ord)-.1 E 1.586 -(to a set of \214lenames.)72 724.8 R -.8(Wo)6.586 G 1.586(rds are re).8 F -.05 -(ga)-.15 G 1.586(rded as patterns, in which the characters).05 F F1(*)4.086 E -F0(,)A F1(?)4.086 E F0 4.085(,a)C(nd)432.115 724.8 Q F1([)4.085 E F0(ha)4.085 E -1.885 -.15(ve s)-.2 H(pecial).15 E EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-3-)279.67 48 S 2.845(meaning. W)72 84 R .346(ords\ - containing these special characters are replaced with a sorted list of matchi\ -ng pathnames.)-.8 F(If a w)72 96 Q -(ord generates no matches, it is left unchanged.)-.1 E/F1 10/Times-Italic@0 SF -(Quoting)97 111.6 Q F0 .85(is used to remo)3.35 F 1.15 -.15(ve t)-.15 H .85 -(he special meaning of characters or w).15 F 3.35(ords. It)-.1 F .85 -(can disable special treat-)3.35 F .314 -(ment for shell operators or other special characters, pre)72 123.6 R -.15(ve) --.25 G .315(nt reserv).15 F .315(ed w)-.15 F .315 -(ords from being recognized as such,)-.1 F .683(and inhibit v)72 135.6 R .683 -(ariable e)-.25 F 3.183(xpansion. The)-.15 F .683 -(shell has three quoting mechanisms:)3.183 F 3.183(ab)5.683 G .683 -(ackslash preserv)387.413 135.6 R .682(es the literal)-.15 F -.25(va)72 147.6 S -.417(lue of the ne).25 F .417(xt character)-.15 F 2.917(,ap)-.4 G .417 -(air of single quotes preserv)196.712 147.6 R .417(es the literal v)-.15 F .418 -(alue of each character between the)-.25 F 1.426 -(quotes, and a pair of double quotes preserv)72 159.6 R 1.425 -(es the literal meaning of enclosed characters while allo)-.15 F(wing)-.25 E -(some e)72 171.6 Q(xpansions.)-.15 E 1.054(Some of the commands b)97 187.2 R -1.054(uilt into the shell are part of the programming language.)-.2 F(The)6.055 -E/F2 10/Times-Bold@0 SF(br)3.555 E(eak)-.18 E F0(and)3.555 E F2(continue)72 -199.2 Q F0 1.175(commands control loop e)3.675 F -.15(xe)-.15 G 1.175 -(cution as in the C language.).15 F(The)6.175 E F2 -2.3 -.15(ev a)3.675 H(l).15 -E F0 -.2(bu)3.675 G 1.174(iltin allo).2 F 1.174(ws a string to be)-.25 F .204 -(parsed and e)72 211.2 R -.15(xe)-.15 G .204(cuted as a command.).15 F F2 -.65 -(Wa)5.205 G(it).65 E F0 .205 -(tells the shell to pause until the processes speci\214ed as ar)2.705 F -(guments)-.18 E(ha)72 223.2 Q .3 -.15(ve ex)-.2 H(ited.).15 E F2 2.5 -(2.3. Interacti)72 247.2 R .2 -.1(ve F)-.1 H(eatur)-.15 E(es)-.18 E F0 .51 -(Shells ha)97 262.8 R .81 -.15(ve b)-.2 H -.15(eg).15 G .51(un of).15 F .51 -(fering features geared speci\214cally for interacti)-.25 F .81 -.15(ve u)-.25 -H .51(se rather than to augment the).15 F .76(programming language.)72 274.8 R -.761(These interacti)5.76 F 1.061 -.15(ve f)-.25 H .761 -(eatures include job control, command line editing, history and).15 F(aliases.) -72 286.8 Q .626(Job control is a f)97 302.4 R .626(acility pro)-.1 F .626 -(vided jointly by the shell and the)-.15 F/F3 9/Times-Roman@0 SF(UNIX)3.125 E -F0 -.1(ke)3.125 G .625(rnel that allo).1 F .625(ws users to selec-)-.25 F(ti)72 -314.4 Q -.15(ve)-.25 G .344 -(ly stop \(suspend\) and restart \(resume\) processes.).15 F .345 -(Each pipeline e)5.345 F -.15(xe)-.15 G .345 -(cuted by the shell is referred to as a).15 F F1(job)72 326.4 Q F0 2.989(.J)C -.488(obs may be suspended and restarted in either the fore)94.159 326.4 R .488 -(ground, where the)-.15 F 2.988(yh)-.15 G -2.25 -.2(av e)397.148 326.4 T .488 -(access to the terminal,)3.188 F .833(or background, where the)72 338.4 R 3.333 -(ya)-.15 G .834(re isolated and cannot read from the terminal.)189.312 338.4 R --.8(Ty)5.834 G .834(ping the).8 F F1(suspend)3.334 E F0(character)5 E .459(whi\ -le a process is running stops that process and returns control to the shell.)72 -350.4 R .459(Once a job is suspended, the)5.459 F .392 -(user manipulates the job')72 362.4 R 2.892(ss)-.55 G .392(tate, using)184.118 -362.4 R F2(bg)2.892 E F0 .393(to continue it in the background,)2.892 F F2(fg) -2.893 E F0 .393(to return it to the fore)2.893 F(ground)-.15 E .891(and a)72 -374.4 R -.1(wa)-.15 G .891(it its completion, or).1 F F2(kill)3.391 E F0 .891 -(to send it a signal.)3.391 F(The)5.89 E F2(jobs)3.39 E F0 .89 -(command lists the status of jobs, and)3.39 F F2(wait)3.39 E F0 .407 -(will pause the shell until a speci\214ed job terminates.)72 386.4 R .407 -(The shell pro)5.407 F .407(vides a number of w)-.15 F .407 -(ays to refer to a job,)-.1 F(and will notify the user whene)72 398.4 Q -.15 -(ve)-.25 G 2.5(rab).15 G(ackground job terminates.)220.18 398.4 Q -.4(Wi)97 414 -S .956(th the adv).4 F .956(ent of more po)-.15 F .956 -(werful terminals and terminal emulators, more sophisticated interaction)-.25 F -.253(than that pro)72 426 R .253(vided by the)-.15 F F3(UNIX)2.753 E F0 -.1(ke) -2.754 G .254(rnel terminal dri).1 F -.15(ve)-.25 G 2.754(ri).15 G 2.754(sp) -293.592 426 S 2.754(ossible. Some)305.236 426 R .254(shells of)2.754 F .254 -(fer command line editing,)-.25 F 1.141 -(which permits a user to edit lines of input using f)72 438 R(amiliar)-.1 E F1 -(emacs)3.64 E F0(or)3.64 E F1(vi)3.64 E F0 1.14 -(-style commands before submitting)B .02(them to the shell.)72 450 R .02 -(Editors allo)5.02 F 2.52(wc)-.25 G .02(orrections to be made without ha)206.31 -450 R .021(ving to erase back to the point of error)-.2 F 2.521(,o)-.4 G(r) -500.67 450 Q .135(start the line ane)72 462 R 3.935 -.65(w. C)-.25 H .135 -(ommand line editors run the g).65 F .135(amut from a small \214x)-.05 F .134 -(ed set of commands and k)-.15 F .434 -.15(ey b)-.1 H(ind-).15 E -(ings to input f)72 474 Q(acilities which allo)-.1 E 2.5(wa)-.25 G -(rbitrary actions to be bound to a k)217.2 474 Q .3 -.15(ey o)-.1 H 2.5(rk).15 -G .3 -.15(ey s)379.88 474 T(equence.).15 E .145(Modern shells also k)97 489.6 R -.145(eep a history)-.1 F 2.645(,w)-.65 G .146 -(hich is the list of commands a user has typed.)243.49 489.6 R .146(Shell f) -5.146 F .146(acilities are)-.1 F -.2(av)72 501.6 S .368(ailable to recall pre) --.05 F .367(vious commands and use portions of old commands when composing ne) --.25 F 2.867(wo)-.25 G 2.867(nes. The)467.253 501.6 R 1.456 -(command history can be sa)72 513.6 R -.15(ve)-.2 G 3.957(dt).15 G 3.957 -(oa\214)207.522 513.6 S 1.457 -(le and read back in at shell startup, so it persists across sessions.)230.436 -513.6 R .675(Shells which pro)72 525.6 R .675 -(vide both command editing and history generally ha)-.15 F .974 -.15(ve e)-.2 H -.674(diting commands to interacti).15 F -.15(ve)-.25 G(ly).15 E(step forw)72 -537.6 Q(ard and backw)-.1 E(ard through the history list.)-.1 E .013 -(Aliases allo)97 553.2 R -5.012 2.513(wa s)-.25 H .014 -(tring to be substituted for a command name.)164.28 553.2 R(The)5.014 E 2.514 -(yc)-.15 G .014(an be used to create a mnemonic)373.396 553.2 R .568(for a)72 -565.2 R F3(UNIX)3.068 E F0 .568(command name \()3.068 F/F4 10/Courier@0 SF .568 -(alias del=rm)B F0 .568(\), to e)B .567(xpand a single w)-.15 F .567 -(ord to a comple)-.1 F 3.067(xc)-.15 G .567(ommand \()432.603 565.2 R F4(alias) -A .255(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 577.2 R F0 .255 -(\), or to ensure that a command)B(is in)72 589.2 Q -.2(vo)-.4 G -.1(ke).2 G -2.5(dw).1 G(ith a basic set of options \()122.41 589.2 Q F4 -(alias ls="/bin/ls -F")A F0(\).)A F2 2.5(3. The)72 613.2 R -(POSIX Shell Standard)2.5 E F1(POSIX)97 628.8 Q F0 .239 -(is a name originally coined by Richard Stallman for a f)4.405 F .239 -(amily of open system standards based)-.1 F(on)72 640.8 Q F3(UNIX)3.239 E F0 -5.739(.T)C .74(here are a number of aspects of)122.079 640.8 R F3(UNIX)3.24 E -F0 .74(under consideration for standardization, from the basic)3.24 F .192 -(system services at the system call and C library le)72 652.8 R -.15(ve)-.25 G -2.692(lt).15 G 2.692(oa)290.16 652.8 S .191 -(pplications and tools to system administration and)302.292 652.8 R 2.5 -(management. Each)72 664.8 R(area of standardization is assigned to a w)2.5 E -(orking group in the 1003 series.)-.1 E 3.602(The POSIX Shell and T)97 680.4 R -3.602(ools standard has been de)-.8 F -.15(ve)-.25 G 3.603(loped by IEEE W).15 -F 3.603(orking Group 1003.2)-.8 F -1.667(\(POSIX.2\) [4].)72 692.4 R 2.799 -(It concentrates on the command interpreter interf)7.799 F 2.799 -(ace and utility programs commonly)-.1 F -.15(exe)72 704.4 S 2.345 -(cuted from the command line or by other programs.).15 F 2.345(An initial v) -7.345 F 2.345(ersion of the standard has been)-.15 F(appro)72 716.4 Q -.15(ve) --.15 G 2.915(da).15 G .414(nd published by the IEEE, and w)116.265 716.4 R .414 -(ork is currently underw)-.1 F .414(ay to update it.)-.1 F .414 -(There are four primary)5.414 F(areas of w)72 728.4 Q -(ork in the 1003.2 standard:)-.1 E EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-4-)279.67 48 S 21.5<8341>72 84 S .835 -(spects of the shell')104.22 84 R 3.335(ss)-.55 G .835 -(yntax and command language.)192 84 R 3.335(An)5.835 G .835(umber of special b) -338.095 84 R .835(uiltins such as)-.2 F/F1 10/Times-Bold@0 SF(cd)3.335 E F0 -(and)3.335 E F1(exec)97 96 Q F0 .545(are being speci\214ed as part of the shel\ -l, since their functionality usually cannot be implemented)3.046 F -(by a separate e)97 108 Q -.15(xe)-.15 G(cutable;).15 E 21.5<8341>72 123.6 S -.73(set of utilities to be called by shell scripts and applications.)107.45 -123.6 R .731(Examples are programs lik)5.731 F(e)-.1 E/F2 10/Times-Italic@0 SF -2.397(sed, tr)3.231 F(,)-1.11 E F0(and)97 135.6 Q F2(awk.)2.853 E F0 .352 -(Utilities commonly implemented as shell b)4.519 F .352 -(uiltins are described in this section, such as)-.2 F F1(test)2.852 E F0(and)97 -147.6 Q F1(kill)3.422 E F0 5.922(.A)C 3.422(ne)144.404 147.6 S .922 -(xpansion of this section')157.116 147.6 R 3.423(ss)-.55 G .923 -(cope, termed the User Portability Extension, or UPE, has)268.586 147.6 R -(standardized interacti)97 159.6 Q .3 -.15(ve p)-.25 H(rograms such as).15 E F2 -(vi)2.5 E F0(and)4.166 E F2(mailx;)2.5 E F0 21.5<8341>72 175.2 S .926 -(group of functional interf)107.646 175.2 R .926(aces to services pro)-.1 F -.926(vided by the shell, such as the traditional)-.15 F F2(system)3.425 E F0(C) -5.091 E .507(library function.)97 187.2 R .507 -(There are functions to perform shell w)5.507 F .508(ord e)-.1 F .508 -(xpansions, perform \214lename e)-.15 F(xpansion)-.15 E(\()97 199.2 Q F2 -(globbing)A F0 .58(\), obtain v)B .58 -(alues of POSIX.2 system con\214guration v)-.25 F .58(ariables, retrie)-.25 F -.88 -.15(ve v)-.25 H .58(alues of en)-.1 F(vironment)-.4 E -.25(va)97 211.2 S -(riables \().25 E F2 -.1(ge)C(ten).1 E(v\(\))-.4 E F0(\), and other services;) -.833 E 21.5<8341>72 226.8 S(suite of `)106.72 226.8 Q(`de)-.74 E -.15(ve)-.25 G -(lopment').15 E 2.5('u)-.74 G(tilities such as)209.54 226.8 Q F2(c89)2.5 E F0 -(\(the POSIX.2 v)4.166 E(ersion of)-.15 E F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5 -E F0 .483(Bash is concerned with the aspects of the shell')97 242.4 R 2.983(sb) --.55 G(eha)301.597 242.4 Q .484(vior de\214ned by POSIX.2.)-.2 F .484 -(The shell command)5.484 F 1.439 -(language has of course been standardized, including the basic \215o)72 254.4 R -3.938(wc)-.25 G 1.438(ontrol and program e)359.688 254.4 R -.15(xe)-.15 G 1.438 -(cution con-).15 F 1.145(structs, I/O redirection and pipelining, ar)72 266.4 R -1.145(gument handling, v)-.18 F 1.145(ariable e)-.25 F 1.146 -(xpansion, and quoting.)-.15 F(The)6.146 E F2(special)3.646 E F0 -.2(bu)72 -278.4 S .676(iltins, which must be implemented as part of the shell to pro).2 F -.676(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676(re speci\214ed) -457.504 278.4 R .7(as being part of the shell; e)72 290.4 R .7 -(xamples of these are)-.15 F F1 -2.3 -.15(ev a)3.201 H(l).15 E F0(and)3.201 E -F1(export)3.201 E F0 5.701(.O)C .701(ther utilities appear in the sections of) -352.034 290.4 R .256(POSIX.2 not de)72 302.4 R -.2(vo)-.25 G .256(ted to the s\ -hell which are commonly \(and in some cases must be\) implemented as b).2 F -(uiltin)-.2 E(commands, such as)72 314.4 Q F1 -.18(re)2.5 G(ad).18 E F0(and)2.5 -E F1(test)2.5 E F0(.)A .972(POSIX.2 also speci\214es aspects of the shell')97 -330 R 3.473(si)-.55 G(nteracti)286.016 330 Q 1.273 -.15(ve b)-.25 H(eha).15 E -.973(vior as part of the UPE, including job)-.2 F .233 -(control, command line editing, and history)72 342 R 5.233(.I)-.65 G .233 -(nterestingly enough, only)253.849 342 R F2(vi)2.733 E F0 .233 -(-style line editing commands ha)B -.15(ve)-.2 G(been standardized;)72 354 Q F2 -(emacs)2.5 E F0(editing commands were left out due to objections.)2.5 E .148 -(There were certain areas in which POSIX.2 felt standardization w)97 369.6 R -.149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)420.643 369.6 R .149 -(xisting imple-)-.15 F 1.598(mentation pro)72 381.6 R 1.598 -(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)251.56 -381.6 R 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597 -(nted and standardized functionality in).15 F .228(these areas.)72 393.6 R(The) -5.228 E F1(command)2.728 E F0 -.2(bu)2.728 G .228(iltin w).2 F .228(as in)-.1 F --.15(ve)-.4 G .228(nted so that shell functions could be written to replace b) -.15 F(uiltins;)-.2 E 1.663(it mak)72 405.6 R 1.663 -(es the capabilities of the b)-.1 F 1.663(uiltin a)-.2 F -.25(va)-.2 G 1.663 -(ilable to the function.).25 F 1.663(The reserv)6.663 F 1.663(ed w)-.15 F 1.663 -(ord `)-.1 F(`!')-.74 E 4.163('w)-.74 G 1.663(as added to)455.685 405.6 R(ne)72 -417.6 Q -.05(ga)-.15 G .915(te the return v).05 F .915 -(alue of a command or pipeline; it w)-.25 F .916(as nearly impossible to e)-.1 -F .916(xpress `)-.15 F .916(`if not x')-.74 F 3.416('c)-.74 G(leanly)479.56 -417.6 Q .904(using the sh language.)72 429.6 R .904(There e)5.904 F .904 -(xist multiple incompatible implementations of the)-.15 F F1(test)3.403 E F0 --.2(bu)3.403 G .903(iltin, which tests).2 F .28 -(\214les for type and other attrib)72 441.6 R .281 -(utes and performs arithmetic and string comparisons.)-.2 F .281 -(POSIX considered none)5.281 F .868(of these correct, so the standard beha)72 -453.6 R .868(vior w)-.2 F .868(as speci\214ed in terms of the number of ar)-.1 -F .867(guments to the com-)-.18 F 3.803(mand. POSIX.2)72 465.6 R 1.303 -(dictates e)3.803 F 1.303(xactly what will happen when four or fe)-.15 F 1.303 -(wer ar)-.25 F 1.303(guments are gi)-.18 F -.15(ve)-.25 G 3.803(nt).15 G(o) -459.462 465.6 Q F1(test)3.804 E F0 3.804(,a)C(nd)494 465.6 Q(lea)72 477.6 Q --.15(ve)-.2 G 4.531(st).15 G 2.031(he beha)103.951 477.6 R 2.031 -(vior unde\214ned when more ar)-.2 F 2.031(guments are supplied.)-.18 F 2.03 -(Bash uses the POSIX.2 algorithm,)7.031 F(which w)72 489.6 Q(as concei)-.1 E --.15(ve)-.25 G 2.5(db).15 G 2.5(yD)164.53 489.6 S -.2(av)179.25 489.6 S(id K).2 -E(orn.)-.35 E 1.128 -(While POSIX.2 includes much of what the shell has traditionally pro)97 505.2 R -1.129(vided, some important things)-.15 F(ha)72 517.2 Q .58 -.15(ve b)-.2 H .28 -(een omitted as being `).15 F(`be)-.74 E .28(yond its scope.)-.15 F 4.26 -.74 -('' T)-.7 H .28(here is, for instance, no mention of a dif).74 F .28 -(ference between)-.25 F(a)72 529.2 Q F2(lo)3.354 E(gin)-.1 E F0 .854 -(shell and an)5.02 F 3.354(yo)-.15 G .854(ther interacti)167.956 529.2 R 1.154 --.15(ve s)-.25 H .854(hell \(since POSIX.2 does not specify a login program\).) -.15 F .855(No \214x)5.855 F(ed)-.15 E -(startup \214les are de\214ned, either \255 the standard does not mention)72 -541.2 Q F2(.pr)2.5 E(o\214le)-.45 E F0(.)1.666 E F1 2.5(4. Shell)72 565.2 R -(Comparison)2.5 E F0 .693(This section compares features of bash, sh, and ksh \ -\(the three shells closest to POSIX compliance\).)97 580.8 R .245(Since ksh an\ -d bash are supersets of sh, the features common to all three are co)72 592.8 R --.15(ve)-.15 G .245(red \214rst.).15 F .245(Some of the fea-)5.245 F 1.198 -(tures bash and ksh contain which are not in sh will be discussed.)72 604.8 R -(Ne)6.198 E 1.198(xt, features unique to bash will be)-.15 F 2.866(listed. The) -72 616.8 R .366(\214rst three sections pro)2.866 F .366(vide a progressi)-.15 F --.15(ve)-.25 G .366(ly more detailed o).15 F -.15(ve)-.15 G(rvie).15 E 2.866 -(wo)-.25 G 2.866(fb)395.706 616.8 S 2.866(ash. Finally)406.902 616.8 R 2.866 -(,f)-.65 G .366(eatures of)464.484 616.8 R(ksh-88 \(the currently-a)72 628.8 Q --.25(va)-.2 G(ilable v).25 E(ersion\) not in sh or bash will be presented.)-.15 -E F1 2.5(4.1. Common)72 652.8 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .021 -(All three shells ha)97 668.4 R .321 -.15(ve t)-.2 H .021 -(he same basic feature set, which is essentially that pro).15 F .02 -(vided by sh and described)-.15 F 1.026(in an)72 680.4 R 3.526(ys)-.15 G 3.526 -(hm)105.012 680.4 S 1.027 -(anual page. Bash and ksh are both sh supersets, and so all three pro)121.318 -680.4 R 1.027(vide the command inter)-.15 F(-)-.2 E .714 -(preter and programming language described earlier)72 692.4 R 3.214(.T)-.55 G -.714(he shell grammar)291.506 692.4 R 3.214(,s)-.4 G .714(yntax, \215o)371.568 -692.4 R 3.214(wc)-.25 G .714(ontrol, redirections,)424.686 692.4 R(and b)72 -704.4 Q(uiltins implemented by the Bourne shell are the baseline for subsequen\ -t discussion.)-.2 E EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-5-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5(4.2. F)72 -84 R(eatur)-.25 E(es in bash and ksh)-.18 E F0 .458(Ksh and bash ha)97 99.6 R -.758 -.15(ve s)-.2 H -2.15 -.25(ev e).15 H .459(ral features in common be).25 F -.459(yond this base le)-.15 F -.15(ve)-.25 G 2.959(lo).15 G 2.959(ff)387.814 -99.6 S(unctionality)397.433 99.6 Q 5.459(.S)-.65 G .459(ome of this)458.082 -99.6 R(is due to the POSIX.2 standard.)72 111.6 Q(Other functions ha)5 E .3 --.15(ve b)-.2 H(een implemented in bash using ksh as a guide.).15 E F1 2.5 -(4.2.1. V)72 135.6 R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .097 -(Bash and ksh ha)97 151.2 R .396 -.15(ve a)-.2 H .096(ugmented v).15 F .096 -(ariable e)-.25 F 2.596(xpansion. Arithmetic)-.15 F .096(substitution allo) -2.596 F .096(ws an e)-.25 F .096(xpression to be)-.15 F -.25(eva)72 163.2 S .6 -(luated and the result substituted.).25 F .6(Shell v)5.6 F .6 -(ariables may be used as operands, and the result of an e)-.25 F(xpres-)-.15 E -.41(sion may be assigned to a v)72 175.2 R 2.91(ariable. Nearly)-.25 F .41 -(all of the operators from the C language are a)2.91 F -.25(va)-.2 G .41 -(ilable, with the).25 F(same precedence rules:)72 187.2 Q/F2 10/Courier@0 SF 6 -($e)97 205.2 S(cho $\(\(3 + 5 * 32\)\))115 205.2 Q(163)97 217.2 Q F0 -1.11(Va) -72 238.8 S 1.445(riables may be declared as)1.11 F/F3 10/Times-Italic@0 SF -(inte)3.945 E -.1(ge)-.4 G(r).1 E F0 3.945(,w)1.666 G 1.446 -(hich causes arithmetic e)240.956 238.8 R -.25(va)-.25 G 1.446 -(luation to be performed on the v).25 F(alue)-.25 E(whene)72 250.8 Q -.15(ve) --.25 G 2.5(rt).15 G(he)115.75 250.8 Q 2.5(ya)-.15 G(re assigned to.)136.98 -250.8 Q .483(There are ne)97 266.4 R 2.983(we)-.25 G .483 -(xpansions to obtain the length of a v)162.179 266.4 R(ariable')-.25 E 2.982 -(sv)-.55 G .482(alue and to remo)352.19 266.4 R .782 -.15(ve s)-.15 H .482 -(ubstrings match-).15 F .063(ing speci\214ed patterns from the be)72 278.4 R -.063(ginning and end of v)-.15 F .063(ariable v)-.25 F 2.563(alues. A)-.25 F -(ne)2.563 E 2.563(wf)-.25 G .064(orm of command substitution,)383.249 278.4 R -F1($\()72 290.4 Q F3(list)A F1(\))A F0 2.5(,i)C 2.5(sm)103.67 290.4 S -(uch easier to nest than `)117.84 290.4 Q F3(list)A F0 2.5(`a)C -(nd has simpli\214ed quoting rules.)235.04 290.4 Q .082(There are ne)97 306 R -2.582(wv)-.25 G .082(ariables to control the shell')161.436 306 R 2.581(sb)-.55 -G(eha)284.333 306 Q(vior)-.2 E 2.581(,a)-.4 G .081(nd additional v)323.244 306 -R .081(ariables set or interpreted spe-)-.25 F 1.038(cially by the shell.)72 -318 R F1(RANDOM)6.038 E F0(and)3.538 E F1(SECONDS)3.538 E F0(are)3.539 E F3 -(dynamic)3.539 E F0 -.25(va)3.539 G 3.539(riables: their).25 F -.25(va)3.539 G -1.039(lues are generated afresh).25 F 1.022(each time the)72 330 R 3.522(ya) --.15 G 1.022(re referenced.)140.176 330 R F1(RANDOM)6.022 E F0 1.021 -(returns a dif)3.521 F 1.021(ferent random number each time it is referenced,) --.25 F(and)72 342 Q F1(SECONDS)3.138 E F0 .638 -(returns the number of seconds since the shell w)3.138 F .638 -(as started or the v)-.1 F .639(ariable w)-.25 F .639(as assigned to,)-.1 F -1.448(plus an)72 354 R 3.948(yv)-.15 G 1.448(alue assigned.)115.606 354 R F1 -(PWD)6.448 E F0(and)3.948 E F1(OLDPWD)3.947 E F0 1.447 -(are set to the current and pre)3.947 F 1.447(vious w)-.25 F 1.447 -(orking directories,)-.1 F(respecti)72 366 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E -F1(TMOUT)5.604 E F0 .604(controls ho)3.104 F 3.104(wl)-.25 G .604 -(ong the shell will w)226.436 366 R .604(ait at a prompt for input.)-.1 F(If) -5.604 E F1(TMOUT)3.104 E F0 .605(is set to a)3.105 F -.25(va)72 378 S 1.168 -(lue greater than zero, the shell e).25 F 1.168(xits after w)-.15 F 1.168 -(aiting that man)-.1 F 3.668(ys)-.15 G 1.167(econds for input.)337.478 378 R F1 -(REPL)6.167 E(Y)-.92 E F0 1.167(is the def)3.667 F(ault)-.1 E -.25(va)72 390 S -.991(riable for the).25 F F1 -.18(re)3.491 G(ad).18 E F0 -.2(bu)3.491 G .991 -(iltin; if no v).2 F .992(ariable names are supplied as ar)-.25 F .992 -(guments, the line read is assigned to)-.18 F F1(REPL)72 402 Q(Y)-.92 E F0(.)A -F1 2.5(4.2.2. New)72 426 R(and Modi\214ed Builtins)2.5 E F0 .652(Both shells e) -97 441.6 R .651(xpand the basic sh set of b)-.15 F .651(uiltin commands.)-.2 F -F1(Let)5.651 E F0(pro)3.151 E .651(vides a w)-.15 F .651 -(ay to perform arithmetic)-.1 F 2.767(on shell v)72 453.6 R 5.268 -(ariables. Shell)-.25 F 2.768(programmers use)5.268 F F1(typeset)5.268 E F0 -2.768(\(bash includes)5.268 F F1(declar)5.268 E(e)-.18 E F0 2.768(as a synon) -5.268 F 2.768(ym\) to assign)-.15 F(attrib)72 465.6 Q .295(utes such as)-.2 F -F3 -.2(ex)2.795 G(port).2 E F0(and)4.461 E F3 -.37(re)2.795 G(adonly).37 E F0 -.295(to v)4.461 F(ariables.)-.25 E F1(Getopts)5.295 E F0 .294 -(is used by shell scripts to parse script options)2.795 F .962(and ar)72 477.6 -R 3.462(guments. The)-.18 F F1(set)3.462 E F0 .962(command has a ne)3.462 F -3.462(wo)-.25 G(ption)266.446 477.6 Q F1<ad6f>3.463 E F0 .963(which tak)3.463 F -.963(es option names as ar)-.1 F 3.463(guments. Option)-.18 F 1.28 -(names are synon)72 489.6 R 1.28(yms for the other set options \(e.g.,)-.15 F -F1<ad66>3.78 E F0(and)3.78 E F1 1.28(\255o noglob)3.78 F F0 3.78(\)o)C 3.78(rp) -375.97 489.6 S(ro)388.08 489.6 Q 1.28(vide ne)-.15 F 3.78(wf)-.25 G 1.28 -(unctionality \()440.78 489.6 R F1(-o)A(notify)72 501.6 Q F0 3.348(,f)C .849 -(or e)106.178 501.6 R 3.349(xample\). The)-.15 F F1 -.18(re)3.349 G(ad).18 E F0 --.2(bu)3.349 G .849(iltin tak).2 F .849(es a ne)-.1 F(w)-.25 E F1<ad72>3.349 E -F0 .849(option to specify that a line ending in a backslash)3.349 F -(should not be continued.)72 513.6 Q F1 2.5(4.2.3. T)72 537.6 R(ilde Expansion) --.18 E F0 -.35(Ti)97 553.2 S .252(lde e).35 F .251 -(xpansion is a feature adopted from the C shell.)-.15 F 2.751(At)5.251 G .251 -(ilde character at the be)331.172 553.2 R .251(ginning of a w)-.15 F .251 -(ord is)-.1 F -.15(ex)72 565.2 S(panded to either).15 E F1($HOME)2.5 E F0 -(or the home directory of another user)2.5 E 2.5(,d)-.4 G -(epending on what follo)345.84 565.2 Q(ws the tilde.)-.25 E F1 2.5 -(4.2.4. Interacti)72 589.2 R .2 -.1(ve I)-.1 H(mpr).1 E -.1(ove)-.18 G(ments).1 -E F0 .789(The most noticable impro)97 604.8 R -.15(ve)-.15 G .789(ments o).15 F --.15(ve)-.15 G 3.289(rs).15 G 3.289(ha)263.385 604.8 S .789 -(re geared for interacti)276.114 604.8 R 1.089 -.15(ve u)-.25 H 3.29(se. Ksh) -.15 F .79(and bash pro)3.29 F .79(vide job)-.15 F .882(control in a v)72 616.8 -R .882(ery similar f)-.15 F .882 -(ashion, with the same options to enable and disable it \()-.1 F F1 .881 -(set -o monitor)B F0 3.381(\)a)C .881(nd the)478.399 616.8 R(same b)72 628.8 Q -(uiltin commands to manipulate jobs \()-.2 E F1(jobs/fg/bg/kill/wait)A F0(\).)A -.866(Command line editing, with emacs and vi-style k)97 644.4 R 1.166 -.15 -(ey b)-.1 H .866(indings, is a).15 F -.25(va)-.2 G .866(ilable in both shells.) -.25 F .866(The Bash)5.866 F F3 -.37(re)72 656.4 S(adline).37 E F0 1.578 -(library is considerably more sophisticated than the ksh editing library:)5.744 -F 1.577(it allo)6.577 F 1.577(ws arbitrary k)-.25 F -.15(ey)-.1 G 1.867 -(bindings, macros, a per)72 668.4 R 1.868(-user customization \214le \()-.2 F -F3(~/.inputr)A(c)-.37 E F0 1.868(\), a number of v)B 1.868 -(ariables to further customize)-.25 F(beha)72 680.4 Q(vior)-.2 E 3.538(,a)-.4 G -1.038(nd a much lar)116.868 680.4 R 1.038 -(ger set of bindable editing commands.)-.18 F 1.037 -(The ksh editing library pro)6.037 F 1.037(vides a small)-.15 F<8c78>72 692.4 Q -(ed command set and only clumsy macros.)-.15 E .706(Both shells of)97 708 R -.706(fer access to the command history)-.25 F 5.706(.T)-.65 G .706 -(he in-line editing options ha)307.278 708 R 1.006 -.15(ve d)-.2 H(ef).15 E -.706(ault k)-.1 F 1.006 -.15(ey b)-.1 H(ind-).15 E .624 -(ings to access the history list.)72 720 R(The)5.624 E F1(fc)3.124 E F0 .624 -(command is pro)3.124 F .624(vided to re-e)-.15 F -.15(xe)-.15 G .623(cute pre) -.15 F .623(vious commands and display)-.25 F EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-6-)279.67 48 S(the contents of the history list.) -72 84 Q/F1 10/Times-Bold@0 SF 2.5(4.2.5. Miscellaneous)72 108 R -(Changes and Impr)2.5 E -.1(ov)-.18 G(ments).1 E F0 .707(Other impro)97 123.6 R --.15(ve)-.15 G .707(ments include aliases, the).15 F F1(select)3.207 E F0 .708 -(shell language construct, which supports the genera-)3.207 F 1.298 -(tion and presentation of simple menus, and e)72 135.6 R 1.298 -(xtensions to the)-.15 F F1(export)3.798 E F0(and)3.798 E F1 -.18(re)3.798 G -(adonly).18 E F0 -.2(bu)3.798 G 1.298(iltins which allo).2 F(w)-.25 E -.25(va) -72 147.6 S .017(riables to be assigned v).25 F .017 -(alues at the same time the attrib)-.25 F .017(utes are set.)-.2 F -.8(Wo)5.018 -G .018(rd splitting has changed:).8 F .018(if tw)5.018 F 2.518(oo)-.1 G(r) -500.67 147.6 Q .158(more adjacent w)72 159.6 R .157 -(ord splitting characters occur)-.1 F 2.657(,b)-.4 G .157 -(ash and ksh will generate null \214elds; sh mak)264.893 159.6 R .157 -(es runs of mul-)-.1 F .339 -(tiple \214eld separator charactors the same as a single separator)72 171.6 R -5.339(.B)-.55 G .34(ash and ksh split only the results of e)330.89 171.6 R -(xpan-)-.15 E(sion, rather than e)72 183.6 Q -.15(ve)-.25 G(ry w).15 E -(ord as sh does, closing a long-standing shell security hole.)-.1 E 1.234 -(Shell functions in bash and ksh may ha)97 199.2 R 1.534 -.15(ve l)-.2 H 1.234 -(ocal v).15 F 3.734(ariables. V)-.25 F 1.234(ariables declared with)-1.11 F F1 -(typeset)3.734 E F0 1.234(\(or the)3.734 F .001(bash synon)72 211.2 R(ym,)-.15 -E F1(local)2.501 E F0 .001(\), ha)B .301 -.15(ve a s)-.2 H .001 -(cope restricted to the function and its descendents, and may shado).15 F 2.502 -(wv)-.25 G(ariables)472.9 211.2 Q(de\214ned by the in)72 223.2 Q -.2(vo)-.4 G -(king shell.).2 E(Local v)5 E(ariables are remo)-.25 E -.15(ve)-.15 G 2.5(dw) -.15 G(hen a function completes.)317.75 223.2 Q F1 2.5(4.3. F)72 247.2 R(eatur) --.25 E(es Unique to bash)-.18 E F0(Naturally)97 262.8 Q 2.895(,b)-.65 G .395 -(ash includes features not in sh or ksh.)144.515 262.8 R .395 -(This section discusses some of the features which)5.395 F(mak)72 274.8 Q 2.986 -(eb)-.1 G .486(ash unique.)101.546 274.8 R .486(Most of them pro)5.486 F .486 -(vide impro)-.15 F -.15(ve)-.15 G 2.986(di).15 G(nteracti)288.098 274.8 Q .787 --.15(ve u)-.25 H .487(se, b).15 F .487(ut a fe)-.2 F 2.987(wp)-.25 G .487 -(rogramming impro)394.653 274.8 R -.15(ve)-.15 G(ments).15 E -(are present as well.)72 286.8 Q -(Full descriptions of these features can be found in the bash documentation.)5 -E F1 2.5(4.3.1. Startup)72 310.8 R(Files)2.5 E F0 .281(Bash e)97 326.4 R -.15 -(xe)-.15 G .281(cutes startup \214les dif).15 F .281 -(ferently than other shells.)-.25 F .281(The bash beha)5.281 F .28 -(vior is a compromise between)-.2 F .116 -(the csh principle of startup \214les with \214x)72 338.4 R .116(ed names e) --.15 F -.15(xe)-.15 G .116(cuted for each shell and the sh `).15 F -(`minimalist')-.74 E 2.616('b)-.74 G(eha)472.26 338.4 Q(vior)-.2 E(.)-.55 E -2.956(An interacti)72 350.4 R 3.256 -.15(ve i)-.25 H 2.956 -(nstance of bash started as a login shell reads and e).15 F -.15(xe)-.15 G -(cutes).15 E/F2 10/Times-Italic@0 SF(~/.bash_pr)5.455 E(o\214le)-.45 E F0 2.955 -(\(the \214le)7.121 F F2(.bash_pr)72 362.4 Q(o\214le)-.45 E F0 .835 -(in the user')5 F 3.335(sh)-.55 G .835(ome directory\), if it e)187.385 362.4 R -3.335(xists. An)-.15 F(interacti)3.335 E 1.135 -.15(ve n)-.25 H .835 -(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F2(~/.bashr)72 -374.4 Q(c)-.37 E F0 5.538(.A)1.666 G(non-interacti)127.422 374.4 Q .838 -.15 -(ve s)-.25 H .538(hell \(one be).15 F .538(gun to e)-.15 F -.15(xe)-.15 G .538 -(cute a shell script, for e).15 F .537(xample\) reads no \214x)-.15 F .537 -(ed startup)-.15 F .139(\214le, b)72 386.4 R .139(ut uses the v)-.2 F .139 -(alue of the v)-.25 F(ariable)-.25 E F1(ENV)2.639 E F0 2.639(,i)C 2.639(fs) -253.361 386.4 S .139(et, as the name of a startup \214le.)263.22 386.4 R .139 -(The ksh practice of reading)5.139 F F1($ENV)72 398.4 Q F0 .69(for e)3.19 F --.15(ve)-.25 G .69(ry shell, with the accompan).15 F .689(ying dif)-.15 F .689 -(\214culty of de\214ning the proper v)-.25 F .689(ariables and functions for) --.25 F(interacti)72 410.4 Q .946 -.15(ve a)-.25 H .646(nd non-interacti).15 F -.946 -.15(ve s)-.25 H .646(hells or ha).15 F .646 -(ving the \214le read only for interacti)-.2 F .946 -.15(ve s)-.25 H .646 -(hells, w).15 F .646(as considered too)-.1 F(comple)72 422.4 Q(x.)-.15 E F1 2.5 -(4.3.2. New)72 446.4 R(Builtin Commands)2.5 E F0 1.119(There are a fe)97 462 R -3.619(wb)-.25 G 1.118(uiltins which are ne)170.986 462 R 3.618(wo)-.25 G 3.618 -(rh)268.528 462 S -2.25 -.2(av e)280.476 462 T 1.118(been e)3.818 F 1.118 -(xtended in bash.)-.15 F(The)6.118 E F1(enable)3.618 E F0 -.2(bu)3.618 G 1.118 -(iltin allo).2 F(ws)-.25 E -.2(bu)72 474 S .736 -(iltin commands to be turned on and of).2 F 3.236(fa)-.25 G(rbitrarily)250.198 -474 Q 5.736(.T)-.65 G 3.237(ou)298.644 474 S .737(se the v)311.881 474 R .737 -(ersion of)-.15 F F2(ec)3.237 E(ho)-.15 E F0 .737(found in a user')4.903 F -3.237(ss)-.55 G(earch)482.35 474 Q .013(path rather than the bash b)72 486 R -(uiltin,)-.2 E/F3 10/Courier@0 SF .013(enable -n echo)2.513 F F0(suf)2.513 E -2.513(\214ces. The)-.25 F F1(help)2.513 E F0 -.2(bu)2.513 G .013(iltin pro).2 F -.013(vides quick synopses of)-.15 F 1.382(the shell f)72 498 R 1.382 -(acilities without requiring access to a manual page.)-.1 F F1(Builtin)6.382 E -F0 1.383(is similar to)3.882 F F1(command)3.883 E F0 1.383(in that it)3.883 F -.342(bypasses shell functions and directly e)72 510 R -.15(xe)-.15 G .342 -(cutes b).15 F .342(uiltin commands.)-.2 F .342 -(Access to a csh-style stack of directories)5.342 F .072(is pro)72 522 R .073 -(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 E F0 2.573(,a)C(nd) -211.197 522 Q F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 E F1(Pushd)5.073 E -F0(and)2.573 E F1(popd)2.573 E F0 .073(insert and remo)2.573 F .373 -.15(ve d) --.15 H .073(irectories from the).15 F .094(stack, respecti)72 534 R -.15(ve) --.25 G(ly).15 E 2.594(,a)-.65 G(nd)154.448 534 Q F1(dirs)2.594 E F0 .094 -(lists the stack contents.The)2.594 F F1(suspend)2.594 E F0 .094 -(command will stop the shell process when)2.594 F 1.329(job control is acti)72 -546 R -.15(ve)-.25 G 3.829(;m).15 G 1.329(ost other shells do not allo)169.136 -546 R 3.829(wt)-.25 G(hemselv)294.64 546 Q 1.33(es to be stopped lik)-.15 F -3.83(et)-.1 G(hat.)421.31 546 Q F1 -.74(Ty)6.33 G(pe,).74 E F0 1.33(the bash) -3.83 F(answer to)72 558 Q F1(which)2.5 E F0(and)2.5 E F1(whence,)2.5 E F0(sho) -2.5 E(ws what will happen when a w)-.25 E(ord is typed as a command:)-.1 E F3 6 -($t)97 576 S(ype export)115 576 Q(export is a shell builtin)97 588 Q 6($t)97 -600 S(ype -t export)115 600 Q(builtin)97 612 Q 6($t)97 624 S(ype bash)115 624 Q -(bash is /bin/bash)97 636 Q 6($t)97 648 S(ype cd)115 648 Q(cd is a function)97 -660 Q(cd \(\))97 672 Q({)97 684 Q(builtin cd "$@" && xtitle $HOST: $PWD)121 696 -Q(})97 708 Q EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-7-)279.67 48 S -1.11(Va)72 84 S .682 -(rious modes tell what a command w)1.11 F .681(ord is \(reserv)-.1 F .681(ed w) --.15 F .681(ord, alias, function, b)-.1 F .681(uiltin, or \214le\) or which v) --.2 F(er)-.15 E(-)-.2 E 1.15(sion of a command will be e)72 96 R -.15(xe)-.15 G -1.15(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)305.7 96 R -1.15(Some of this functionality has been)6.15 F -(adopted by POSIX.2 and folded into the)72 108 Q/F1 10/Times-Bold@0 SF(command) -2.5 E F0(utility)2.5 E(.)-.65 E F1 2.5(4.3.3. Editing)72 132 R(and Completion) -2.5 E F0 .682(One area in which bash shines is command line editing.)97 147.6 R -.682(Bash uses the)5.682 F/F2 10/Times-Italic@0 SF -.37(re)3.182 G(adline).37 E -F0 .682(library to read and)4.848 F .102(edit lines when interacti)72 159.6 R --.15(ve)-.25 G 5.102(.R).15 G .103(eadline is a po)191.438 159.6 R .103 -(werful and \215e)-.25 F .103(xible input f)-.15 F .103 -(acility that a user can con\214gure to his)-.1 F 2.506(tastes. It)72 171.6 R -(allo)2.506 E .006(ws lines to be edited using either emacs or vi commands, wh\ -ere those commands are appropri-)-.25 F 2.994(ate. The)72 183.6 R .494 -(full capability of emacs is not present \255 there is no w)2.994 F .495 -(ay to e)-.1 F -.15(xe)-.15 G .495(cute a named command with M-x,).15 F .222 -(for instance \255 b)72 195.6 R .222(ut the e)-.2 F .222 -(xisting commands are more than adequate.)-.15 F .221 -(The vi mode is compliant with the com-)5.222 F -(mand line editing standardized by POSIX.2.)72 207.6 Q 1.69 -(Readline is fully customizable.)97 223.2 R 1.691 -(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H 1.691 -(indings, the library).15 F(allo)72 235.2 Q .83 -(ws users to de\214ne additional k)-.25 F 1.13 -.15(ey b)-.1 H .83 -(indings using a startup \214le.).15 F(The)5.83 E F2(inputr)3.329 E(c)-.37 E F0 -.829(\214le, which def)4.995 F .829(aults to the)-.1 F(\214le)72 247.2 Q F2 -(~/.inputr)4.287 E(c)-.37 E F0 4.287(,i)1.666 G 4.287(sr)137.43 247.2 S 1.788(\ -ead each time readline initializes, permitting users to maintain a consistent \ -interf)148.937 247.2 R(ace)-.1 E .547(across a set of programs.)72 259.2 R .546 -(Readline includes an e)5.546 F .546(xtensible interf)-.15 F .546 -(ace, so each program using the library can)-.1 F .23(add its o)72 271.2 R .23 -(wn bindable commands and program-speci\214c k)-.25 F .531 -.15(ey b)-.1 H -2.731(indings. Bash).15 F .231(uses this f)2.731 F .231 -(acility to add bindings)-.1 F(that perform history e)72 283.2 Q -(xpansion or shell w)-.15 E(ord e)-.1 E(xpansions on the current input line.) --.15 E .707(Readline interprets a number of v)97 298.8 R .706 -(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G .706 -(ariables e)408.432 298.8 R .706(xist to control)-.15 F .157 -(whether or not eight-bit characters are directly read as input or con)72 310.8 -R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F .458 -.15 -(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 322.8 Q 1.575(ed k)-.15 F -1.875 -.15(ey s)-.1 H 1.575 -(equence consists of the character with the eighth bit zeroed, preceded by the) -.15 F F2(meta-)4.074 E(pr)72 334.8 Q(e\214x)-.37 E F0(character)4.45 E 2.784 -(,u)-.4 G .284(sually escape, which selects an alternate k)145.374 334.8 R -.15 -(ey)-.1 G .285(map\), to decide whether to output characters).15 F .485 -(with the eighth bit set directly or as a meta-pre\214x)72 346.8 R .485(ed k) --.15 F .784 -.15(ey s)-.1 H .484(equence, whether or not to wrap to a ne).15 F -2.984(ws)-.25 G(creen)482.35 346.8 Q .157 -(line when a line being edited is longer than the screen width, the k)72 358.8 -R -.15(ey)-.1 G .158(map to which subsequent k).15 F .458 -.15(ey b)-.1 H -(indings).15 E .531(should apply)72 370.8 R 3.031(,o)-.65 G 3.031(re)133.802 -370.8 S -.15(ve)144.353 370.8 S 3.031(nw).15 G .531 -(hat happens when readline w)168.894 370.8 R .531(ants to ring the terminal') --.1 F 3.03(sb)-.55 G 3.03(ell. All)399.37 370.8 R .53(of these v)3.03 F -(ariables)-.25 E(can be set in the inputrc \214le.)72 382.8 Q .284 -(The startup \214le understands a set of C preprocessor)97 398.4 R(-lik)-.2 E -2.785(ec)-.1 G .285(onditional constructs which allo)329.49 398.4 R 2.785(wv) --.25 G(ariables)472.9 398.4 Q .12(or k)72 410.4 R .42 -.15(ey b)-.1 H .119(ind\ -ings to be assigned based on the application using readline, the terminal curr\ -ently being used, or).15 F .316(the editing mode.)72 422.4 R .317 -(Users can add program-speci\214c bindings to mak)5.317 F 2.817(et)-.1 G .317 -(heir li)352.808 422.4 R -.15(ve)-.25 G 2.817(se).15 G 2.817(asier: here) -396.922 422.4 R .317(are bindings to)2.817 F(edit the v)72 434.4 Q(alue of)-.25 -E F1 -.74(PA)2.5 G(TH)-.21 E F0(and double-quote the current or pre)2.5 E -(vious w)-.25 E(ord:)-.1 E/F3 10/Courier@0 SF 6(#M)97 452.4 S -(acros that are convenient for shell interaction)115 452.4 Q($if Bash)97 464.4 -Q 6(#e)97 476.4 S(dit the path)115 476.4 Q -("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 488.4 Q 6(#p)97 500.4 S -(repare to type a quoted word -- insert open and close double quotes)115 500.4 -Q 6(#a)97 512.4 S(nd move to just after the open quote)115 512.4 Q -("\\C-x\\"": "\\"\\"\\C-b")97 524.4 Q 6(#Q)97 536.4 S -(uote the current or previous word)115 536.4 Q("\\C-xq": "\\eb\\"\\ef\\"")97 -548.4 Q($endif)97 560.4 Q F0 .322(There is a readline command to re-read the \ -\214le, so users can edit the \214le, change some bindings, and be)72 582 R -(gin)-.15 E(to use them almost immediately)72 594 Q(.)-.65 E .851 -(Bash implements the)97 609.6 R F1(bind)3.351 E F0 -.2(bu)3.351 G .851 -(iltin for more dyamic control of readline than the startup \214le permits.).2 -F F1(Bind)72 621.6 Q F0 .167(is used in se)2.667 F -.15(ve)-.25 G .167(ral w) -.15 F 2.667(ays. In)-.1 F F2(list)2.667 E F0 .167 -(mode, it can display the current k)4.333 F .466 -.15(ey b)-.1 H .166 -(indings, list all the readline edit-).15 F .149(ing directi)72 633.6 R -.15 -(ve)-.25 G 2.649(sa).15 G -.25(va)132.798 633.6 S .149 -(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G -1.9 -.4 -(nv o)282.352 633.6 T .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65(nd).25 G -(irecti)345.3 633.6 Q -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)385.04 633.6 S .15 -(utput the current set of k)396.02 633.6 R -.15(ey)-.1 G .526(bindings in a fo\ -rmat that can be incorporated directly into an inputrc \214le.)72 645.6 R(In) -5.526 E F2(batc)3.026 E(h)-.15 E F0 .526(mode, it reads a series)4.692 F .71 -(of k)72 657.6 R 1.01 -.15(ey b)-.1 H .71 -(indings directly from a \214le and passes them to readline.).15 F .71 -(In its most common usage,)5.71 F F1(bind)3.21 E F0(tak)3.21 E .71(es a)-.1 F -.534(single string and passes it directly to readline, which interprets the li\ -ne as if it had just been read from the)72 669.6 R(inputrc \214le.)72 681.6 Q -(Both k)5 E .3 -.15(ey b)-.1 H(indings and v).15 E -(ariable assignments can appear in the string gi)-.25 E -.15(ve)-.25 G 2.5(nt) -.15 G(o)424.4 681.6 Q F1(bind)2.5 E F0(.)A .401(The readline library also pro) -97 697.2 R .402(vides an interf)-.15 F .402(ace for)-.1 F F2(wor)2.902 E 2.902 -(dc)-.37 G(ompletion)328.546 697.2 Q F0 5.402(.W)C .402(hen the)385.888 697.2 R -F2(completion)2.902 E F0(character)4.568 E 1.261(\(usually T)72 709.2 R 1.261 -(AB\) is typed, readline looks at the w)-.93 F 1.26 -(ord currently being entered and computes the set of \214le-)-.1 F .523 -(names of which the current w)72 721.2 R .523(ord is a v)-.1 F .523 -(alid pre\214x.)-.25 F .524 -(If there is only one possible completion, the rest of the)5.523 F EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-8-)279.67 48 S .358 -(characters are inserted directly)72 84 R 2.858(,o)-.65 G .358(therwise the co\ -mmon pre\214x of the set of \214lenames is added to the current)205.232 84 R --.1(wo)72 96 S 3.199(rd. A).1 F .699(second T)3.199 F .699(AB character entere\ -d immediately after a non-unique completion causes readline to list)-.93 F -1.814(the possible completions; there is an option to ha)72 108 R 2.113 -.15 -(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 G 1.813 -(eadline pro)436.517 108 R(vides)-.15 E .482 -(hooks so that applications can pro)72 120 R .482 -(vide speci\214c types of completion before the def)-.15 F .483 -(ault \214lename completion)-.1 F .132(is attempted.)72 132 R .132 -(This is quite \215e)5.132 F .132(xible, though it is not completely user)-.15 -F 2.632(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F -.37(complete \214lenames, command names \(including aliases, b)72 144 R .37 -(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37(ords, shell functions, and)-.1 -F -.15(exe)72 156 S .424(cutables found in the \214le system\), shell v).15 F -.424(ariables, usernames, and hostnames.)-.25 F .423 -(It uses a set of heuristics)5.424 F(that, while not perfect, is generally qui\ -te good at determining what type of completion to attempt.)72 168 Q/F1 10 -/Times-Bold@0 SF 2.5(4.3.4. History)72 192 R F0 .255 -(Access to the list of commands pre)97 207.6 R .255(viously entered \(the)-.25 -F/F2 10/Times-Italic@0 SF .255(command history)2.755 F F0 2.756(\)i)C 2.756(sp) -399.236 207.6 S(ro)410.882 207.6 Q .256(vided jointly by bash)-.15 F .095 -(and the readline library)72 219.6 R 5.094(.B)-.65 G .094(ash pro)178.928 219.6 -R .094(vides v)-.15 F .094(ariables \()-.25 F F1(HISTFILE)A F0(,)A F1(HISTSIZE) -2.594 E F0 2.594(,a)C(nd)382.068 219.6 Q F1(HISTCONTR)2.594 E(OL)-.3 E F0 2.594 -(\)a)C .094(nd the)479.186 219.6 R F1(history)72 231.6 Q F0(and)2.825 E F1(fc) -2.825 E F0 -.2(bu)2.825 G .325(iltins to manipulate the history list.).2 F .325 -(The v)5.325 F .325(alue of)-.25 F F1(HISTFILE)2.825 E F0 .326 -(specifes the \214le where bash)2.826 F .128(writes the command history on e)72 -243.6 R .128(xit and reads it on startup.)-.15 F F1(HISTSIZE)5.128 E F0 .128 -(is used to limit the number of com-)2.628 F .346(mands sa)72 255.6 R -.15(ve) --.2 G 2.846(di).15 G 2.846(nt)129.002 255.6 S .346(he history)139.628 255.6 R -(.)-.65 E F1(HISTCONTR)5.346 E(OL)-.3 E F0(pro)2.846 E .346 -(vides a crude form of control o)-.15 F -.15(ve)-.15 G 2.846(rw).15 G .346 -(hich commands are)425.548 255.6 R(sa)72 267.6 Q -.15(ve)-.2 G 2.905(do).15 G -2.905(nt)102.325 267.6 S .405(he history list: a v)113.01 267.6 R .405(alue of) --.25 F F2(ignor)2.905 E(espace)-.37 E F0 .405(means to not sa)4.571 F .705 -.15 -(ve c)-.2 H .405(ommands which be).15 F .405(gin with a space; a)-.15 F -.25 -(va)72 279.6 S .339(lue of).25 F F2(ignor)2.839 E(edups)-.37 E F0 .339 -(means to not sa)4.505 F .64 -.15(ve c)-.2 H .34 -(ommands identical to the last command sa).15 F -.15(ve)-.2 G(d.).15 E F1 -(HISTCONTR)5.34 E(OL)-.3 E F0 -.1(wa)72 291.6 S 3.15(sn).1 G(amed)95.6 291.6 Q -F1(history_contr)3.15 E(ol)-.18 E F0 .65(in earlier v)3.15 F .649 -(ersions of bash; the old name is still accepted for backw)-.15 F .649 -(ards com-)-.1 F(patibility)72 303.6 Q 5.723(.T)-.65 G(he)121.803 303.6 Q F1 -(history)3.223 E F0 .724(command can read or write \214les containing the hist\ -ory list and display the current)3.223 F .895(list contents.)72 315.6 R(The) -5.895 E F1(fc)3.395 E F0 -.2(bu)3.395 G .895 -(iltin, adopted from POSIX.2 and the K).2 F .894(orn Shell, allo)-.35 F .894 -(ws display and re-e)-.25 F -.15(xe)-.15 G(cution,).15 E .461 -(with optional editing, of commands from the history list.)72 327.6 R .462 -(The readline library of)5.462 F .462(fers a set of commands to)-.25 F .657(se\ -arch the history list for a portion of the current input line or a string type\ -d by the user)72 339.6 R 5.657(.F)-.55 G(inally)445.836 339.6 Q 3.157(,t)-.65 G -(he)476.403 339.6 Q F2(his-)3.157 E(tory)72 351.6 Q F0(library)4.196 E 2.53(,g) --.65 G .03(enerally incorporated directly into the readline library)128.346 -351.6 R 2.53(,i)-.65 G .03(mplements a f)350.636 351.6 R .031 -(acility for history recall,)-.1 F -.15(ex)72 363.6 S .594(pansion, and re-e) -.15 F -.15(xe)-.15 G .594(cution of pre).15 F .594(vious commands v)-.25 F .594 -(ery similar to csh \(`)-.15 F .593(`bang history')-.74 F .593 -(', so called because)-.74 F(the e)72 375.6 Q -(xclamation point introduces a history substitution\):)-.15 E/F3 10/Courier@0 -SF 6($e)97 393.6 S(cho a b c d e)115 393.6 Q 6(abcde)97 405.6 S 6($!)97 417.6 S -6(!fghi)115 417.6 S(echo a b c d e f g h i)97 429.6 Q 6(abcdefghi)97 441.6 S 6 -($!)97 453.6 S(-2)115 453.6 Q(echo a b c d e)97 465.6 Q 6(abcde)97 477.6 S 6 -($e)97 489.6 S(cho !-2:1-4)115 489.6 Q(echo a b c d)97 501.6 Q 6(abcd)97 513.6 -S F0 1.456(The command history is only sa)72 535.2 R -.15(ve)-.2 G 3.957(dw).15 -G 1.457(hen the shell is interacti)232.599 535.2 R -.15(ve)-.25 G 3.957(,s).15 -G 3.957(oi)352.804 535.2 S 3.957(ti)364.541 535.2 S 3.957(sn)374.058 535.2 S -1.457(ot a)386.905 535.2 R -.25(va)-.2 G 1.457(ilable for use by shell).25 F -(scripts.)72 547.2 Q F1 2.5(4.3.5. New)72 571.2 R(Shell V)2.5 E(ariables)-.92 E -F0 .701(There are a number of con)97 586.8 R -.15(ve)-.4 G .701(nience v).15 F -.701(ariables that bash interprets to mak)-.25 F 3.2(el)-.1 G .7(ife easier) -402.76 586.8 R 5.7(.T)-.55 G .7(hese include)453.59 586.8 R F1(FIGNORE)72 598.8 -Q F0 3.973(,w)C 1.473(hich is a set of \214lename suf)132.363 598.8 R<8c78>-.25 -E 1.474(es identifying \214les to e)-.15 F 1.474 -(xclude when completing \214lenames;)-.15 F F1(HOSTTYPE)72 610.8 Q F0 3.03(,w)C -.53(hich is automatically set to a string describing the type of hardw)139.21 -610.8 R .53(are on which bash is cur)-.1 F(-)-.2 E .76(rently e)72 622.8 R -.15 -(xe)-.15 G(cuting;).15 E F1(OSTYPE)3.26 E F0 3.26(,t)C 3.26(ow)191.76 622.8 S -.76(hich bash assigns a v)207.24 622.8 R .761(alue that identi\214es the v)-.25 -F .761(ersion of)-.15 F/F4 9/Times-Roman@0 SF(UNIX)3.261 E F0(it')3.261 E 3.261 -(sr)-.55 G(unning)476.22 622.8 Q 1.354 -(on \(great for putting architecture-speci\214c binary directories into the)72 -634.8 R F1 -.74(PA)3.854 G(TH)-.21 E F0 1.354(\); and)B F1(IGNOREEOF)3.854 E F0 -3.854(,w)C(hose)485.67 634.8 Q -.25(va)72 646.8 S .062 -(lue indicates the number of consecuti).25 F .362 -.15(ve E)-.25 H .062 -(OF characters that an interacti).15 F .362 -.15(ve s)-.25 H .062 -(hell will read before e).15 F .062(xiting \255)-.15 F .114(an easy w)72 658.8 -R .113(ay to k)-.1 F .113(eep yourself from being logged out accidentally)-.1 F -5.113(.T)-.65 G(he)344.285 658.8 Q F1(auto_r)2.613 E(esume)-.18 E F0 -.25(va) -2.613 G .113(riable alters the w).25 F(ay)-.1 E .409 -(the shell treats simple command names: if job control is acti)72 670.8 R -.15 -(ve)-.25 G 2.909(,a).15 G .409(nd this v)335.516 670.8 R .409 -(ariable is set, single-w)-.25 F .409(ord simple)-.1 F .17(commands without re\ -directions cause the shell to \214rst look for a suspended job with that name \ -before start-)72 682.8 R(ing a ne)72 694.8 Q 2.5(wp)-.25 G(rocess.)118.13 694.8 -Q EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-9-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5 -(4.3.6. Brace)72 84 R(Expansion)2.5 E F0 .653(Since sh of)97 99.6 R .653 -(fers no con)-.25 F -.15(ve)-.4 G .653(nient w).15 F .653 -(ay to generate arbitrary strings that share a common pre\214x or suf)-.1 F -<8c78>-.25 E 1.893(\(pathname e)72 111.6 R 1.893 -(xpansion requires that the \214lenames e)-.15 F 1.892(xist\), bash implements) --.15 F/F2 10/Times-Italic@0 SF(br)4.392 E 1.892(ace e)-.15 F(xpansion)-.2 E F0 -4.392(,ac)C(apability)469 111.6 Q(pick)72 123.6 Q .496(ed up from csh.)-.1 F -.496(Brace e)5.496 F .496(xpansion is similar to pathname e)-.15 F .496 -(xpansion, b)-.15 F .497(ut the strings generated need not)-.2 F 1.107 -(correspond to e)72 135.6 R 1.107(xisting \214les.)-.15 F 3.607(Ab)6.107 G -1.107(race e)207.655 135.6 R 1.107(xpression consists of an optional)-.15 F F2 -(pr)3.606 E(eamble)-.37 E F0 3.606(,f)1.666 G(ollo)419.286 135.6 Q 1.106 -(wed by a pair of)-.25 F 2.809 -(braces enclosing a series of comma-separated strings, and an optional)72 147.6 -R F2(postamble)5.31 E F0 7.81(.T)1.666 G 2.81(he preamble is)440.06 147.6 R(pr\ -epended to each string within the braces, and the postamble is then appended t\ -o each resulting string:)72 159.6 Q/F3 10/Courier@0 SF 6($e)97 177.6 S -(cho a{d,c,b}e)115 177.6 Q(ade ace abe)97 189.6 Q F1 2.5(4.3.7. Pr)72 219.6 R -(ompt Customization)-.18 E F0 .077(One of the more popular interacti)97 235.2 R -.376 -.15(ve f)-.25 H .076(eatures that bash pro).15 F .076 -(vides is the ability to customize the prompt.)-.15 F(Both)72 247.2 Q F1(PS1) -3.305 E F0(and)3.305 E F1(PS2,)3.305 E F0 .805 -(the primary and secondary prompts, are e)3.305 F .805 -(xpanded before being displayed.)-.15 F -.15(Pa)5.805 G(rameter).15 E .324 -(and v)72 259.2 R .324(ariable e)-.25 F .324 -(xpansion is performed when the prompt string is e)-.15 F .323 -(xpanded, so the v)-.15 F .323(alue of an)-.25 F 2.823(ys)-.15 G .323(hell v) -454.217 259.2 R(ariable)-.25 E .728(can be put into the prompt \(e.g.,)72 271.2 -R F1($SHL)3.228 E(VL)-.92 E F0 3.228(,w)C .728(hich indicates ho)258.564 271.2 -R 3.228(wd)-.25 G .729(eeply the current shell is nested\).)342.988 271.2 R -(Bash)5.729 E 1.895 -(specially interprets characters in the prompt string preceded by a backslash.) -72 283.2 R 1.895(Some of these backslash)6.895 F .874 -(escapes are replaced with the current time, the date, the current w)72 295.2 R -.874(orking directory)-.1 F 3.374(,t)-.65 G .874(he username, and the)416.958 -295.2 R .781(command number or history number of the command being entered.)72 -307.2 R .78(There is e)5.781 F -.15(ve)-.25 G 3.28(nab).15 G .78 -(ackslash escape to)429.13 307.2 R .007 -(cause the shell to change its prompt when running as root after an)72 319.2 R -F2(su)2.507 E F0 5.007(.B)C .008(efore printing each primary prompt,)360.388 -319.2 R .27(bash e)72 331.2 R .27(xpands the v)-.15 F(ariable)-.25 E F1(PR)2.77 -E(OMPT_COMMAND)-.3 E F0 .269(and, if it has a v)2.77 F .269(alue, e)-.25 F -.15 -(xe)-.15 G .269(cutes the e).15 F .269(xpanded v)-.15 F .269(alue as a)-.25 F -.04(command, allo)72 343.2 R .041(wing additional prompt customization.)-.25 F --.15(Fo)5.041 G 2.541(re).15 G .041 -(xample, this assignment causes the current user)311.964 343.2 R(,)-.4 E .99 -(the current host, the time, the last component of the current w)72 355.2 R -.989(orking directory)-.1 F 3.489(,t)-.65 G .989(he le)402.954 355.2 R -.15(ve) --.25 G 3.489(lo).15 G 3.489(fs)443.412 355.2 S .989(hell nesting,)454.121 355.2 -R(and the history number of the current command to be embedded into the primar\ -y prompt:)72 367.2 Q F3 6($P)97 385.2 S -(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')115 385.2 Q -(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 397.2 Q -(chet@odin [21:03:54] src\(2:637\)$)97 409.2 Q F0 .619 -(The string being assigned is surrounded by single quotes so that if it is e)72 -430.8 R(xported,)-.15 E F1(SHL)3.119 E(VL)-.92 E F0 .619(will be updated)3.119 -F(by a child shell:)72 442.8 Q F3 -(chet@odin [21:13:35] src\(2:638\)$ export PS1)97 460.8 Q -(chet@odin [21:17:40] src\(2:639\)$ bash)97 472.8 Q -(chet@odin [21:17:46] src\(3:696\)$)97 484.8 Q F0(The)72 506.4 Q F1(\\$)2.5 E -F0(escape is displayed as `)2.5 E(`)-.74 E F1($)A F0 1.48 -.74('' w)D -(hen running as a normal user).74 E 2.5(,b)-.4 G(ut as `)342.08 506.4 Q(`)-.74 -E F1(#)A F0 1.48 -.74('' w)D(hen running as root.).74 E F1 2.5(4.3.8. POSIX)72 -530.4 R(Mode)2.5 E F0 .46(Although bash is intended to be POSIX.2 compliant, t\ -here are areas in which the def)97 546 R .46(ault beha)-.1 F .46(vior is)-.2 F -1.168(not compatible with the standard.)72 558 R -.15(Fo)6.169 G 3.669(ru).15 G -1.169(sers who wish to operate in a strict POSIX.2 en)238.85 558 R 1.169 -(vironment, bash)-.4 F .61(implements a)72 570 R F2 .61(POSIX mode)3.11 F F0 -5.61(.W)C .61(hen this mode is acti)199.42 570 R -.15(ve)-.25 G 3.109(,b).15 G -.609(ash modi\214es its def)303.727 570 R .609(ault operation where it dif)-.1 -F(fers)-.25 E .066(from POSIX.2 to match the standard.)72 582 R .067 -(POSIX mode is entered when bash is started with the)5.066 F F1 .067(-o posix) -2.567 F F0(option)2.567 E .382(or when)72 594 R F1 .382(set -o posix)2.882 F F0 -.381(is e)2.881 F -.15(xe)-.15 G 2.881(cuted. F).15 F .381 -(or compatibility with other GNU softw)-.15 F .381 -(are that attempts to be POSIX.2)-.1 F 5.752 -(compliant, bash also enters POSIX mode if either of the v)72 606 R(ariables) --.25 E F1(POSIX_PED)8.253 E(ANTIC)-.35 E F0(or)8.253 E F1(POSIXL)72 618 Q -(Y_CORRECT)-.92 E F0 1.179(is set when bash is started or assigned a v)3.679 F -1.178(alue during e)-.25 F -.15(xe)-.15 G 3.678(cution. When).15 F 1.178 -(bash is)3.678 F .218(started in POSIX mode, for e)72 630 R .218(xample, the) --.15 F F1(kill)2.718 E F0 -.2(bu)2.718 G(iltin').2 E(s)-.55 E F1<ad6c>2.718 E -F0 .218(option beha)2.718 F -.15(ve)-.2 G 2.718(sd).15 G(if)370.166 630 Q .219 -(ferently: it lists the names of all)-.25 F 1.084(signals on a single line sep\ -arated by spaces, rather than listing the signal names and their corresponding) -72 642 R(numbers.)72 654 Q .865(Some of the def)97 669.6 R .865(ault bash beha) --.1 F .865(vior dif)-.2 F .865 -(fers from other shells as a result of the POSIX standard.)-.25 F -.15(Fo)5.866 -G(r).15 E 1.16(instance, bash includes the)72 681.6 R F1(!)3.66 E F0(reserv) -6.16 E 1.16(ed w)-.15 F 1.16(ord to ne)-.1 F -.05(ga)-.15 G 1.16 -(te the return status of a pipeline because it has been).05 F -(de\214ned by POSIX.2.)72 693.6 Q -(Neither sh nor ksh has implemented that feature.)5 E EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(0-)288 48 S/F1 10/Times-Bold@0 -SF 2.5(4.4. F)72 84 R(eatur)-.25 E(es Unique to ksh)-.18 E F0 .177 -(Ksh includes a number of features not in the currently-released v)97 99.6 R -.178(ersion of bash, v)-.15 F .178(ersion 1.14.)-.15 F(Unless)5.178 E .822 -(noted, none of these features is in the POSIX.2 standard.)72 111.6 R .821 -(Where appropriate the equi)5.821 F -.25(va)-.25 G .821(lent bash features).25 -F(are noted.)72 123.6 Q F1 2.5(4.4.1. The)72 147.6 R(ksh Language)2.5 E F0 -2.955(An)97 163.2 S .955 -.25(ew c)112.175 163.2 T .455(ompound command folds) -.25 F F1(test)2.955 E F0 .456(into the ksh language, delimited by the reserv) -2.955 F .456(ed w)-.15 F(ords)-.1 E F1([[)2.956 E F0(and)2.956 E F1(]])72 175.2 -Q F0 5.726(.T)C .726(he syntax is identical to)92.996 175.2 R F1(test)3.225 E -F0 .725(with a fe)3.225 F 3.225(wc)-.25 G .725 -(hanges: for instance, instead of)262.855 175.2 R F1<ad61>3.225 E F0(and)3.225 -E F1<ad6f>3.225 E F0(,)A F1(&&)3.225 E F0(and)3.225 E/F2 10/Symbol SF<efef> -3.225 E F0(are)3.225 E 3.32(used. The)72 187.2 R -.1(wo)3.32 G .82(rds between) -.1 F F1([[)3.32 E F0(and)3.32 E F1(]])3.32 E F0 .82(are not processed for w) -3.32 F .82(ord splitting or \214lename generation.)-.1 F .82(The ne)5.82 F(w) --.25 E .926 -(command does pattern matching as well as string comparison, a la the)72 199.2 -R F1(case)3.425 E F0 3.425(command. This)3.425 F(ne)3.425 E 3.425(wc)-.25 G -(ontrol)480.11 199.2 Q .165(structure does ha)72 211.2 R .465 -.15(ve t)-.2 H -.165(he adv).15 F .166(antage of reducing common ar)-.25 F .166 -(gument problems encountered using test \(e.g.)-.18 F F1(test)2.666 E -("$string")72 223.2 Q F0 2.928(,w)C(here)125.748 223.2 Q F1($string)2.928 E F0 --.15(ex)2.928 G .428(pands to).15 F F1<ad66>2.928 E F0 .428(\), b)B .428 -(ut at the cost of bloating the language.)-.2 F .427(The POSIX.2 test algo-) -5.427 F 2.752(rithm that bash uses, along with some programmer care, alle)72 -235.2 R 2.752(viates those problems in a backw)-.25 F(ards-)-.1 E .854 -(compatible w)72 247.2 R .853(ay with no additions to the language.)-.1 F .853 -(The one capability of)5.853 F F1 .853([[ ]])3.353 F F0 .853(not a)3.353 F -.25 -(va)-.2 G .853(ilable in bash is its).25 F(ability to test whether an indi)72 -259.2 Q(vidual)-.25 E F1(set \255o)2.5 E F0(option is turned on or of)2.5 E(f.) --.25 E .339(Other parts of the ksh language are not common to bash.)97 274.8 R -(The)5.34 E F1(\(\(...\)\))2.84 E F0(operator)5.34 E 2.84(,e)-.4 G(qui)419.33 -274.8 Q -.25(va)-.25 G .34(lent to).25 F F1 .34(let "...")2.84 F F0(,)A .197 -(is unique to ksh, as are the concept of co-processes and the)72 286.8 R F1 -(time)2.697 E F0 -.1(ke)2.696 G(yw)-.05 E .196 -(ord to time commands and pipelines.)-.1 F F1 2.5(4.4.2. Functions)72 310.8 R -(and Aliases)2.5 E F0 1.022(The K)97 326.4 R 1.022(orn shell has)-.35 F/F3 10 -/Times-Italic@0 SF(autoloaded)3.522 E F0 3.522(functions. A)3.522 F 1.022 -(function mark)3.522 F 1.022(ed as)-.1 F F3(autoload)3.522 E F0 1.022 -(is not de\214ned until it is)5.188 F 1.042(\214rst e)72 338.4 R -.15(xe)-.15 G -3.542(cuted. When).15 F 1.042(such a function is e)3.542 F -.15(xe)-.15 G 1.042 -(cuted, a search is made through the directories in).15 F F1(FP)3.541 E -.95 -(AT)-.74 G(H).95 E F0(\(a)3.541 E .27 -(colon-separated list of directories similar to)72 350.4 R F1 -.74(PA)2.77 G -(TH)-.21 E F0 2.77(\)f)C .27(or a \214le with the same name as the function.) -285.78 350.4 R .27(That \214le)5.27 F .548(is then read in as with the)72 362.4 -R F1(.)3.881 E F0 .547(command; presumably the function is de\214ned therein.) -3.047 F .547(There is a pair of shell)5.547 F .886 -(functions included in the bash distrib)72 374.4 R .886(ution \()-.2 F F3 -.2 -(ex)C(amples/functions/autoload).2 E F0 5.886(\)t)C .886(hat pro)378.35 374.4 R -.886(vide much of this func-)-.15 F -(tionality without changing the shell itself.)72 386.4 Q .116 -(Ksh functions are scoped in such a w)97 402 R .116(ay that the en)-.1 F .116 -(vironment in which the)-.4 F 2.616(ya)-.15 G .116(re e)405.144 402 R -.15(xe) --.15 G .115(cuted is closer to a).15 F .827(shell script en)72 414 R 3.327 -(vironment. Bash)-.4 F .827(uses the POSIX.2 scoping rules, which mak)3.327 F -3.327(et)-.1 G .827(he function e)392.517 414 R -.15(xe)-.15 G .828(cution en) -.15 F(vi-)-.4 E 1.2(ronment an e)72 426 R 1.2(xact cop)-.15 F 3.7(yo)-.1 G 3.7 -(ft)174.86 426 S 1.199(he shell en)184.67 426 R 1.199 -(vironment with the replacement of the shell')-.4 F 3.699(sp)-.55 G 1.199 -(ositional paramters)426.421 426 R(with the function ar)72 438 Q 2.5 -(guments. K)-.18 F -(orn shell functions do not share options or traps with the in)-.35 E -.2(vo) --.4 G(king shell.).2 E .451(Ksh has)97 453.6 R F3(tr)2.951 E(ac)-.15 E -.1(ke) --.2 G(d).1 E F0 .452(aliases, which alias a command name to its full pathname.) -2.952 F .452(Bash has true command)5.452 F(hashing.)72 465.6 Q F1 2.5 -(4.4.3. Arrays)72 489.6 R F0 .246 -(Arrays are an aspect of ksh that has no real bash equi)97 505.2 R -.25(va)-.25 -G 2.746(lent. The).25 F 2.746(ya)-.15 G .246(re easy to create and manipulate:) -371.42 505.2 R 1.637 -(an array is created automatically by using subscript assignment \()72 517.2 R -F1(name)A F0([)A F3(inde)A(x)-.2 E F0(]=)A F1 -.1(va)C(lue).1 E F0 1.637 -(\), and an)B 4.137(yv)-.15 G(ariable)476.79 517.2 Q 1.967 -(may be referred to as an array)72 529.2 R 6.967(.K)-.65 G 1.967(sh arrays, ho) -219.229 529.2 R(we)-.25 E -.15(ve)-.25 G 2.767 -.4(r, h).15 H -2.25 -.2(av e).4 -H(se)4.667 E -.15(ve)-.25 G 1.967(ral anno).15 F 1.967(ying limitations: the) --.1 F 4.466(ym)-.15 G 1.966(ay be)480.654 529.2 R(inde)72 541.2 Q -.15(xe)-.15 -G 3.498(do).15 G .998(nly up to 512 or 1024 elements, depending on ho)111.858 -541.2 R 3.498(wt)-.25 G .999(he shell is compiled, and there is only the) -330.188 541.2 R(clumsy)72 553.2 Q F1 .223(set -A)2.723 F F0 .223 -(to assign a list of v)2.723 F .223(alues sequentially)-.25 F 5.223(.D)-.65 G -.223(espite these limits, arrays are useful, if underutilized)293.31 553.2 R -(by shell programmers.)72 565.2 Q F1 2.5(4.4.4. Builtin)72 589.2 R(Commands)2.5 -E F0 .112(Some of the b)97 604.8 R .112(uiltin commands ha)-.2 F .412 -.15 -(ve b)-.2 H .112(een e).15 F .112(xtended or are ne)-.15 F 2.612(wi)-.25 G -2.613(nk)351.402 604.8 S 2.613(sh. The)364.015 604.8 R F1(print)2.613 E F0 -.2 -(bu)2.613 G .113(iltin w).2 F .113(as included)-.1 F .242(to w)72 616.8 R .242 -(ork around the incompatibilities and limitations of)-.1 F F1(echo)2.741 E F0 -5.241(.T)C(he)328.234 616.8 Q F1(whence)2.741 E F0 .241(command tells what w) -2.741 F .241(ould hap-)-.1 F .418(pen if each ar)72 628.8 R .418 -(gument were typed as a command name.)-.18 F(The)5.418 E F1(cd)2.919 E F0 -.2 -(bu)2.919 G .419(iltin has been e).2 F .419(xtended to tak)-.15 F 2.919(eu)-.1 -G 2.919(pt)470.482 628.8 S 2.919(ot)481.181 628.8 S -.1(wo)491.88 628.8 S(ar)72 -640.8 Q 1.425(guments: if tw)-.18 F 3.925(oa)-.1 G -.18(rg)153.485 640.8 S -1.424(uments are supplied, the second is substituted for the \214rst in the cu\ -rrent directory).18 F 2.294 -(name and the shell changes to the resultant directory name.)72 652.8 R 2.295 -(The ksh)7.294 F F1(trap)4.795 E F0 -.2(bu)4.795 G 2.295(iltin accepts).2 F F1 -(ERR)4.795 E F0(and)4.795 E F1(DEB)72 664.8 Q(UG)-.1 E F0 .15(as trap names.) -2.65 F(The)5.15 E F1(ERR)2.65 E F0 .15(trap is e)2.65 F -.15(xe)-.15 G .15 -(cuted when a command f).15 F(ails;)-.1 E F1(DEB)2.65 E(UG)-.1 E F0 .15(is e) -2.65 F -.15(xe)-.15 G .15(cuted after e).15 F -.15(ve)-.25 G(ry).15 E -(simple command.)72 676.8 Q .05(The bash distrib)97 692.4 R .05 -(ution includes shell functions that implement)-.2 F F1(print)2.55 E F0(and) -2.55 E F1(whence)2.55 E F0 .05(and the e)2.55 F .05(xtensions to)-.15 F F1(cd) -72 704.4 Q F0(.)A EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(1-)288 48 S/F1 10/Times-Bold@0 -SF 2.5(4.4.5. Expansion)72 84 R F0 .282(The ksh \214lename generation \()97 -99.6 R/F2 10/Times-Italic@0 SF(globbing)A F0 2.782(\)f)C .282(acilities ha) -262.45 99.6 R .581 -.15(ve b)-.2 H .281(een e).15 F .281(xtended be)-.15 F .281 -(yond their bash and sh coun-)-.15 F 3.68(terparts. In)72 111.6 R 1.181 -(this area, ksh can be thought of as)3.681 F F2 -.4(eg)3.681 G -.37(re).4 G(p) -.37 E F0 1.181(to the bash)5.347 F F2(gr)3.681 E(ep)-.37 E F0 6.181(.K)1.666 G -1.181(sh globbing of)382.406 111.6 R 1.181(fers things lik)-.25 F(e)-.1 E 1.018 -(alternation, the ability to match zero or more instances of a pattern, and th\ -e ability to match e)72 123.6 R 1.018(xactly one)-.15 F(occurrence of an)72 -135.6 Q 2.5(yo)-.15 G 2.5(fal)150.98 135.6 S(ist of patterns.)166.53 135.6 Q F1 -2.5(4.4.6. Startup)72 159.6 R(Files)2.5 E F0 .977(Ksh and bash e)97 175.2 R --.15(xe)-.15 G .977(cute startup \214les dif).15 F(ferently)-.25 E 5.977(.K) --.65 G .977(sh e)297.879 175.2 R(xpands)-.15 E F1(ENV)3.478 E F0 .978 -(and sources the \214le it names for)3.478 F -2.15 -.25(ev e)72 187.2 T 1.85 -(ry shell.).25 F 1.85(Bash sources)6.85 F F1($ENV)4.35 E F0 1.85 -(only in non-interacti)4.35 F 2.15 -.15(ve s)-.25 H 1.85(hells; interacti).15 F -2.15 -.15(ve s)-.25 H 1.85(hells source \214x).15 F 1.85(ed \214les, as)-.15 F --.15(ex)72 199.2 S 1.285(plained in the pre).15 F 1.285(vious section.)-.25 F -1.285(The POSIX standard has speci\214ed the ksh beha)6.285 F(vior)-.2 E 3.785 -(,s)-.4 G 3.785(ob)441.545 199.2 S 1.285(ash acts the)455.33 199.2 R -(same as ksh if started with the)72 211.2 Q F1(\255posix)2.5 E F0(or)2.5 E F1 -(\255o posix)2.5 E F0(options.)2.5 E F1 2.5(4.4.7. History)72 235.2 R F0 -(Finally)97 250.8 Q 3.372(,t)-.65 G .872(he ksh history implementation dif) -133.342 250.8 R .871(fers slightly from bash.)-.25 F .871 -(Each instance of bash k)5.871 F .871(eeps the)-.1 F .633 -(history list in memory and of)72 262.8 R .633(fers options to the)-.25 F F1 -(history)3.133 E F0 -.2(bu)3.133 G .634 -(iltin to write the list to or read it from a named).2 F 3.216(\214le. Ksh)72 -274.8 R -.1(ke)3.216 G .716 -(eps the history in a \214le, which it accesses each time a command is sa).1 F --.15(ve)-.2 G 3.215(dt).15 G 3.215(oo)426.445 274.8 S 3.215(rr)439.66 274.8 S -(etrie)449.535 274.8 Q -.15(ve)-.25 G 3.215(df).15 G(rom)487.89 274.8 Q .338 -(the history)72 286.8 R 5.338(.K)-.65 G .338 -(sh history \214les may be shared among dif)129.246 286.8 R .338 -(ferent concurrent instances of ksh, which could be a)-.25 F -(bene\214t to the user)72 298.8 Q(.)-.55 E F1 2.5(5. F)72 322.8 R(eatur)-.25 E -(es in Bash-2.0)-.18 E F0 .657(The ne)97 338.4 R .657 -(xt release of bash, 2.0, will be a major o)-.15 F -.15(ve)-.15 G 3.157 -(rhaul. It).15 F .656(will include man)3.157 F 3.156(yn)-.15 G 1.156 -.25(ew f) -419.532 338.4 T .656(eatures, for both).25 F .705(programming and interacti)72 -350.4 R 1.005 -.15(ve u)-.25 H 3.205(se. Redundant).15 F -.15(ex)3.205 G .705 -(isting functions will be remo).15 F -.15(ve)-.15 G 3.206(d. There).15 F .706 -(are se)3.206 F -.15(ve)-.25 G .706(ral cases).15 F 1.34(where bash treats a v) -72 362.4 R 1.34(ariable specially to enable functionality a)-.25 F -.25(va)-.2 -G 1.34(ilable another w).25 F 1.34(ay \()-.1 F F1($nolinks)A F0(vs.)3.84 E F1 -1.34(set -o)3.84 F(ph)72 374.4 Q(ysical)-.15 E F0 2.5(,f)C(or e)115.19 374.4 Q -(xample\); the special treatment of the v)-.15 E(ariable name will be remo)-.25 -E -.15(ve)-.15 G(d.).15 E F1 2.5(5.1. Arrays)72 398.4 R F0 .546(Bash-2.0 will \ -include arrays which are a superset of those in ksh, with the size limitations\ - remo)97 414 R -.15(ve)-.15 G(d.).15 E(The)72 426 Q F1(declar)3.086 E(e)-.18 E -F0(,)A F1 -.18(re)3.086 G(adonly).18 E F0 3.086(,a)C(nd)174.768 426 Q F1 -(export)3.086 E F0 -.2(bu)3.086 G .586 -(iltins will accept options to specify arrays, and the).2 F F1 -.18(re)3.085 G -(ad).18 E F0 -.2(bu)3.085 G .585(iltin will).2 F(ha)72 438 Q .81 -.15(ve a)-.2 -H 3.01(no).15 G .51(ption to read a list of w)110.99 438 R .51 -(ords and assign them directly to an array)-.1 F 5.51(.T)-.65 G .51 -(here will also be a ne)386.23 438 R 3.01(wa)-.25 G(rray)487.9 438 Q F2 .262 -(compound assignment)72 450 R F0 .262(syntax a)2.762 F -.25(va)-.2 G .262 -(ilable for assignment statements and the).25 F F1(declar)2.761 E(e)-.18 E F0 --.2(bu)2.761 G 2.761(iltin. This).2 F(ne)2.761 E 2.761(ws)-.25 G(yntax)481.78 -450 Q .441(has the form)72 462 R F2(name)2.941 E F0(=\()A F2(value1)A F0(...) -2.941 E F2(valueN)2.941 E F0 .441(\), where each)B F2(value)2.942 E F0 .442 -(has the form [)4.608 F F2(subscript)A F0(]=)A F2(string)A F0 5.442(.O)C .442 -(nly the)449.776 462 R F2(string)2.942 E F0 1.395(is required.)72 474 R 1.395 -(If the optional brack)6.395 F 1.395(ets and)-.1 F F2(subscript)3.894 E F0 -1.394(are included, that inde)3.894 F 3.894(xi)-.15 G 3.894(sa)388.714 474 S -1.394(ssigned to, otherwise the)400.938 474 R(inde)72 486 Q 3.656(xo)-.15 G -3.656(ft)102.726 486 S 1.156(he element assigned is the last inde)112.492 486 R -3.657(xa)-.15 G 1.157(ssigned to by the statement plus one.)272.917 486 R(Inde) -6.157 E 1.157(xing starts at)-.15 F 2.73(zero. The)72 498 R .23 -(same syntax is accepted by)2.73 F F1(declar)2.73 E(e)-.18 E F0 5.229(.I)C(ndi) -269.159 498 Q .229(vidual array elements may be assigned to using the ksh)-.25 -F F2(name)72 510 Q F0([)A F2(subscript)A F0(]=)A F2(value)A F0(.)A F1 2.5 -(5.2. Dynamic)72 534 R(Loading)2.5 E F0 .348(On systems that support the)97 -549.6 R F2(dlopen)2.848 E F0 .349(\(3\) library function, bash-2.0 will allo)B -2.849(wn)-.25 G .849 -.25(ew b)407.504 549.6 T .349(uiltins to be loaded).05 F -.049(into a running shell from a shared object \214le.)72 561.6 R .049(The ne) -5.049 F 2.549(wb)-.25 G .049(uiltins will ha)298.999 561.6 R .348 -.15(ve a)-.2 -H .048(ccess to the rest of the shell f).15 F(acil-)-.1 E .649(ities, b)72 -573.6 R .649(ut programmers will be subject to a fe)-.2 F 3.149(ws)-.25 G .649 -(tructural rules.)269.591 573.6 R .65(This will be pro)5.65 F .65 -(vided via a ne)-.15 F 3.15(wo)-.25 G .65(ption to)472.51 573.6 R F1(enable)72 -585.6 Q F0(.)A F1 2.5(5.3. Builtins)72 609.6 R F0 .889(Some of the e)97 625.2 R -.889(xisting b)-.15 F .889(uiltins will change in bash-2.0.)-.2 F .888(As pre) -5.888 F .888(viously noted,)-.25 F F1(declar)3.388 E(e)-.18 E F0(,)A F1(export) -3.388 E F0(,)A F1 -.18(re)3.388 G(ad-).18 E(only)72 637.2 Q F0 2.873(,a)C(nd) -100.153 637.2 Q F1 -.18(re)2.873 G(ad).18 E F0 .373(will accept ne)2.873 F -2.873(wo)-.25 G .374(ptions to specify arrays.)206.288 637.2 R(The)5.374 E F1 -(jobs)2.874 E F0 -.2(bu)2.874 G .374(iltin will be able to list only stopped).2 -F .323(or running jobs.)72 649.2 R(The)5.322 E F1(enable)2.822 E F0 .322 -(command will tak)2.822 F 2.822(ean)-.1 G -.25(ew)282.84 649.2 S F1<ad73>3.072 -E F0 .322(option to restrict its actions to the POSIX.2)2.822 F F2(spe-)2.822 E -(cial)72 661.2 Q F0 -.2(bu)3.14 G(iltins.).2 E F1(Kill)5.64 E F0 .64 -(will be able to list signal numbers corresponding to indi)3.14 F .64 -(vidual signal names.)-.25 F .64(The read-)5.64 F .703(line library interf)72 -673.2 R(ace,)-.1 E F1(bind)3.203 E F0 3.203(,w)C .703(ill ha)193.032 673.2 R -1.003 -.15(ve a)-.2 H 3.203(no).15 G .703(ption to remo)243.951 673.2 R 1.003 --.15(ve t)-.15 H .703(he binding for an).15 F 3.203(yk)-.15 G 1.002 -.15(ey s) -398.032 673.2 T .702(equence \(which is not).15 F -(the same as binding it to self-insert\).)72 685.2 Q .494(There will be tw)97 -700.8 R 2.994(on)-.1 G .994 -.25(ew b)177.196 700.8 T .495 -(uiltin commands in bash-2.0.).05 F(The)5.495 E F1(diso)2.995 E(wn)-.1 E F0 -.495(command will remo)2.995 F .795 -.15(ve j)-.15 H .495(obs from).15 F(bash') -72 712.8 Q 3.445(si)-.55 G .945(nternal jobs table when job control is acti) -103.225 712.8 R -.15(ve)-.25 G 5.945(.A).15 G(diso)303.25 712.8 Q .944 -(wned job will not be listed by the jobs com-)-.25 F .666(mand, nor will its e) -72 724.8 R .666(xit status be reported.)-.15 F(Diso)5.667 E .667 -(wned jobs will not be sent a)-.25 F F1(SIGHUP)3.167 E F0 .667 -(when an interacti)3.167 F -.15(ve)-.25 G EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(2-)288 48 S .688(shell e)72 84 R -3.187(xits. Most)-.15 F .687(of the shell')3.187 F 3.187(so)-.55 G .687 -(ptional or)205.423 84 R/F1 10/Times-Italic@0 SF(to)3.187 E -.1(gg)-.1 G(led).1 -E F0 .687(functionality will be folded into the ne)3.187 F(w)-.25 E/F2 10 -/Times-Bold@0 SF(shopt)3.187 E F0 -.2(bu)3.187 G(iltin.).2 E(Man)72 96 Q 3.714 -(yo)-.15 G 3.714(ft)103.894 96 S 1.214(he v)113.718 96 R 1.214 -(ariables which alter the shell')-.25 F 3.714(sb)-.55 G(eha)266.282 96 Q 1.214 -(vior when set \(re)-.2 F -.05(ga)-.15 G 1.214(rdless of their v).05 F 1.215 -(alue\) will be made)-.25 F 6(options settable with)72 108 R F2(shopt)8.5 E F0 -11(.E)C 6(xamples of such v)218.23 108 R 6(ariables include)-.25 F F2(allo)8.5 -E(w_null_glob_expansion)-.1 E F0(,)A F2(glob_dot_\214lenames)72 120 Q F0 2.5 -(,a)C(nd)163.67 120 Q F2(MAIL_W)2.5 E(ARNING)-1.2 E F0(.)A F2 2.5(5.4. V)72 144 -R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .047 -(Bash-2.0 will implement se)97 159.6 R -.15(ve)-.25 G .048(ral ne).15 F 2.548 -(wv)-.25 G .048(ariable e)252.988 159.6 R 2.548(xpansions. These)-.15 F .048 -(will answer se)2.548 F -.15(ve)-.25 G .048(ral of the most per).15 F(-)-.2 E -.213(sistant requests for ne)72 171.6 R 2.713(wf)-.25 G 2.713(eatures. It) -172.582 171.6 R .213(will be possible to `)2.713 F .212(`indirectly reference') --.74 F 2.712('av)-.74 G .212(ariable with an e)398.534 171.6 R(xpansion,)-.15 E -(lik)72 183.6 Q 3.01(eu)-.1 G(sing)94.91 183.6 Q/F3 10/Courier@0 SF .51 -(eval \\$${name})3.01 F F0 .51(to reference a v)3.01 F .51(ariable named by) --.25 F F3(${name})3.01 E F0 5.51(.E)C .51(xpansions will be a)394.32 183.6 R --.25(va)-.2 G(ilable).25 E .462(to retrie)72 195.6 R .762 -.15(ve s)-.25 H .462 -(ubstrings of v).15 F .461(ariables in an)-.25 F F1(awk)2.961 E F0(-lik)A 2.961 -(em)-.1 G .461(anner: starting at a speci\214c inde)277.692 195.6 R .461 -(x, retrie)-.15 F .461(ving some num-)-.25 F .941 -(ber of characters or the rest of the string.)72 207.6 R .941 -(It will be possible to retrie)5.941 F 1.241 -.15(ve s)-.25 H .941 -(equences of array elements lik).15 F(e)-.1 E .354(this, too.)72 219.6 R .354 -(It w)5.354 F .354(ould be nice to ha)-.1 F .654 -.15(ve a w)-.2 H .354 -(ay to replace portions of a v).05 F .353 -(ariable matching a pattern the same w)-.25 F(ay)-.1 E(leading or trailing sub\ -strings are presently stripped; that capability may be a)72 231.6 Q -.25(va)-.2 -G(ilable.).25 E .453(Another ne)97 247.2 R 2.953(we)-.25 G .453 -(xpansion will pro)156.376 247.2 R .453(vide a w)-.15 F .454 -(ay to create strings containing arbitrary characters, which is)-.1 F(incon)72 -259.2 Q -.15(ve)-.4 G 1.636(nient in the current v).15 F 4.136(ersion. W)-.15 F -1.635(ords of the form $')-.8 F F1(string)A F0 4.135('w)C 1.635(ill e)355.145 -259.2 R 1.635(xpand to)-.15 F F1(string)4.135 E F0 1.635(with backslash-)4.135 -F 1.231(escaped characters in)72 271.2 R F1(string)3.731 E F0 1.231 -(replaced as speci\214ed by the ANSI C standard.)3.731 F 1.232 -(As with other single-quoted)6.232 F -(shell strings, the only character that may not appear in)72 283.2 Q F1(string) -2.5 E F0(is a single quote.)2.5 E 1.436(The shell v)97 298.8 R 1.436 -(ariables will change also.)-.25 F 3.936(An)6.436 G 1.936 -.25(ew va)272.052 -298.8 T(riable).25 E F2(HISTIGNORE)3.936 E F0 1.435(will supersede)3.936 F F2 -(HISTCON-)3.935 E(TR)72 310.8 Q(OL)-.3 E F0(.)A F2(HISTIGNORE)5.327 E F0 .327 -(is the history analogy of)2.827 F F2(FIGNORE)2.828 E F0 2.828(:ac)C .328 -(olon-separated list of patterns specifying)339.938 310.8 R 1.082 -(commands to omit from the history list.)72 322.8 R 1.081 -(The special pattern '&' will match the pre)6.081 F 1.081 -(vious history line, to)-.25 F(pro)72 334.8 Q 1.568(vide the)-.15 F F2 -(HISTCONTR)4.068 E(OL)-.3 E F1(ignor)4.068 E(edups)-.37 E F0(beha)5.734 E(vior) --.2 E 6.568(.M)-.55 G(an)303.546 334.8 Q 4.069(yv)-.15 G 1.569 -(ariables which modify the shell')326.655 334.8 R 4.069(sb)-.55 G(eha)474.21 -334.8 Q(vior)-.2 E .395(will lose their special meaning.)72 346.8 R -1.11(Va) -5.395 G .395(riables such as)1.11 F F2(notify)2.895 E F0(and)2.895 E F2(noclob) -2.895 E(ber)-.1 E F0 .395(which pro)2.895 F .395(vide functionality a)-.15 F --.25(va)-.2 G(il-).25 E .931 -(able via other mechanisms will no longer be treated specially)72 358.8 R 5.931 -(.O)-.65 G .931(ther v)340.06 358.8 R .932(ariables will be folded into)-.25 F -F2(shopt)3.432 E F0(.)A(The)72 370.8 Q F2(history_contr)5.519 E(ol)-.18 E F0 -(and)5.519 E F2(hostname_completion_\214le)5.519 E F0 -.25(va)5.519 G 3.019 -(riables, superseded by).25 F F2(HISTCONTR)5.518 E(OL)-.3 E F0(and)5.518 E F2 -(HOSTFILE)72 382.8 Q F0(respecti)2.5 E -.15(ve)-.25 G(ly).15 E 2.5(,w)-.65 G -(ill be remo)185.12 382.8 Q -.15(ve)-.15 G(d.).15 E F2 2.5(5.5. Readline)72 -406.8 R F0(Naturally)97 422.4 Q 2.94(,t)-.65 G .44(here will be impro)142.34 -422.4 R -.15(ve)-.15 G .441(ments to readline as well.).15 F .441 -(All of the POSIX.2)5.441 F F1(vi)2.941 E F0 .441(-mode editing com-)B .33 -(mands will be implemented; missing commands lik)72 434.4 R 2.829(e`)-.1 G .329 -(m' to sa)290.599 434.4 R .629 -.15(ve t)-.2 H .329 -(he current cursor position \().15 F F1(mark)A F0 2.829(\)a)C .329(nd the) -478.951 434.4 R .36(`@' command for macro e)72 446.4 R .36(xpansion will be a) --.15 F -.25(va)-.2 G 2.861(ilable. The).25 F .361 -(ability to set the mark and e)2.861 F .361(xchange the current)-.15 F .764 -(cursor position \()72 458.4 R F1(point)A F0 3.264(\)a)C .764 -(nd mark will be added to the readline emacs mode as well.)170.672 458.4 R .763 -(Since there are com-)5.764 F .196 -(mands to set the mark, commands to manipulate the re)72 470.4 R .197 -(gion \(the characters between the point and the mark\))-.15 F .111(will be a) -72 482.4 R -.25(va)-.2 G 2.611(ilable. Commands).25 F(ha)2.611 E .411 -.15 -(ve b)-.2 H .11 -(een added to the readline emacs mode for more complete ksh compati-).15 F -(bility)72 494.4 Q 2.5(,s)-.65 G(uch as the C-])101.36 494.4 Q F1(c)A F0 -(character search command.)2.5 E F2 2.5(5.6. Con\214guration)72 518.4 R F0 .318 -(Bash w)97 534 R .318 -(as the \214rst GNU program to completely autocon\214gure.)-.1 F .319 -(Its autocon\214guration mechanism pre-)5.319 F(dates)72 546 Q F1(autoconf)4.07 -E F0 4.07(,t)C 1.569 -(he current GNU con\214guration program, and needs updating.)140.97 546 R 1.569 -(Bash-2.0 may include an)6.569 F .603 -(autoconf-based con\214guration script, if necessary ne)72 558 R 3.103(wf)-.25 -G .603(unctionality can be added to autoconf, or its limita-)294.476 558 R -(tions bypassed.)72 570 Q F2 2.5(5.7. Miscellaneous)72 594 R F0 1.632 -(The POSIX mode will be impro)97 609.6 R -.15(ve)-.15 G 4.131(di).15 G 4.131 -(nb)254.26 609.6 S 1.631(ash-2.0; it will pro)268.391 609.6 R 1.631 -(vide a more complete superset of the)-.15 F(POSIX standard.)72 621.6 Q -.15 -(Fo)5 G 2.5(rt).15 G(he \214rst time, bash will recognize the e)163.79 621.6 Q -(xistance of the POSIX.2)-.15 E F1(special)2.5 E F0 -.2(bu)2.5 G(iltins.).2 E -2.627(An)97 637.2 S .627 -.25(ew t)111.847 637.2 T .127(rap v).25 F(alue,)-.25 -E F2(DEB)2.627 E(UG)-.1 E F0 2.627(,w)C .128(ill be present, as in ksh.)218.405 -637.2 R .128(Commands speci\214ed with a)5.128 F F2(DEB)2.628 E(UG)-.1 E F0 -.128(trap will)2.628 F 1.908(be e)72 649.2 R -.15(xe)-.15 G 1.908 -(cuted after e).15 F -.15(ve)-.25 G 1.908(ry simple command.).15 F 1.908 -(Since this mak)6.908 F 1.908(es shell script deb)-.1 F 1.908 -(uggers possible, I hope to)-.2 F(include a bash deb)72 661.2 Q -(ugger in the bash-2.0 release.)-.2 E F2 2.5(6. A)72 685.2 R -.1(va)-1 G -(ilability).1 E F0 5.997(The current v)97 700.8 R 5.997(ersion of bash is a) --.15 F -.25(va)-.2 G 5.998(ilable for anon).25 F 5.998 -(ymous FTP from prep.ai.mit.edu as)-.15 F F1(/pub/gnu/bash-1.14.2.tar)72 712.8 -Q(.gz)-1.11 E F0(.)1.666 E EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(3-)288 48 S/F1 10/Times-Bold@0 -SF 2.5(7. Conclusion)72 84 R F0 .755(This paper has presented an o)97 99.6 R --.15(ve)-.15 G(rvie).15 E 3.255(wo)-.25 G 3.255(fb)259.27 99.6 S .755 -(ash, compared its features with those of other shells, and)270.855 99.6 R -(hinted at features in the ne)72 111.6 Q(xt release, bash-2.0.)-.15 E .483 -(Bash is a solid replacement for sh.)97 127.2 R .483(It is suf)5.483 F .483 -(\214ciently portable to run on nearly e)-.25 F -.15(ve)-.25 G .484(ry v).15 F -.484(ersion of)-.15 F/F2 9/Times-Roman@0 SF(UNIX)2.984 E F0 .514 -(from 4.3 BSD to SVR4.2, and se)72 139.2 R -.15(ve)-.25 G(ral).15 E F2(UNIX) -3.013 E F0 -.1(wo)3.013 G(rkalik).1 E .513(es, and rob)-.1 F .513 -(ust enough to replace sh on most of those)-.2 F .771(systems, It is v)72 151.2 -R .771(ery close to POSIX.2-conformant in POSIX mode, and is getting f)-.15 F -(aster)-.1 E 5.771(.I)-.55 G 3.272(ti)436.684 151.2 S 3.272(sn)445.516 151.2 S -.772(ot, unfortu-)457.678 151.2 R(nately)72 163.2 Q 2.663(,g)-.65 G .163 -(etting smaller)105.953 163.2 R 2.663(,b)-.4 G .163(ut there are man)170.399 -163.2 R 2.663(yo)-.15 G .163(ptional features.)248.101 163.2 R .163(It is v) -5.163 F .162(ery easy to b)-.15 F .162(uild a small subset to use as)-.2 F 2.5 -(ad)72 175.2 S(irect replacement for /bin/sh.)83.94 175.2 Q .909 -(Bash has thousands of users w)97 190.8 R .909(orldwide, all of whom ha)-.1 F -1.209 -.15(ve h)-.2 H .91(elped to mak).15 F 3.41(ei)-.1 G 3.41(tb)409.34 190.8 -S(etter)420.53 190.8 Q 5.91(.A)-.55 G .91(nother testa-)453.38 190.8 R -(ment to the bene\214ts of free softw)72 202.8 Q(are.)-.1 E F1 2.5(8. Refer)72 -226.8 R(ences)-.18 E F0 .432([1] S. R. Bourne, `)72 242.4 R .432(`UNIX T)-.74 F -.432(ime-Sharing System:)-.35 F .431(The UNIX Shell')5.431 F(',)-.74 E/F3 10 -/Times-Italic@0 SF .431(Bell System T)2.931 F(ec)-.92 E .431(hnical J)-.15 F -(ournal)-.25 E F0 2.931(,5)C(7\(6\),)484.84 242.4 Q -(July-August, 1978, pp. 1971-1990.)72 254.4 Q .736([2] Morris Bolsk)72 270 R -3.237(ya)-.15 G .737(nd Da)153.22 270 R .737(vid K)-.2 F(orn,)-.35 E F3 .737 -(The K)3.237 F .737(ornShell Command and Pr)-.4 F -.1(og)-.45 G -.15(ra).1 G -.737(mming Langua).15 F -.1(ge)-.1 G F0 3.237(,P).1 G .737(rentice Hall,) -453.833 270 R(1989.)72 282 Q .142([3] Bill Jo)72 297.6 R 1.442 -.65(y, A)-.1 H -2.642(nI).65 G .141(ntroduction to the C Shell,)140.428 297.6 R F3 .141 -(UNIX User')2.641 F 2.641(sS)-.4 G .141(upplementary Documents)309.346 297.6 R -F0 2.641(,U)C(ni)424.328 297.6 Q -.15(ve)-.25 G .141(rsity of Califor).15 F(-) --.2 E(nia at Berk)72 309.6 Q(ele)-.1 E 1.3 -.65(y, 1)-.15 H(986.).65 E .283 -([4] IEEE,)72 325.2 R F3 .283(IEEE Standar)2.783 F 2.783(df)-.37 G .283 -(or Information T)179.692 325.2 R(ec)-.92 E(hnolo)-.15 E .283(gy -- P)-.1 F -.283(ortable Oper)-.8 F .283(ating System Interface \(POSIX\) P)-.15 F(art)-.8 -E(2: Shell and Utilities)72 337.2 Q F0 2.5(,1)C(992.)165.06 337.2 Q F1 2.5 -(9. A)72 361.2 R(uthor Inf)-.5 E(ormation)-.25 E F0 .937(Chet Rame)97 376.8 R -3.437(yi)-.15 G 3.437(sas)153.724 376.8 S(oftw)172.818 376.8 Q .936 -(are engineer w)-.1 F .936(orking at Case W)-.1 F .936(estern Reserv)-.8 F -3.436(eU)-.15 G(ni)393.43 376.8 Q -.15(ve)-.25 G(rsity).15 E 5.936(.H)-.65 G -3.436(eh)443.036 376.8 S .936(as a B.S. in)455.912 376.8 R .072 -(Computer Engineering and an M.S. in Computer Science, both from CWR)72 388.8 R -2.573(U. He)-.4 F .073(has been w)2.573 F .073(orking on bash)-.1 F -(for six years, and the primary maintainer for one.)72 400.8 Q EP -%%Trailer -end -%%EOF diff --git a/doc/version.texi b/doc/version.texi index f769a191..ca1a17ba 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -1,10 +1,10 @@ @ignore -Copyright (C) 1988-2005 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. @end ignore -@set LASTCHANGE Mon Sep 5 11:47:04 EDT 2005 +@set LASTCHANGE Thu Sep 28 10:25:45 EDT 2006 -@set EDITION 3.1-beta1 -@set VERSION 3.1-beta1 -@set UPDATED 5 September 2005 -@set UPDATED-MONTH September 2005 +@set EDITION 3.2 +@set VERSION 3.2 +@set UPDATED 28 September 2006 +@set UPDATED-MONTH September 2006 @@ -52,8 +52,6 @@ extern int errno; extern int executing_line_number __P((void)); -extern int interactive_shell, interactive, startup_state; -extern char *dollar_vars[]; extern char *shell_name; #if defined (JOB_CONTROL) extern pid_t shell_pgrp; @@ -212,7 +212,7 @@ parse_command () { command_to_execute = get_string_value ("PROMPT_COMMAND"); if (command_to_execute) - execute_prompt_command (command_to_execute); + execute_variable_command (command_to_execute, "PROMPT_COMMAND"); if (running_under_emacs == 2) send_pwd_to_eterm (); /* Yuck */ diff --git a/examples/INDEX.html b/examples/INDEX.html new file mode 100644 index 00000000..c3ba24d7 --- /dev/null +++ b/examples/INDEX.html @@ -0,0 +1,822 @@ +<table border=1> + <tr> + <th>Path</th> + <th>Description</th> + <th>X-Ref</th> + </tr> + <tr> + <td>./bashdb</td> + <td>Deprecated sample implementation of a bash debugger</td> + </tr> + <tr> + </tr> + <tr> + <td>./complete</td> + <td>Shell completion code</td> + </tr> + <tr> + </tr> + <tr> + <td>./functions</td> + <td>Example functions</td> + </tr> + <tr> + <td>./functions/array-stuff</td> + <td>Various array functions (ashift, array_sort, reverse).</td> + </tr> + <tr> + <td>./functions/array-to-string</td> + <td>Convert an array to a string.</td> + </tr> + <tr> + <td>./functions/autoload</td> + <td>An almost ksh-compatible 'autoload' (no lazy load).</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/autoload.v2</td> + <td>An almost ksh-compatible 'autoload' (no lazy load).</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/autoload.v3</td> + <td>A more ksh-compatible 'autoload' (with lazy load).</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/basename</td> + <td>A replacement for basename(1).</td> + <td>basename</td> + </tr> + <tr> + <td>./functions/basename2</td> + <td>Fast basename(1) and dirname(1) functions for BASH/SH.</td> + <td>basename, dirname</td> + </tr> + <tr> + <td>./functions/coproc.bash</td> + <td>Start, control, and end coprocesses.</td> + </tr> + <tr> + <td>./functions/coshell.bash</td> + <td>Control shell coprocesses (see coprocess.bash).</td> + </tr> + <tr> + <td>./functions/coshell.README</td> + <td>README for coshell and coproc.</td> + </tr> + <tr> + <td>./functions/csh-compat</td> + <td>A C-shell compatibility package.</td> + <td>csh</td> + </tr> + <tr> + <td>./functions/dirfuncs</td> + <td>Directory manipulation functions from the book 'The Korn Shell'.</td> + </tr> + <tr> + <td>./functions/dirname</td> + <td>A replacement for dirname(1).</td> + <td>dirname</td> + </tr> + <tr> + <td>./functions/emptydir</td> + <td>Find out if a directory is empty.</td> + </tr> + <tr> + <td>./functions/exitstat</td> + <td>Display the exit status of processes.</td> + </tr> + <tr> + <td>./functions/external</td> + <td>Like 'command' but FORCES use of external command.</td> + </tr> + <tr> + <td>./functions/fact</td> + <td>Recursive factorial function.</td> + </tr> + <tr> + <td>./functions/fstty</td> + <td>Front end to sync TERM changes to both stty(1) and readline 'bind'.</td> + <td>stty.bash</td> + </tr> + <tr> + <td>./functions/func</td> + <td>Print out definitions for functions named by arguments.</td> + </tr> + <tr> + <td>./functions/gethtml</td> + <td>Get a web page from a remote server (wget(1) in bash!).</td> + </tr> + <tr> + <td>./functions/getoptx.bash</td> + <td>getopt function that parses long-named options.</td> + </tr> + <tr> + <td>./functions/inetaddr</td> + <td>Internet address conversion (inet2hex & hex2inet).</td> + </tr> + <tr> + <td>./functions/inpath</td> + <td>Return zero if the argument is in the path and executable.</td> + <td>inpath</td> + </tr> + <tr> + <td>./functions/isnum.bash</td> + <td>Test user input on numeric or character value.</td> + </tr> + <tr> + <td>./functions/isnum2</td> + <td>Test user input on numeric values, with floating point.</td> + </tr> + <tr> + <td>./functions/isvalidip</td> + <td>Test user input for valid IP Addresses.</td> + </tr> + <tr> + <td>./functions/jdate.bash</td> + <td>Julian date conversion.</td> + </tr> + <tr> + <td>./functions/jj.bash</td> + <td>Look for running jobs.</td> + </tr> + <tr> + <td>./functions/keep</td> + <td>Try to keep some programs in the forground and running.</td> + </tr> + <tr> + <td>./functions/ksh-cd</td> + <td>ksh-like 'cd': cd [-LP] [dir [change]].</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/ksh-compat-test</td> + <td>ksh-like arithmetic test replacements.</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/kshenv</td> + <td>Functions and aliases to provide the beginnings of a ksh environment for bash.</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/login</td> + <td>Replace the 'login' and 'newgrp' builtins in old Bourne shells.</td> + </tr> + <tr> + <td>./functions/lowercase</td> + <td>Rename files to lower case.</td> + <td>rename lower</td> + </tr> + <tr> + <td>./functions/manpage</td> + <td>Find and print a manual page.</td> + <td>fman</td> + </tr> + <tr> + <td>./functions/mhfold</td> + <td>Print MH folders, useful only because folders(1) doesn't print mod date/times.</td> + </tr> + <tr> + <td>./functions/notify.bash</td> + <td>Notify when jobs change status.</td> + </tr> + <tr> + <td>./functions/pathfuncs</td> + <td>Path related functions (no_path, add_path, pre-path, del_path).</td> + <td>path</td> + </tr> + <tr> + <td>./functions/README</td> + <td>README</td> + </tr> + <tr> + <td>./functions/recurse</td> + <td>Recursive directory traverser.</td> + </tr> + <tr> + <td>./functions/repeat2</td> + <td>A clone of C shell builtin 'repeat'.</td> + <td>repeat, csh</td> + </tr> + <tr> + <td>./functions/repeat3</td> + <td>A clone of C shell builtin 'repeat'.</td> + <td>repeat, csh</td> + </tr> + <tr> + <td>./functions/seq</td> + <td>Generate a sequence from m to n, m defaults to 1.</td> + </tr> + <tr> + <td>./functions/seq2</td> + <td>Generate a sequence from m to n, m defaults to 1.</td> + </tr> + <tr> + <td>./functions/shcat</td> + <td>Readline-based pager.</td> + <td>cat, readline pager</td> + </tr> + <tr> + <td>./functions/shcat2</td> + <td>Readline-based pagers.</td> + <td>cat, readline pager</td> + </tr> + <tr> + <td>./functions/sort-pos-params</td> + <td>Sort the positional parameters.</td> + </tr> + <tr> + <td>./functions/substr</td> + <td>A function to emulate the ancient ksh builtin.</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/substr2</td> + <td>A function to emulate the ancient ksh builtin.</td> + <td>ksh</td> + </tr> + <tr> + <td>./functions/term</td> + <td>A shell function to set the terminal type interactively or not.</td> + </tr> + <tr> + <td>./functions/whatis</td> + <td>An implementation of the 10th Edition Unix sh builtin 'whatis(1)' command.</td> + </tr> + <tr> + <td>./functions/whence</td> + <td>An almost-ksh compatible 'whence(1)' command.</td> + </tr> + <tr> + <td>./functions/which</td> + <td>An emulation of 'which(1)' as it appears in FreeBSD.</td> + </tr> + <tr> + <td>./functions/xalias.bash</td> + <td>Convert csh alias commands to bash functions.</td> + <td>csh, aliasconv</td> + </tr> + <tr> + <td>./functions/xfind.bash</td> + <td>A 'find(1)' clone.</td> + </tr> + <tr> + </tr> + <tr> + <td>./loadables/</td> + <td>Example loadable replacements</td> + </tr> + <tr> + <td>./loadables/basename.c</td> + <td>Return non-directory portion of pathname.</td> + <td>basename</td> + </tr> + <tr> + <td>./loadables/cat.c</td> + <td>cat(1) replacement with no options - the way cat was intended.</td> + <td>cat, readline pager</td> + </tr> + <tr> + <td>./loadables/cut.c</td> + <td>cut(1) replacement.</td> + </tr> + <tr> + <td>./loadables/dirname.c</td> + <td>Return directory portion of pathname.</td> + <td>dirname</td> + </tr> + <tr> + <td>./loadables/finfo.c</td> + <td>Print file info.</td> + </tr> + <tr> + <td>./loadables/getconf.c</td> + <td>POSIX.2 getconf utility.</td> + </tr> + <tr> + <td>./loadables/getconf.h</td> + <td>Replacement definitions for ones the system doesn't provide.</td> + </tr> + <tr> + <td>./loadables/head.c</td> + <td>Copy first part of files.</td> + </tr> + <tr> + <td>./loadables/hello.c</td> + <td>Obligatory "Hello World" / sample loadable.</td> + </tr> + <tr> + <td>./loadables/id.c</td> + <td>POSIX.2 user identity.</td> + </tr> + <tr> + <td>./loadables/ln.c</td> + <td>Make links.</td> + </tr> + <tr> + <td>./loadables/logname.c</td> + <td>Print login name of current user.</td> + </tr> + <tr> + <td>./loadables/Makefile.in</td> + <td>Simple makefile for the sample loadable builtins.</td> + </tr> + <tr> + <td>./loadables/mkdir.c</td> + <td>Make directories.</td> + </tr> + <tr> + <td>./loadables/necho.c</td> + <td>echo without options or argument interpretation.</td> + </tr> + <tr> + <td>./loadables/pathchk.c</td> + <td>Check pathnames for validity and portability.</td> + </tr> + <tr> + <td>./loadables/print.c</td> + <td>Loadable ksh-93 style print builtin.</td> + </tr> + <tr> + <td>./loadables/printenv.c</td> + <td>Minimal builtin clone of BSD printenv(1).</td> + </tr> + <tr> + <td>./loadables/push.c</td> + <td>Anyone remember TOPS-20?</td> + </tr> + <tr> + <td>./loadables/README</td> + <td>README</td> + </tr> + <tr> + <td>./loadables/realpath.c</td> + <td>Canonicalize pathnames, resolving symlinks.</td> + </tr> + <tr> + <td>./loadables/rmdir.c</td> + <td>Remove directory.</td> + </tr> + <tr> + <td>./loadables/sleep.c</td> + <td>sleep for fractions of a second.</td> + </tr> + <tr> + <td>./loadables/strftime.c</td> + <td>Loadable builtin interface to strftime(3).</td> + </tr> + <tr> + <td>./loadables/sync.c</td> + <td>Sync the disks by forcing pending filesystem writes to complete.</td> + </tr> + <tr> + <td>./loadables/tee.c</td> + <td>Duplicate standard input.</td> + </tr> + <tr> + <td>./loadables/template.c</td> + <td>Example template for loadable builtin.</td> + </tr> + <tr> + <td>./loadables/truefalse.c</td> + <td>True and false builtins.</td> + </tr> + <tr> + <td>./loadables/tty.c</td> + <td>Return terminal name.</td> + </tr> + <tr> + <td>./loadables/uname.c</td> + <td>Print system information.</td> + </tr> + <tr> + <td>./loadables/unlink.c</td> + <td>Remove a directory entry.</td> + </tr> + <tr> + <td>./loadables/whoami.c</td> + <td>Print out username of current user.</td> + </tr> + <tr> + </tr> + <tr> + <td>./loadables/perl/</td> + <td>Illustrate how to build a Perl interpreter into bash.</td> + </tr> + <tr> + </tr> + <tr> + <td>./misc</td> + <td>Miscellaneous</td> + </tr> + <tr> + <td>./misc/aliasconv.bash</td> + <td>Convert csh aliases to bash aliases and functions.</td> + <td>csh, xalias</td> + </tr> + <tr> + <td>./misc/aliasconv.sh</td> + <td>Convert csh aliases to bash aliases and functions.</td> + <td>csh, xalias</td> + </tr> + <tr> + <td>./misc/cshtobash</td> + <td>Convert csh aliases, environment variables, and variables to bash equivalents.</td> + <td>csh, xalias</td> + </tr> + <tr> + <td>./misc/README</td> + <td>README</td> + </tr> + <tr> + <td>./misc/suncmd.termcap</td> + <td>SunView TERMCAP string.</td> + </tr> + <tr> + </tr> + <tr> + <td>./obashdb</td> + <td>Modified version of the Korn Shell debugger from Bill Rosenblatt's 'Learning the Korn Shell'.</td> + </tr> + <tr> + </tr> + <tr> + <td>./scripts.noah</td> + <td>Noah Friedman's collection of scripts (updated to bash v2 syntax by Chet Ramey)</td> + </tr> + <tr> + <td>./scripts.noah/aref.bash</td> + <td>Pseudo-arrays and substring indexing examples.</td> + </tr> + <tr> + <td>./scripts.noah/bash.sub.bash</td> + <td>Library functions used by require.bash.</td> + </tr> + <tr> + <td>./scripts.noah/bash_version.bash</td> + <td>A function to slice up $BASH_VERSION.</td> + </tr> + <tr> + <td>./scripts.noah/meta.bash</td> + <td>Enable and disable eight-bit readline input.</td> + </tr> + <tr> + <td>./scripts.noah/mktmp.bash</td> + <td>Make a temporary file with a unique name.</td> + </tr> + <tr> + <td>./scripts.noah/number.bash</td> + <td>A fun hack to translate numerals into English.</td> + </tr> + <tr> + <td>./scripts.noah/PERMISSION</td> + <td>Permissions to use the scripts in this directory.</td> + </tr> + <tr> + <td>./scripts.noah/prompt.bash</td> + <td>A way to set PS1 to some predefined strings.</td> + </tr> + <tr> + <td>./scripts.noah/README</td> + <td>README</td> + </tr> + <tr> + <td>./scripts.noah/remap_keys.bash</td> + <td>A front end to 'bind' to redo readline bindings.</td> + </tr> + <tr> + <td>./scripts.noah/require.bash</td> + <td>Lisp-like require/provide library functions for bash.</td> + </tr> + <tr> + <td>./scripts.noah/send_mail.bash</td> + <td>Replacement SMTP client written in bash.</td> + </tr> + <tr> + <td>./scripts.noah/shcat.bash</td> + <td>Bash replacement for 'cat(1)'.</td> + <td>cat</td> + </tr> + <tr> + <td>./scripts.noah/source.bash</td> + <td>Replacement for source that uses current directory.</td> + </tr> + <tr> + <td>./scripts.noah/string.bash</td> + <td>The string(3) functions at the shell level.</td> + </tr> + <tr> + <td>./scripts.noah/stty.bash</td> + <td>Front-end to stty(1) that changes readline bindings too.</td> + <td>fstty</td> + </tr> + <tr> + <td>./scripts.noah/y_or_n_p.bash</td> + <td>Prompt for a yes/no/quit answer.</td> + <td>ask</td> + </tr> + <tr> + </tr> + <tr> + <td>./scripts.v2</td> + <td>John DuBois' ksh script collection (converted to bash v2 syntax by Chet Ramey).</td> + </tr> + <tr> + <td>./scripts.v2/arc2tarz</td> + <td>Convert an "arc" archive to a compressed tar archive.</td> + </tr> + <tr> + <td>./scripts.v2/bashrand</td> + <td>Random number generator with upper and lower bounds and optional seed.</td> + <td>random</td> + </tr> + <tr> + <td>./scripts.v2/cal2day.bash</td> + <td>Convert a day number to a name.</td> + </tr> + <tr> + <td>./scripts.v2/cdhist.bash</td> + <td>cd replacement with a directory stack added.</td> + </tr> + <tr> + <td>./scripts.v2/corename</td> + <td>Tell what produced a core file.</td> + </tr> + <tr> + <td>./scripts.v2/fman</td> + <td>Fast man(1) replacement.</td> + <td>manpage</td> + </tr> + <tr> + <td>./scripts.v2/frcp</td> + <td>Copy files using ftp(1) but with rcp-type command line syntax.</td> + </tr> + <tr> + <td>./scripts.v2/lowercase</td> + <td>Change filenames to lower case.</td> + <td>rename lower</td> + </tr> + <tr> + <td>./scripts.v2/ncp</td> + <td>A nicer front end for cp(1) (has -i, etc.).</td> + </tr> + <tr> + <td>./scripts.v2/newext</td> + <td>Change the extension of a group of files.</td> + <td>rename</td> + </tr> + <tr> + <td>./scripts.v2/nmv</td> + <td>A nicer front end for mv(1) (has -i, etc.).</td> + <td>rename</td> + </tr> + <tr> + <td>./scripts.v2/pages</td> + <td>Print specified pages from files.</td> + </tr> + <tr> + <td>./scripts.v2/PERMISSION</td> + <td>Permissions to use the scripts in this directory.</td> + </tr> + <tr> + <td>./scripts.v2/pf</td> + <td>A pager front end that handles compressed files.</td> + </tr> + <tr> + <td>./scripts.v2/pmtop</td> + <td>Poor man's 'top(1)' for SunOS 4.x and BSD/OS.</td> + </tr> + <tr> + <td>./scripts.v2/README</td> + <td>README</td> + </tr> + <tr> + <td>./scripts.v2/ren</td> + <td>Rename files by changing parts of filenames that match a pattern.</td> + <td>rename</td> + </tr> + <tr> + <td>./scripts.v2/rename</td> + <td>Change the names of files that match a pattern.</td> + <td>rename</td> + </tr> + <tr> + <td>./scripts.v2/repeat</td> + <td>Execute a command multiple times.</td> + <td>repeat</td> + </tr> + <tr> + <td>./scripts.v2/shprof</td> + <td>Line profiler for bash scripts.</td> + </tr> + <tr> + <td>./scripts.v2/untar</td> + <td>Unarchive a (possibly compressed) tarfile into a directory.</td> + </tr> + <tr> + <td>./scripts.v2/uudec</td> + <td>Carefully uudecode(1) multiple files.</td> + </tr> + <tr> + <td>./scripts.v2/uuenc</td> + <td>uuencode(1) multiple files.</td> + </tr> + <tr> + <td>./scripts.v2/vtree</td> + <td>Print a visual display of a directory tree.</td> + <td>tree</td> + </tr> + <tr> + <td>./scripts.v2/where</td> + <td>Show where commands that match a pattern are.</td> + </tr> + <tr> + </tr> + <tr> + <td>./scripts</td> + <td>Example scripts</td> + </tr> + <tr> + <td>./scripts/adventure.sh</td> + <td>Text adventure game in bash!</td> + </tr> + <tr> + <td>./scripts/bcsh.sh</td> + <td>Bourne shell cshell-emulator.</td> + <td>csh</td> + </tr> + <tr> + <td>./scripts/cat.sh</td> + <td>Readline-based pager.</td> + <td>cat, readline pager</td> + </tr> + <tr> + <td>./scripts/center</td> + <td>Center - center a group of lines.</td> + </tr> + <tr> + <td>./scripts/dd-ex.sh</td> + <td>Line editor using only /bin/sh, /bin/dd and /bin/rm.</td> + </tr> + <tr> + <td>./scripts/fixfiles.bash</td> + <td>Recurse a tree and fix files containing various "bad" chars.</td> + </tr> + <tr> + <td>./scripts/hanoi.bash</td> + <td>The inevitable Towers of Hanoi in bash.</td> + </tr> + <tr> + <td>./scripts/inpath</td> + <td>Search $PATH for a file the same name as $1; return TRUE if found.</td> + <td>inpath</td> + </tr> + <tr> + <td>./scripts/krand.bash</td> + <td>Produces a random number within integer limits.</td> + <td>random</td> + </tr> + <tr> + <td>./scripts/line-input.bash</td> + <td>Line input routine for GNU Bourne-Again Shell plus terminal-control primitives.</td> + </tr> + <tr> + <td>./scripts/nohup.bash</td> + <td>bash version of 'nohup' command.</td> + </tr> + <tr> + <td>./scripts/precedence</td> + <td>Test relative precedences for '&&' and '||' operators.</td> + </tr> + <tr> + <td>./scripts/randomcard.bash</td> + <td>Print a random card from a card deck.</td> + <td>random</td> + </tr> + <tr> + <td>./scripts/README</td> + <td>README</td> + </tr> + <tr> + <td>./scripts/scrollbar</td> + <td>Display scrolling text.</td> + </tr> + <tr> + <td>./scripts/scrollbar2</td> + <td>Display scrolling text.</td> + </tr> + <tr> + <td>./scripts/self-repro</td> + <td>A self-reproducing script (careful!)</td> + </tr> + <tr> + <td>./scripts/showperm.bash</td> + <td>Convert ls(1) symbolic permissions into octal mode.</td> + </tr> + <tr> + <td>./scripts/shprompt</td> + <td>Display a prompt and get an answer satisfying certain criteria.</td> + <td>ask</td> + </tr> + <tr> + <td>./scripts/spin.bash</td> + <td>Display a 'spinning wheel' to show progress.</td> + </tr> + <tr> + <td>./scripts/timeout</td> + <td>Give rsh(1) a shorter timeout.</td> + </tr> + <tr> + <td>./scripts/vtree2</td> + <td>Display a tree printout of dir in 1k blocks.</td> + <td>tree</td> + </tr> + <tr> + <td>./scripts/vtree3</td> + <td>Display a graphical tree printout of dir.</td> + <td>tree</td> + </tr> + <tr> + <td>./scripts/vtree3a</td> + <td>Display a graphical tree printout of dir.</td> + <td>tree</td> + </tr> + <tr> + <td>./scripts/websrv.sh</td> + <td>A web server in bash!</td> + </tr> + <tr> + <td>./scripts/xterm_title</td> + <td>Print the contents of the xterm title bar.</td> + </tr> + <tr> + <td>./scripts/zprintf</td> + <td>Emulate printf (obsolete since it's now a bash builtin).</td> + </tr> + <tr> + </tr> + <tr> + <td>./startup-files</td> + <td>Example Start-up files.</td> + </tr> + <tr> + <td>./startup-files/Bash_aliases</td> + <td>Some useful aliases (Fox).</td> + </tr> + <tr> + <td>./startup-files/Bash_profile</td> + <td>Sample startup file for bash login shells (Fox).</td> + </tr> + <tr> + <td>./startup-files/bash-profile</td> + <td>Sample startup file for bash login shells (Ramey).</td> + </tr> + <tr> + <td>./startup-files/bashrc</td> + <td>Sample Bourne Again SHell init file (Ramey).</td> + </tr> + <tr> + <td>./startup-files/Bashrc.bfox</td> + <td>Sample Bourne Again SHell init file (Fox).</td> + </tr> + <tr> + <td>./startup-files/README</td> + <td>README</td> + </tr> + <tr> + </tr> + <tr> + <td>./startup-files/apple</td> + <td>Example Start-up files for Mac OS X.</td> + </tr> + <tr> + <td>./startup-files/apple/aliases</td> + <td>Sample aliases for Mac OS X.</td> + </tr> + <tr> + <td>./startup-files/apple/bash.defaults</td> + <td>Sample User preferences file.</td> + </tr> + <tr> + <td>./startup-files/apple/environment</td> + <td>Sample Bourne Again Shell environment file.</td> + </tr> + <tr> + <td>./startup-files/apple/login</td> + <td>Sample login wrapper.</td> + </tr> + <tr> + <td>./startup-files/apple/logout</td> + <td>Sample logout wrapper.</td> + </tr> + <tr> + <td>./startup-files/apple/rc</td> + <td>Sample Bourne Again Shell config file.</td> + </tr> + <tr> + <td>./startup-files/apple/README</td> + <td>README</td> + </tr> +</table> diff --git a/examples/INDEX.txt b/examples/INDEX.txt new file mode 100644 index 00000000..1be1cc63 --- /dev/null +++ b/examples/INDEX.txt @@ -0,0 +1,198 @@ +Path Description X-Ref +./bashdb Deprecated sample implementation of a bash debugger + +./complete Shell completion code + +./functions Example functions +./functions/array-stuff Various array functions (ashift, array_sort, reverse). +./functions/array-to-string Convert an array to a string. +./functions/autoload An almost ksh-compatible 'autoload' (no lazy load). ksh +./functions/autoload.v2 An almost ksh-compatible 'autoload' (no lazy load). ksh +./functions/autoload.v3 A more ksh-compatible 'autoload' (with lazy load). ksh +./functions/basename A replacement for basename(1). basename +./functions/basename2 Fast basename(1) and dirname(1) functions for BASH/SH. basename, dirname +./functions/coproc.bash Start, control, and end coprocesses. +./functions/coshell.bash Control shell coprocesses (see coprocess.bash). +./functions/coshell.README README for coshell and coproc. +./functions/csh-compat A C-shell compatibility package. csh +./functions/dirfuncs Directory manipulation functions from the book 'The Korn Shell'. +./functions/dirname A replacement for dirname(1). dirname +./functions/emptydir Find out if a directory is empty. +./functions/exitstat Display the exit status of processes. +./functions/external Like 'command' but FORCES use of external command. +./functions/fact Recursive factorial function. +./functions/fstty Front end to sync TERM changes to both stty(1) and readline 'bind'. stty.bash +./functions/func Print out definitions for functions named by arguments. +./functions/gethtml Get a web page from a remote server (wget(1) in bash!). +./functions/getoptx.bash getopt function that parses long-named options. +./functions/inetaddr Internet address conversion (inet2hex & hex2inet). +./functions/inpath Return zero if the argument is in the path and executable. inpath +./functions/isnum.bash Test user input on numeric or character value. +./functions/isnum2 Test user input on numeric values, with floating point. +./functions/isvalidip Test user input for valid IP Addresses. +./functions/jdate.bash Julian date conversion. +./functions/jj.bash Look for running jobs. +./functions/keep Try to keep some programs in the forground and running. +./functions/ksh-cd ksh-like 'cd': cd [-LP] [dir [change]]. ksh +./functions/ksh-compat-test ksh-like arithmetic test replacements. ksh +./functions/kshenv Functions and aliases to provide the beginnings of a ksh environment for bash. ksh +./functions/login Replace the 'login' and 'newgrp' builtins in old Bourne shells. +./functions/lowercase Rename files to lower case. rename lower +./functions/manpage Find and print a manual page. fman +./functions/mhfold Print MH folders, useful only because folders(1) doesn't print mod date/times. +./functions/notify.bash Notify when jobs change status. +./functions/pathfuncs Path related functions (no_path, add_path, pre-path, del_path). path +./functions/README README +./functions/recurse Recursive directory traverser. +./functions/repeat2 A clone of C shell builtin 'repeat'. repeat, csh +./functions/repeat3 A clone of C shell builtin 'repeat'. repeat, csh +./functions/seq Generate a sequence from m to n, m defaults to 1. +./functions/seq2 Generate a sequence from m to n, m defaults to 1. +./functions/shcat Readline-based pager. cat, readline pager +./functions/shcat2 Readline-based pagers. cat, readline pager +./functions/sort-pos-params Sort the positional parameters. +./functions/substr A function to emulate the ancient ksh builtin. ksh +./functions/substr2 A function to emulate the ancient ksh builtin. ksh +./functions/term A shell function to set the terminal type interactively or not. +./functions/whatis An implementation of the 10th Edition Unix sh builtin 'whatis(1)' command. +./functions/whence An almost-ksh compatible 'whence(1)' command. +./functions/which An emulation of 'which(1)' as it appears in FreeBSD. +./functions/xalias.bash Convert csh alias commands to bash functions. csh, aliasconv +./functions/xfind.bash A 'find(1)' clone. + +./loadables/ Example loadable replacements +./loadables/basename.c Return non-directory portion of pathname. basename +./loadables/cat.c cat(1) replacement with no options - the way cat was intended. cat, readline pager +./loadables/cut.c cut(1) replacement. +./loadables/dirname.c Return directory portion of pathname. dirname +./loadables/finfo.c Print file info. +./loadables/getconf.c POSIX.2 getconf utility. +./loadables/getconf.h Replacement definitions for ones the system doesn't provide. +./loadables/head.c Copy first part of files. +./loadables/hello.c Obligatory "Hello World" / sample loadable. +./loadables/id.c POSIX.2 user identity. +./loadables/ln.c Make links. +./loadables/logname.c Print login name of current user. +./loadables/Makefile.in Simple makefile for the sample loadable builtins. +./loadables/mkdir.c Make directories. +./loadables/necho.c echo without options or argument interpretation. +./loadables/pathchk.c Check pathnames for validity and portability. +./loadables/print.c Loadable ksh-93 style print builtin. +./loadables/printenv.c Minimal builtin clone of BSD printenv(1). +./loadables/push.c Anyone remember TOPS-20? +./loadables/README README +./loadables/realpath.c Canonicalize pathnames, resolving symlinks. +./loadables/rmdir.c Remove directory. +./loadables/sleep.c sleep for fractions of a second. +./loadables/strftime.c Loadable builtin interface to strftime(3). +./loadables/sync.c Sync the disks by forcing pending filesystem writes to complete. +./loadables/tee.c Duplicate standard input. +./loadables/template.c Example template for loadable builtin. +./loadables/truefalse.c True and false builtins. +./loadables/tty.c Return terminal name. +./loadables/uname.c Print system information. +./loadables/unlink.c Remove a directory entry. +./loadables/whoami.c Print out username of current user. + +./loadables/perl/ Illustrate how to build a Perl interpreter into bash. + +./misc Miscellaneous +./misc/aliasconv.bash Convert csh aliases to bash aliases and functions. csh, xalias +./misc/aliasconv.sh Convert csh aliases to bash aliases and functions. csh, xalias +./misc/cshtobash Convert csh aliases, environment variables, and variables to bash equivalents. csh, xalias +./misc/README README +./misc/suncmd.termcap SunView TERMCAP string. + +./obashdb Modified version of the Korn Shell debugger from Bill Rosenblatt's 'Learning the Korn Shell'. + +./scripts.noah Noah Friedman's collection of scripts (updated to bash v2 syntax by Chet Ramey) +./scripts.noah/aref.bash Pseudo-arrays and substring indexing examples. +./scripts.noah/bash.sub.bash Library functions used by require.bash. +./scripts.noah/bash_version.bash A function to slice up $BASH_VERSION. +./scripts.noah/meta.bash Enable and disable eight-bit readline input. +./scripts.noah/mktmp.bash Make a temporary file with a unique name. +./scripts.noah/number.bash A fun hack to translate numerals into English. +./scripts.noah/PERMISSION Permissions to use the scripts in this directory. +./scripts.noah/prompt.bash A way to set PS1 to some predefined strings. +./scripts.noah/README README +./scripts.noah/remap_keys.bash A front end to 'bind' to redo readline bindings. +./scripts.noah/require.bash Lisp-like require/provide library functions for bash. +./scripts.noah/send_mail.bash Replacement SMTP client written in bash. +./scripts.noah/shcat.bash Bash replacement for 'cat(1)'. cat +./scripts.noah/source.bash Replacement for source that uses current directory. +./scripts.noah/string.bash The string(3) functions at the shell level. +./scripts.noah/stty.bash Front-end to stty(1) that changes readline bindings too. fstty +./scripts.noah/y_or_n_p.bash Prompt for a yes/no/quit answer. ask + +./scripts.v2 John DuBois' ksh script collection (converted to bash v2 syntax by Chet Ramey). +./scripts.v2/arc2tarz Convert an "arc" archive to a compressed tar archive. +./scripts.v2/bashrand Random number generator with upper and lower bounds and optional seed. random +./scripts.v2/cal2day.bash Convert a day number to a name. +./scripts.v2/cdhist.bash cd replacement with a directory stack added. +./scripts.v2/corename Tell what produced a core file. +./scripts.v2/fman Fast man(1) replacement. manpage +./scripts.v2/frcp Copy files using ftp(1) but with rcp-type command line syntax. +./scripts.v2/lowercase Change filenames to lower case. rename lower +./scripts.v2/ncp A nicer front end for cp(1) (has -i, etc.). +./scripts.v2/newext Change the extension of a group of files. rename +./scripts.v2/nmv A nicer front end for mv(1) (has -i, etc.). rename +./scripts.v2/pages Print specified pages from files. +./scripts.v2/PERMISSION Permissions to use the scripts in this directory. +./scripts.v2/pf A pager front end that handles compressed files. +./scripts.v2/pmtop Poor man's 'top(1)' for SunOS 4.x and BSD/OS. +./scripts.v2/README README +./scripts.v2/ren Rename files by changing parts of filenames that match a pattern. rename +./scripts.v2/rename Change the names of files that match a pattern. rename +./scripts.v2/repeat Execute a command multiple times. repeat +./scripts.v2/shprof Line profiler for bash scripts. +./scripts.v2/untar Unarchive a (possibly compressed) tarfile into a directory. +./scripts.v2/uudec Carefully uudecode(1) multiple files. +./scripts.v2/uuenc uuencode(1) multiple files. +./scripts.v2/vtree Print a visual display of a directory tree. tree +./scripts.v2/where Show where commands that match a pattern are. + +./scripts Example scripts +./scripts/adventure.sh Text adventure game in bash! +./scripts/bcsh.sh Bourne shell cshell-emulator. csh +./scripts/cat.sh Readline-based pager. cat, readline pager +./scripts/center Center - center a group of lines. +./scripts/dd-ex.sh Line editor using only /bin/sh, /bin/dd and /bin/rm. +./scripts/fixfiles.bash Recurse a tree and fix files containing various "bad" chars. +./scripts/hanoi.bash The inevitable Towers of Hanoi in bash. +./scripts/inpath Search $PATH for a file the same name as $1; return TRUE if found. inpath +./scripts/krand.bash Produces a random number within integer limits. random +./scripts/line-input.bash Line input routine for GNU Bourne-Again Shell plus terminal-control primitives. +./scripts/nohup.bash bash version of 'nohup' command. +./scripts/precedence Test relative precedences for '&&' and '||' operators. +./scripts/randomcard.bash Print a random card from a card deck. random +./scripts/README README +./scripts/scrollbar Display scrolling text. +./scripts/scrollbar2 Display scrolling text. +./scripts/self-repro A self-reproducing script (careful!) +./scripts/showperm.bash Convert ls(1) symbolic permissions into octal mode. +./scripts/shprompt Display a prompt and get an answer satisfying certain criteria. ask +./scripts/spin.bash Display a 'spinning wheel' to show progress. +./scripts/timeout Give rsh(1) a shorter timeout. +./scripts/vtree2 Display a tree printout of dir in 1k blocks. tree +./scripts/vtree3 Display a graphical tree printout of dir. tree +./scripts/vtree3a Display a graphical tree printout of dir. tree +./scripts/websrv.sh A web server in bash! +./scripts/xterm_title Print the contents of the xterm title bar. +./scripts/zprintf Emulate printf (obsolete since it's now a bash builtin). + +./startup-files Example Start-up files. +./startup-files/Bash_aliases Some useful aliases (Fox). +./startup-files/Bash_profile Sample startup file for bash login shells (Fox). +./startup-files/bash-profile Sample startup file for bash login shells (Ramey). +./startup-files/bashrc Sample Bourne Again SHell init file (Ramey). +./startup-files/Bashrc.bfox Sample Bourne Again SHell init file (Fox). +./startup-files/README README + +./startup-files/apple Example Start-up files for Mac OS X. +./startup-files/apple/aliases Sample aliases for Mac OS X. +./startup-files/apple/bash.defaults Sample User preferences file. +./startup-files/apple/environment Sample Bourne Again Shell environment file. +./startup-files/apple/login Sample login wrapper. +./startup-files/apple/logout Sample logout wrapper. +./startup-files/apple/rc Sample Bourne Again Shell config file. +./startup-files/apple/README README diff --git a/examples/loadables/README b/examples/loadables/README index db678609..d29b43a1 100644 --- a/examples/loadables/README +++ b/examples/loadables/README @@ -31,3 +31,36 @@ Many of the details needed by builtin writers are found in hello.c, the canonical example. There is no real `builtin writers' programming guide'. The file template.c provides a template to use for creating new loadable builtins. + +basename.c Return non-directory portion of pathname. +cat.c cat(1) replacement with no options - the way cat was intended. +cut.c cut(1) replacement. +dirname.c Return directory portion of pathname. +finfo.c Print file info. +getconf.c POSIX.2 getconf utility. +getconf.h Replacement definitions for ones the system doesn't provide. +head.c Copy first part of files. +hello.c Obligatory "Hello World" / sample loadable. +id.c POSIX.2 user identity. +ln.c Make links. +logname.c Print login name of current user. +Makefile.in Simple makefile for the sample loadable builtins. +mkdir.c Make directories. +necho.c echo without options or argument interpretation. +pathchk.c Check pathnames for validity and portability. +print.c Loadable ksh-93 style print builtin. +printenv.c Minimal builtin clone of BSD printenv(1). +push.c Anyone remember TOPS-20? +README README +realpath.c Canonicalize pathnames, resolving symlinks. +rmdir.c Remove directory. +sleep.c sleep for fractions of a second. +strftime.c Loadable builtin interface to strftime(3). +sync.c Sync the disks by forcing pending filesystem writes to complete. +tee.c Duplicate standard input. +template.c Example template for loadable builtin. +truefalse.c True and false builtins. +tty.c Return terminal name. +uname.c Print system information. +unlink.c Remove a directory entry. +whoami.c Print out username of current user. diff --git a/examples/scripts.noah/README b/examples/scripts.noah/README index a33860ba..95272d74 100644 --- a/examples/scripts.noah/README +++ b/examples/scripts.noah/README @@ -7,18 +7,20 @@ any of them. They exist simply as examples of bash scripting. Here's a description of what's in this directory: -aref.bash pseudo-arrays and substring indexing examples -bash.sub.bash library functions used by require.bash -bash_version.bash a function to slice up $BASH_VERSION -meta.bash enable and disable eight-bit readline input -mktmp.bash make a temporary file with a unique name -number.bash a fun hack to translate numerals into english -prompt.bash a way to set PS1 to some predefined strings -remap_keys.bash a front end to `bind' to redo readline bindings -require.bash lisp-like require/provide library functions for bash -send_mail.bash replacement smtp client written in bash -shcat.bash bash replacement for `cat' -source.bash replacement for source that uses current directory -string.bash the string(3) functions at the shell level -stty.bash front-end to stty that changes readline bindings too -y_or_n_p.bash prompt for a yes/no/quit answer +aref.bash Pseudo-arrays and substring indexing examples. +bash.sub.bash Library functions used by require.bash. +bash_version.bash A function to slice up $BASH_VERSION. +meta.bash Enable and disable eight-bit readline input. +mktmp.bash Make a temporary file with a unique name. +number.bash A fun hack to translate numerals into English. +PERMISSION Permissions to use the scripts in this directory. +prompt.bash A way to set PS1 to some predefined strings. +README README +remap_keys.bash A front end to 'bind' to redo readline bindings. +require.bash Lisp-like require/provide library functions for bash. +send_mail.bash Replacement SMTP client written in bash. +shcat.bash Bash replacement for 'cat(1)'. +source.bash Replacement for source that uses current directory. +string.bash The string(3) functions at the shell level. +stty.bash Front-end to stty(1) that changes readline bindings too. +y_or_n_p.bash Prompt for a yes/no/quit answer. diff --git a/examples/scripts.v2/README b/examples/scripts.v2/README index b3d0559d..74f27c54 100644 --- a/examples/scripts.v2/README +++ b/examples/scripts.v2/README @@ -7,27 +7,31 @@ any of them. They exist simply as examples of bash scripting. Here's a description of what's in this directory: -arc2tarz Convert an "arc" archive to a compressed tar archive. -corename Tell what produced a core file. -fman Fast man replacement. -frcp Copy files using ftp but with rcp-type command line syntax. -lowercase Change filenames to lower case. -ncp A nicer front end for cp (has -i, etc.). -newext Change the extension of a group of files. -nmv A nicer front end for mv (has -i, etc.). -pages Print specified pages from files. -pf A pager front end that handles compressed files. -rename Change the names of files that match a pattern. -repeat Execute a command multiple times. -untar Unarchive a (possibly compressed) tarfile into a directory. -uudec Carefully uudecode multiple files. -uuenc uuencode multiple files. -vtree Print a visual display of a directory tree. -where Show where commands that match a pattern are. +arc2tarz Convert an "arc" archive to a compressed tar archive. +cal2day.bash Convert a day number to a name. +corename Tell what produced a core file. +fman Fast man(1) replacement. +frcp Copy files using ftp(1) but with rcp-type command line syntax. +lowercase Change filenames to lower case. +ncp A nicer front end for cp(1) (has -i, etc.). +newext Change the extension of a group of files. +nmv A nicer front end for mv(1) (has -i, etc.). +pages Print specified pages from files. +PERMISSION Permissions to use the scripts in this directory. +pf A pager front end that handles compressed files. +README README +ren Rename files by changing parts of filenames that match a pattern. +rename Change the names of files that match a pattern. +repeat Execute a command multiple times. +untar Unarchive a (possibly compressed) tarfile into a directory. +uudec Carefully uudecode(1) multiple files. +uuenc uuencode(1) multiple files. +vtree Print a visual display of a directory tree. +where Show where commands that match a pattern are. The following scripts were written or converted by Chet Ramey: -bashrand Random number generator with upper and lower bounds and optional seed -cdhist cd replacement with a directory stack added -pmtop Poor man's `top' for SunOS 4.x and BSD/OS -shprof Line profiler for bash scripts +bashrand Random number generator with upper and lower bounds and optional seed. +cdhist.bash cd replacement with a directory stack added. +pmtop Poor man's 'top(1)' for SunOS 4.x and BSD/OS. +shprof Line profiler for bash scripts. diff --git a/examples/startup-files/README b/examples/startup-files/README index bdbfd906..92667a69 100644 --- a/examples/startup-files/README +++ b/examples/startup-files/README @@ -3,3 +3,19 @@ are originally from Brian Fox. The ones starting with lowercase letters are from Chet Ramey. They will require changes for your environment. + +Bash_aliases Some useful aliases (Fox). +Bash_profile Sample startup file for bash login shells (Fox). +bash-profile Sample startup file for bash login shells (Ramey). +bashrc Sample Bourne Again SHell init file (Ramey). +Bashrc.bfox Sample Bourne Again SHell init file (Fox). +README README + +apple Example Start-up files for Mac OS X. +apple/aliases Sample aliases for Mac OS X. +apple/bash.defaults Sample User preferences file. +apple/environment Sample Bourne Again Shell environment file. +apple/login Sample login wrapper. +apple/logout Sample logout wrapper. +apple/rc Sample Bourne Again Shell config file. +apple/README README diff --git a/examples/startup-files/apple/README b/examples/startup-files/apple/README index 07005cb0..67ad14a5 100644 --- a/examples/startup-files/apple/README +++ b/examples/startup-files/apple/README @@ -22,3 +22,12 @@ See the corresponding file in /usr/share/init/bash for more information about th -Fred tritan@mit.edu + + +aliases Sample aliases for Mac OS X. +bash.defaults Sample User preferences file. +environment Sample Bourne Again Shell environment file. +login Sample login wrapper. +logout Sample logout wrapper. +rc Sample Bourne Again Shell config file. +README README diff --git a/execute_cmd.c b/execute_cmd.c index ce90d25b..dde6b52c 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -1,4 +1,4 @@ -/* execute_command.c -- Execute a COMMAND structure. */ +/* execute_cmd.c -- Execute a COMMAND structure. */ /* Copyright (C) 1987-2005 Free Software Foundation, Inc. @@ -214,6 +214,8 @@ static int special_builtin_failed; report the correct line number. Kind of a hack. */ static int showing_function_line; +static int line_number_for_err_trap; + /* For catching RETURN in a function. */ int return_catch_flag; int return_catch_value; @@ -359,6 +361,7 @@ execute_command (command) unlink_fifo_list (); #endif /* PROCESS_SUBSTITUTION */ + QUIT; return (result); } @@ -501,6 +504,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (command == 0 || breaking || continuing || read_but_dont_execute) return (EXECUTION_SUCCESS); + QUIT; run_pending_traps (); #if 0 @@ -663,7 +667,7 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, if (command->flags & CMD_STDIN_REDIR) command->value.Simple->flags |= CMD_STDIN_REDIR; - line_number = command->value.Simple->line; + line_number_for_err_trap = line_number = command->value.Simple->line; exec_result = execute_simple_command (command->value.Simple, pipe_in, pipe_out, asynchronous, fds_to_close); @@ -865,6 +869,24 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out, ? EXECUTION_FAILURE : EXECUTION_SUCCESS; +#if defined (DPAREN_ARITHMETIC) || defined (COND_COMMAND) + /* This is where we set PIPESTATUS from the exit status of the appropriate + compound commands (the ones that look enough like simple commands to + cause confusion). We might be able to optimize by not doing this if + subshell_environment != 0. */ + switch (command->type) + { +# if defined (DPAREN_ARITHMETIC) + case cm_arith: +# endif +# if defined (COND_COMMAND) + case cm_cond: +# endif + set_pipestatus_from_exit (exec_result); + break; + } +#endif + last_command_exit_value = exec_result; run_pending_traps (); #if 0 @@ -1187,6 +1209,10 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) the special case of an asynchronous GROUP command where the the subshell bit is turned on down in case cm_group: below), turn off `asynchronous', so that two subshells aren't spawned. + XXX - asynchronous used to be set to 0 in this block, but that + means that setup_async_signals was never run. Now it's set to + 0 after subshell_environment is set appropriately and setup_async_signals + is run. This seems semantically correct to me. For example, ( foo ) & seems to say ``do the command `foo' in a subshell @@ -1214,19 +1240,35 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) aliases. */ if (ois != interactive_shell) expand_aliases = 0; - asynchronous = 0; } /* Subshells are neither login nor interactive. */ login_shell = interactive = 0; - subshell_environment = user_subshell ? SUBSHELL_PAREN : SUBSHELL_ASYNC; + if (user_subshell) + subshell_environment = SUBSHELL_PAREN; + else + { + subshell_environment = 0; /* XXX */ + if (asynchronous) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; + } reset_terminating_signals (); /* in sig.c */ /* Cancel traps, in trap.c. */ restore_original_signals (); + + /* Make sure restore_original_signals doesn't undo the work done by + make_child to ensure that asynchronous children are immune to SIGINT + and SIGQUIT. Turn off asynchronous to make sure more subshells are + not spawned. */ if (asynchronous) - setup_async_signals (); + { + setup_async_signals (); + asynchronous = 0; + } #if defined (JOB_CONTROL) set_sigchld_handler (); @@ -1308,8 +1350,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) if (function_value) return_code = return_catch_value; else - return_code = execute_command_internal - (tcom, asynchronous, NO_PIPE, NO_PIPE, fds_to_close); + return_code = execute_command_internal (tcom, asynchronous, NO_PIPE, NO_PIPE, fds_to_close); /* If we are asked to, invert the return value. */ if (invert) @@ -1629,7 +1670,11 @@ execute_for_command (for_command) /* Save this command unless it's a trap command and we're not running a debug trap. */ +#if 0 if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -2048,7 +2093,11 @@ execute_select_command (select_command) if (echo_command_at_execute) xtrace_print_select_command_head (select_command); +#if 0 if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -2180,7 +2229,11 @@ execute_case_command (case_command) if (echo_command_at_execute) xtrace_print_case_command_head (case_command); - if (signal_in_progress (DEBUG_TRAP == 0) && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#if 0 + if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -2378,6 +2431,7 @@ execute_arith_command (arith_command) int expok, save_line_number, retval; intmax_t expresult; WORD_LIST *new; + char *exp; expresult = 0; @@ -2420,8 +2474,11 @@ execute_arith_command (arith_command) if (new) { - expresult = evalexp (new->word->word, &expok); + exp = new->next ? string_list (new) : new->word->word; + expresult = evalexp (exp, &expok); line_number = save_line_number; + if (exp != new->word->word) + free (exp); dispose_words (new); } else @@ -2477,6 +2534,7 @@ execute_cond_node (cond) } else if (cond->type == COND_BINARY) { + rmatch = 0; patmatch = ((cond->op->word[1] == '=') && (cond->op->word[2] == '\0') && (cond->op->word[0] == '!' || cond->op->word[0] == '=') || (cond->op->word[0] == '=' && cond->op->word[1] == '\0')); @@ -2488,7 +2546,7 @@ execute_cond_node (cond) arg1 = cond_expand_word (cond->left->op, 0); if (arg1 == 0) arg1 = nullstr; - arg2 = cond_expand_word (cond->right->op, patmatch); + arg2 = cond_expand_word (cond->right->op, patmatch||rmatch); if (arg2 == 0) arg2 = nullstr; @@ -2614,7 +2672,10 @@ execute_null_command (redirects, pipe_in, pipe_out, async) do_piping (pipe_in, pipe_out); - subshell_environment = SUBSHELL_ASYNC; + if (async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; if (do_redirections (redirects, RX_ACTIVE) == 0) exit (EXECUTION_SUCCESS); @@ -2709,7 +2770,11 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) command_string_index = 0; print_simple_command (simple_command); +#if 0 if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0))) +#else + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) +#endif { FREE (the_printed_command_except_trap); the_printed_command_except_trap = the_printed_command ? savestring (the_printed_command) : (char *)0; @@ -2983,7 +3048,7 @@ execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close) } if (command_line == 0) - command_line = savestring (the_printed_command); + command_line = savestring (the_printed_command_except_trap); execute_disk_command (words, simple_command->redirects, command_line, pipe_in, pipe_out, async, fds_to_close, @@ -3342,7 +3407,7 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, struct fd_bitmap *fds_to_close; int flags; { - int result, r; + int result, r, funcvalue; #if defined (JOB_CONTROL) int jobs_hack; @@ -3353,7 +3418,10 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, /* A subshell is neither a login shell nor interactive. */ login_shell = interactive = 0; - subshell_environment = SUBSHELL_ASYNC; + if (async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + subshell_environment |= SUBSHELL_PIPE; maybe_make_export_env (); /* XXX - is this needed? */ @@ -3387,10 +3455,18 @@ execute_subshell_builtin_or_function (words, redirects, builtin, var, so we don't go back up to main(). */ result = setjmp (top_level); + /* Give the return builtin a place to jump to when executed in a subshell + or pipeline */ + funcvalue = 0; + if (return_catch_flag && builtin == return_builtin) + funcvalue = setjmp (return_catch); + if (result == EXITPROG) exit (last_command_exit_value); else if (result) exit (EXECUTION_FAILURE); + else if (funcvalue) + exit (return_catch_value); else { r = execute_builtin (builtin, words, flags, 1); @@ -148,6 +148,7 @@ static intmax_t tokval; /* current token value */ static int noeval; /* set to 1 if no assignment to be done */ static procenv_t evalbuf; +static int _is_arithop __P((int)); static void readtok __P((void)); /* lexical analyzer */ static intmax_t expr_streval __P((char *, int)); @@ -949,6 +950,64 @@ expr_streval (tok, e) return (tval); } +static int +_is_multiop (c) + int c; +{ + switch (c) + { + case EQEQ: + case NEQ: + case LEQ: + case GEQ: + case LAND: + case LOR: + case LSH: + case RSH: + case OP_ASSIGN: + case COND: + case POWER: + case PREINC: + case PREDEC: + case POSTINC: + case POSTDEC: + return 1; + default: + return 0; + } +} + +static int +_is_arithop (c) + int c; +{ + switch (c) + { + case EQ: + case GT: + case LT: + case PLUS: + case MINUS: + case MUL: + case DIV: + case MOD: + case NOT: + case LPAR: + case RPAR: + case BAND: + case BOR: + case BXOR: + case BNOT: + return 1; /* operator tokens */ + case QUES: + case COL: + case COMMA: + return 1; /* questionable */ + default: + return 0; /* anything else is invalid */ + } +} + /* Lexical analyzer/token reader for the expression evaluator. Reads the next token and puts its value into curtok, while advancing past it. Updates value of tp. May also set tokval (for number) or tokstr (for @@ -1104,8 +1163,22 @@ readtok () assigntok = c; /* a OP= b */ c = OP_ASSIGN; } + else if (_is_arithop (c) == 0) + { + cp--; + /* use curtok, since it hasn't been copied to lasttok yet */ + if (curtok == 0 || _is_arithop (curtok) || _is_multiop (curtok)) + evalerror (_("syntax error: operand expected")); + else + evalerror (_("syntax error: invalid arithmetic operator")); + } else cp--; /* `unget' the character */ + + /* Should check here to make sure that the current character is one + of the recognized operators and flag an error if not. Could create + a character map the first time through and check it on subsequent + calls. */ lasttok = curtok; curtok = c; } @@ -112,6 +112,7 @@ extern void set_default_locale __P((void)); extern void set_default_locale_vars __P((void)); extern int set_locale_var __P((char *, char *)); extern int set_lang __P((char *, char *)); +extern void set_default_lang __P((void)); extern char *get_locale_var __P((char *)); extern char *localetrans __P((char *, int, int *)); extern char *mk_msgstr __P((char *, int *)); @@ -225,6 +226,9 @@ extern char *sh_realpath __P((const char *, char *)); extern int sh_setlinebuf __P((FILE *)); #endif +/* declarations for functions defined in lib/sh/shaccess.c */ +extern int sh_eaccess __P((char *, int)); + /* declarations for functions defined in lib/sh/shmatch.c */ extern int sh_regmatch __P((const char *, const char *, int)); @@ -251,7 +255,7 @@ extern int strcasecmp __P((const char *, const char *)); #endif /* HAVE_STRCASECMP */ /* declarations for functions defined in lib/sh/strerror.c */ -#if !defined (strerror) +#if !defined (HAVE_STRERROR) && !defined (strerror) extern char *strerror __P((int)); #endif @@ -48,7 +48,6 @@ extern int errno; #endif /* !errno */ extern int expand_aliases; -extern int interrupt_immediately; extern int interactive_comments; extern int check_hashed_filenames; extern int source_uses_path; @@ -477,8 +476,13 @@ check_binary_file (sample, sample_len) if (c == '\n') return (0); +#if 0 if (ISSPACE (c) == 0 && ISPRINT (c) == 0) +#else + if (c == '\0') +#endif return (1); + } return (0); @@ -503,7 +507,7 @@ int file_iswdir (fn) char *fn; { - return (file_isdir (fn) && test_eaccess (fn, W_OK) == 0); + return (file_isdir (fn) && sh_eaccess (fn, W_OK) == 0); } /* Return 1 if STRING contains an absolute pathname, else 0. Used by `cd' @@ -41,11 +41,14 @@ #include "input.h" #include "error.h" #include "externs.h" +#include "quit.h" #if !defined (errno) extern int errno; #endif /* !errno */ +extern void termsig_handler __P((int)); + /* Functions to handle reading input on systems that don't restart read(2) if a signal is received. */ @@ -61,11 +64,14 @@ getc_with_restart (stream) { unsigned char uc; + CHECK_TERMSIG; + /* Try local buffering to reduce the number of read(2) calls. */ if (local_index == local_bufused || local_bufused == 0) { while (1) { + CHECK_TERMSIG; local_bufused = read (fileno (stream), localbuf, sizeof(localbuf)); if (local_bufused > 0) break; @@ -446,6 +452,7 @@ b_fill_buffer (bp) { ssize_t nr; + CHECK_TERMSIG; nr = zread (bp->b_fd, bp->b_buffer, bp->b_size); if (nr <= 0) { @@ -513,6 +520,8 @@ sync_buffered_stream (bfd) int buffered_getchar () { + CHECK_TERMSIG; + #if !defined (DJGPP) return (bufstream_getc (buffers[bash_input.location.buffered_fd])); #else @@ -100,7 +100,7 @@ extern int stream_on_stack __P((enum stream_type)); extern char *read_secondary_line __P((int)); extern int find_reserved_word __P((char *)); extern void gather_here_documents __P((void)); -extern void execute_prompt_command __P((char *)); +extern void execute_variable_command __P((char *, char *)); extern int *save_token_state __P((void)); extern void restore_token_state __P((int *)); @@ -3,7 +3,7 @@ /* This file works with both POSIX and BSD systems. It implements job control. */ -/* Copyright (C) 1989-2005 Free Software Foundation, Inc. +/* Copyright (C) 1989-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -77,7 +77,15 @@ extern int errno; #endif /* !errno */ #define DEFAULT_CHILD_MAX 32 -#define MAX_JOBS_IN_ARRAY 4096 /* testing */ +#if !defined (DEBUG) +#define MAX_JOBS_IN_ARRAY 4096 /* production */ +#else +#define MAX_JOBS_IN_ARRAY 128 /* testing */ +#endif + +/* Flag values for second argument to delete_job */ +#define DEL_WARNSTOPPED 1 /* warn about deleting stopped jobs */ +#define DEL_NOBGPID 2 /* don't add pgrp leader to bgpids */ /* Take care of system dependencies that must be handled when waiting for children. The arguments to the WAITPID macro match those to the Posix.1 @@ -134,10 +142,10 @@ typedef int sh_job_map_func_t __P((JOB *, int, int, int)); /* Variables used here but defined in other files. */ extern int subshell_environment, line_number; extern int posixly_correct, shell_level; -extern int interrupt_immediately; extern int last_command_exit_value, last_command_exit_signal; extern int loop_level, breaking; extern int sourcelevel; +extern int running_trap; extern sh_builtin_func_t *this_shell_builtin; extern char *shell_name, *this_command_name; extern sigset_t top_level_mask; @@ -307,6 +315,10 @@ static int jobs_list_frozen; static char retcode_name_buffer[64]; +/* flags to detect pid wraparound */ +static pid_t first_pid = NO_PID; +static int pid_wrap = -1; + #if !defined (_POSIX_VERSION) /* These are definitions to map POSIX 1003.1 functions onto existing BSD @@ -328,11 +340,13 @@ tcgetpgrp (fd) #endif /* !_POSIX_VERSION */ -/* Initialize the global job stats structure. */ +/* Initialize the global job stats structure and other bookkeeping variables */ void init_job_stats () { js = zerojs; + first_pid = NO_PID; + pid_wrap = -1; } /* Return the working directory for the current process. Unlike @@ -619,8 +633,11 @@ stop_pipeline (async, deferred) * once in the parent and once in each child. This is where * the parent gives it away. * + * Don't give the terminal away if this shell is an asynchronous + * subshell. + * */ - if (job_control && newjob->pgrp) + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) give_terminal_to (newjob->pgrp, 0); } } @@ -743,7 +760,7 @@ bgp_search (pid) static void bgp_prune () { - struct pidstat *ps, *p; + struct pidstat *ps; while (bgpids.npid > js.c_childmax) { @@ -805,12 +822,14 @@ cleanup_dead_jobs () QUEUE_SIGCHLD(os); - /* XXX could use js.j_firstj here */ + /* XXX could use js.j_firstj and js.j_lastj here */ for (i = 0; i < js.j_jobslots; i++) { #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("cleanup_dead_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("cleanup_dead_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i)) @@ -837,6 +856,30 @@ processes_in_job (job) return nproc; } +static void +delete_old_job (pid) + pid_t pid; +{ + PROCESS *p; + int job; + + job = find_job (pid, 0, &p); + if (job != NO_JOB) + { +#ifdef DEBUG + itrace ("delete_old_job: found pid %d in job %d with state %d", pid, job, jobs[job]->state); +#endif + if (JOBSTATE (job) == JDEAD) + delete_job (job, DEL_NOBGPID); + else + { + internal_warning (_("forked pid %d appears in running job %d"), pid, job); + if (p) + p->pid = 0; + } + } +} + /* Reallocate and compress the jobs list. This returns with a jobs array whose size is a multiple of JOB_SLOTS and can hold the current number of jobs. Heuristics are used to minimize the number of new reallocs. */ @@ -844,9 +887,10 @@ static void realloc_jobs_list () { sigset_t set, oset; - int nsize, i, j; + int nsize, i, j, ncur, nprev; JOB **nlist; + ncur = nprev = NO_JOB; nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS); nsize *= JOB_SLOTS; i = js.j_njobs % JOB_SLOTS; @@ -854,17 +898,51 @@ realloc_jobs_list () nsize += JOB_SLOTS; BLOCK_CHILD (set, oset); - nlist = (JOB **) xmalloc (nsize * sizeof (JOB *)); + nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *)); + for (i = j = 0; i < js.j_jobslots; i++) if (jobs[i]) - nlist[j++] = jobs[i]; + { + if (i == js.j_current) + ncur = j; + if (i == js.j_previous) + nprev = j; + nlist[j++] = jobs[i]; + } + +#if defined (DEBUG) + itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize); + itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0); + itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0); +#endif js.j_firstj = 0; - js.j_lastj = (j > 0) ? j - 1: 0; + js.j_lastj = (j > 0) ? j - 1 : 0; + js.j_njobs = j; js.j_jobslots = nsize; - free (jobs); - jobs = nlist; + /* Zero out remaining slots in new jobs list */ + for ( ; j < nsize; j++) + nlist[j] = (JOB *)NULL; + + if (jobs != nlist) + { + free (jobs); + jobs = nlist; + } + + if (ncur != NO_JOB) + js.j_current = ncur; + if (nprev != NO_JOB) + js.j_previous = nprev; + + /* Need to reset these */ + if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj) + reset_current (); + +#ifdef DEBUG + itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous); +#endif UNBLOCK_CHILD (oset); } @@ -873,7 +951,7 @@ realloc_jobs_list () the jobs array to some predefined maximum. Called when the shell is not the foreground process (subshell_environment != 0). Returns the first available slot in the compacted list. If that value is js.j_jobslots, then - the list needs to be reallocated. The jobs array is in new memory if + the list needs to be reallocated. The jobs array may be in new memory if this returns > 0 and < js.j_jobslots. FLAGS is reserved for future use. */ static int compact_jobs_list (flags) @@ -891,29 +969,33 @@ compact_jobs_list (flags) /* Delete the job at INDEX from the job list. Must be called with SIGCHLD blocked. */ void -delete_job (job_index, warn_stopped) - int job_index, warn_stopped; +delete_job (job_index, dflags) + int job_index, dflags; { register JOB *temp; PROCESS *proc; - int ndel, status; - pid_t pid; + int ndel; if (js.j_jobslots == 0 || jobs_list_frozen) return; - if (warn_stopped && subshell_environment == 0 && STOPPED (job_index)) + if ((dflags & DEL_WARNSTOPPED) && subshell_environment == 0 && STOPPED (job_index)) internal_warning (_("deleting stopped job %d with process group %ld"), job_index+1, (long)jobs[job_index]->pgrp); temp = jobs[job_index]; + if (temp == 0) + return; if (job_index == js.j_current || job_index == js.j_previous) reset_current (); - proc = find_last_proc (job_index, 0); - /* Could do this just for J_ASYNC jobs, but we save all. */ - bgp_add (proc->pid, process_exit_status (proc->status)); + if ((dflags & DEL_NOBGPID) == 0) + { + proc = find_last_proc (job_index, 0); + /* Could do this just for J_ASYNC jobs, but we save all. */ + if (proc) + bgp_add (proc->pid, process_exit_status (proc->status)); + } jobs[job_index] = (JOB *)NULL; - if (temp == js.j_lastmade) js.j_lastmade = 0; else if (temp == js.j_lastasync) @@ -1091,6 +1173,8 @@ map_over_jobs (func, arg1, arg2) #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("map_over_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("map_over_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i]) { @@ -1145,8 +1229,9 @@ hangup_all_jobs () { if (jobs[i]) { - if ((jobs[i]->flags & J_NOHUP) == 0) - killpg (jobs[i]->pgrp, SIGHUP); + if (jobs[i]->flags & J_NOHUP) + continue; + killpg (jobs[i]->pgrp, SIGHUP); if (STOPPED (i)) killpg (jobs[i]->pgrp, SIGCONT); } @@ -1223,12 +1308,14 @@ find_job (pid, alive_only, procp) register int i; PROCESS *p; - /* XXX could use js.j_firstj here */ + /* XXX could use js.j_firstj here, and should check js.j_lastj */ for (i = 0; i < js.j_jobslots; i++) { #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("find_job: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("find_job: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i]) { @@ -1655,7 +1742,7 @@ make_child (command, async_p) In this case, we don't want to give the terminal to the shell's process group (we could be in the middle of a pipeline, for example). */ - if (async_p == 0 && pipeline_pgrp != shell_pgrp) + if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0)) give_terminal_to (pipeline_pgrp, 0); #if defined (PGRP_PIPE) @@ -1697,6 +1784,13 @@ make_child (command, async_p) /* In the parent. Remember the pid of the child just created as the proper pgrp if this is the first child. */ + if (first_pid == NO_PID) + first_pid = pid; + else if (pid_wrap == -1 && pid < first_pid) + pid_wrap = 0; + else if (pid_wrap == 0 && pid >= first_pid) + pid_wrap = 1; + if (job_control) { if (pipeline_pgrp == 0) @@ -1730,6 +1824,9 @@ make_child (command, async_p) last_asynchronous_pid = 1; #endif + if (pid_wrap > 0) + delete_old_job (pid); + #if !defined (RECYCLES_PIDS) /* Only check for saved status if we've saved more than CHILD_MAX statuses, unless the system recycles pids. */ @@ -1914,7 +2011,7 @@ find_last_proc (job, block) BLOCK_CHILD (set, oset); p = jobs[job]->pipe; - while (p->next != jobs[job]->pipe) + while (p && p->next != jobs[job]->pipe) p = p->next; if (block) @@ -1998,12 +2095,14 @@ wait_for_background_pids () BLOCK_CHILD (set, oset); /* find first running job; if none running in foreground, break */ - /* XXX could use js.j_firstj here */ + /* XXX could use js.j_firstj and js.j_lastj here */ for (i = 0; i < js.j_jobslots; i++) { #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("wait_for_background_pids: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("wait_for_background_pids: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0) break; @@ -2198,7 +2297,11 @@ wait_for (pid) /* This is possibly a race condition -- should it go in stop_pipeline? */ wait_sigint_received = 0; if (job_control == 0) - old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + { + old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler); + if (old_sigint_handler == SIG_IGN) + set_signal_handler (SIGINT, old_sigint_handler); + } termination_state = last_command_exit_value; @@ -2265,6 +2368,7 @@ wait_for (pid) { child->running = PS_DONE; child->status = 0; /* XXX -- can't find true status */ + js.c_living = 0; /* no living child processes */ if (job != NO_JOB) { jobs[job]->state = JDEAD; @@ -2316,7 +2420,6 @@ wait_for (pid) if (job == NO_JOB) itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp (%ld)", (long)shell_pgrp); #endif - give_terminal_to (shell_pgrp, 0); } @@ -2722,14 +2825,14 @@ start_job (job, foreground) if (foreground) { pid_t pid; - int s; + int st; pid = find_last_pid (job, 0); UNBLOCK_CHILD (oset); - s = wait_for (pid); + st = wait_for (pid); shell_tty_info = save_stty; set_tty_state (); - return (s); + return (st); } else { @@ -2865,6 +2968,7 @@ waitchld (wpid, block) : 0; if (sigchld || block == 0) waitpid_flags |= WNOHANG; + CHECK_TERMSIG; pid = WAITPID (-1, &status, waitpid_flags); /* WCONTINUED may be rejected by waitpid as invalid even when defined */ @@ -2891,13 +2995,17 @@ waitchld (wpid, block) /* If waitpid returns 0, there are running children. If it returns -1, the only other error POSIX says it can return is EINTR. */ + CHECK_TERMSIG; if (pid <= 0) continue; /* jumps right to the test */ /* children_exited is used to run traps on SIGCHLD. We don't want to run the trap if a process is just being continued. */ if (WIFCONTINUED(status) == 0) - children_exited++; + { + children_exited++; + js.c_living--; + } /* Locate our PROCESS for this pid. */ child = find_process (pid, 1, &job); /* want living procs only */ @@ -3122,7 +3230,7 @@ set_job_status_and_cleanup (job) temp_handler = trap_to_sighandler (SIGINT); restore_sigint_handler (); if (temp_handler == SIG_DFL) - termination_unwind_protect (SIGINT); + termsig_handler (SIGINT); else if (temp_handler != SIG_IGN) (*temp_handler) (SIGINT); } @@ -3637,9 +3745,11 @@ delete_all_jobs (running_only) #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("delete_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("delete_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i)))) - delete_job (i, 1); + delete_job (i, DEL_WARNSTOPPED); } if (running_only == 0) { @@ -3691,6 +3801,8 @@ count_all_jobs () #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("count_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("count_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i] && DEADJOB(i) == 0) n++; @@ -3764,6 +3876,8 @@ mark_dead_jobs_as_notified (force) #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif if (jobs[i] && DEADJOB (i)) { @@ -3815,6 +3929,8 @@ itrace("mark_dead_jobs_as_notified: child_max = %d ndead = %d ndeadproc = %d", j #if defined (DEBUG) if (i < js.j_firstj && jobs[i]) itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj); + if (i > js.j_lastj && jobs[i]) + itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj); #endif /* If marking this job as notified would drop us down below child_max, don't mark it so we can keep at least child_max diff --git a/lib/glob/Makefile.in b/lib/glob/Makefile.in index 9bb4dd36..9f53a7b2 100644 --- a/lib/glob/Makefile.in +++ b/lib/glob/Makefile.in @@ -33,7 +33,7 @@ CC = @CC@ RANLIB = @RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ -RM = rm +RM = rm -f CP = cp MV = mv @@ -59,6 +59,7 @@ CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} \ # Here is a rule for making .o files from .c files that doesn't force # the type of the machine (like -sun3) into the flags. .c.o: + $(RM) $@ $(CC) -c $(CCFLAGS) $< # The name of the library target. diff --git a/lib/glob/glob.c b/lib/glob/glob.c index 9a2d8330..08a7da85 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -73,7 +73,7 @@ #endif extern void throw_to_top_level __P((void)); -extern int test_eaccess __P((char *, int)); +extern int sh_eaccess __P((char *, int)); extern int extended_glob; @@ -184,7 +184,7 @@ mbskipname (pat, dname) { int ret; wchar_t *pat_wc, *dn_wc; - size_t pat_n, dn_n, n; + size_t pat_n, dn_n; pat_n = xdupmbstowcs (&pat_wc, NULL, pat); dn_n = xdupmbstowcs (&dn_wc, NULL, dname); @@ -293,7 +293,7 @@ dequote_pathname (pathname) # define GLOB_TESTNAME(name) (lstat (name, &finfo)) #else /* !HAVE_LSTAT */ # if !defined (AFS) -# define GLOB_TESTNAME(name) (test_eaccess (nextname, F_OK)) +# define GLOB_TESTNAME(name) (sh_eaccess (nextname, F_OK)) # else /* AFS */ # define GLOB_TESTNAME(name) (access (nextname, F_OK)) # endif /* AFS */ @@ -360,6 +360,7 @@ glob_vector (pat, dir, flags) count = lose = skip = 0; firstmalloc = 0; + nalloca = 0; /* If PAT is empty, skip the loop, but return one (empty) filename. */ if (pat == 0 || *pat == '\0') @@ -469,7 +470,7 @@ glob_vector (pat, dir, flags) while (1) { /* Make globbing interruptible in the shell. */ - if (interrupt_state) + if (interrupt_state || terminating_signal) { lose = 1; break; @@ -540,12 +541,17 @@ glob_vector (pat, dir, flags) /* Here free the strings we have got. */ while (lastlink) { + /* Since we build the list in reverse order, the first N entries + will be allocated with malloc, if firstmalloc is set, from + lastlink to firstmalloc. */ if (firstmalloc) { if (lastlink == firstmalloc) firstmalloc = 0; tmplink = lastlink; } + else + tmplink = 0; free (lastlink->name); lastlink = lastlink->next; FREE (tmplink); diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c index 6e8cf3af..41b0759a 100644 --- a/lib/glob/sm_loop.c +++ b/lib/glob/sm_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2005 Free Software Foundation, Inc. +/* Copyright (C) 1991-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ - int FCT __P((CHAR *, CHAR *, int)); static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, int)); @@ -638,12 +637,13 @@ EXTMATCH (xc, s, se, p, pe, flags) CHAR *psub; /* pointer to sub-pattern */ CHAR *pnext; /* pointer to next sub-pattern */ CHAR *srest; /* pointer to rest of string */ - int m1, m2; + int m1, m2, xflags; /* xflags = flags passed to recursive matches */ #if DEBUG_MATCHING fprintf(stderr, "extmatch: xc = %c\n", xc); fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se); fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); +fprintf(stderr, "extmatch: flags = %d\n", flags); #endif prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */ @@ -677,8 +677,12 @@ fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); string matches the rest of the pattern. Also handle multiple matches of the pattern. */ if (m1) - m2 = (GMATCH (srest, se, prest, pe, flags) == 0) || - (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0); + { + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; + m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) || + (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0); + } if (m1 && m2) return (0); } @@ -688,7 +692,7 @@ fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); return (FNM_NOMATCH); case L('?'): /* match zero or one of the patterns */ - case L('@'): /* match exactly one of the patterns */ + case L('@'): /* match one (or more) of the patterns */ /* If we can get away with no matches, don't even bother. Just call gmatch on the rest of the pattern and return success if it succeeds. */ @@ -704,8 +708,10 @@ fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); srest = (prest == pe) ? se : s; for ( ; srest <= se; srest++) { + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 && - GMATCH (srest, se, prest, pe, flags) == 0) + GMATCH (srest, se, prest, pe, xflags) == 0) return (0); } if (pnext == prest) @@ -726,7 +732,9 @@ fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe); if (pnext == prest) break; } - if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0) + /* if srest > s, we are not at start of string */ + xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags; + if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0) return (0); } return (FNM_NOMATCH); diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c index 12fde3d0..be4f927c 100644 --- a/lib/glob/smatch.c +++ b/lib/glob/smatch.c @@ -247,7 +247,6 @@ rangecmp_wc (c1, c2) { static wchar_t s1[2] = { L' ', L'\0' }; static wchar_t s2[2] = { L' ', L'\0' }; - int ret; if (c1 == c2) return 0; diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c index f8c29b91..83b67b40 100644 --- a/lib/glob/xmbsrtowcs.c +++ b/lib/glob/xmbsrtowcs.c @@ -145,7 +145,8 @@ xdupmbstowcs (destp, indicesp, src) /* In case SRC or DESP is NULL, conversion doesn't take place. */ if (src == NULL || destp == NULL) { - *destp = NULL; + if (destp) + *destp = NULL; return (size_t)-1; } diff --git a/lib/malloc/stats.c b/lib/malloc/stats.c index 18c3cef5..0d119fab 100644 --- a/lib/malloc/stats.c +++ b/lib/malloc/stats.c @@ -28,6 +28,7 @@ #ifdef HAVE_UNISTD_H # include <unistd.h> #endif +#include <string.h> #include "mstats.h" diff --git a/lib/malloc/table.c b/lib/malloc/table.c index ee37b3a7..b9310a6a 100644 --- a/lib/malloc/table.c +++ b/lib/malloc/table.c @@ -22,6 +22,7 @@ #endif #include <stdio.h> +#include <string.h> #include "imalloc.h" #include "table.h" diff --git a/lib/malloc/xleaktrace b/lib/malloc/xleaktrace index 573437c2..d7e3cd55 100755 --- a/lib/malloc/xleaktrace +++ b/lib/malloc/xleaktrace @@ -5,6 +5,10 @@ # # NOTE: we ignore `realloc' tags because they're just extra information # +# Copyright (c) 2001 Chester Ramey +# Permission is hereby granted to deal in this Software without restriction. +# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. +# # Chet Ramey # chet@po.cwru.edu # diff --git a/lib/readline/bind.c b/lib/readline/bind.c index 7559d32f..08c906bf 100644 --- a/lib/readline/bind.c +++ b/lib/readline/bind.c @@ -1,6 +1,6 @@ /* bind.c -- key binding and startup file support for the readline library. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for reading lines of text with interactive input and history editing. @@ -370,7 +370,10 @@ rl_generic_bind (type, keyseq, data, map) ic = uc; if (ic < 0 || ic >= KEYMAP_SIZE) - return -1; + { + free (keys); + return -1; + } if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { @@ -462,12 +465,21 @@ rl_translate_keyseq (seq, array, len) } else if (c == 'M') { - i++; - /* XXX - should obey convert-meta setting? */ + i++; /* seq[i] == '-' */ + /* XXX - obey convert-meta setting */ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP) array[l++] = ESC; /* ESC is meta-prefix */ + else if (seq[i+1] == '\\' && seq[i+2] == 'C' && seq[i+3] == '-') + { + i += 4; + temp = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i])); + array[l++] = META (temp); + } else { + /* This doesn't yet handle things like \M-\a, which may + or may not have any reasonable meaning. You're + probably better off using straight octal or hex. */ i++; array[l++] = META (seq[i]); } @@ -565,6 +577,11 @@ rl_untranslate_keyseq (seq) kseq[i++] = '-'; c = UNMETA (c); } + else if (c == ESC) + { + kseq[i++] = '\\'; + c = 'e'; + } else if (CTRL_CHAR (c)) { kseq[i++] = '\\'; @@ -613,7 +630,12 @@ _rl_untranslate_macro_value (seq) *r++ = '-'; c = UNMETA (c); } - else if (CTRL_CHAR (c) && c != ESC) + else if (c == ESC) + { + *r++ = '\\'; + c = 'e'; + } + else if (CTRL_CHAR (c)) { *r++ = '\\'; *r++ = 'C'; @@ -672,7 +694,7 @@ rl_function_of_keyseq (keyseq, map, type) { register int i; - if (!map) + if (map == 0) map = _rl_keymap; for (i = 0; keyseq && keyseq[i]; i++) @@ -681,25 +703,27 @@ rl_function_of_keyseq (keyseq, map, type) if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { - if (map[ESC].type != ISKMAP) + if (map[ESC].type == ISKMAP) + { + map = FUNCTION_TO_KEYMAP (map, ESC); + ic = UNMETA (ic); + } + /* XXX - should we just return NULL here, since this obviously + doesn't match? */ + else { if (type) *type = map[ESC].type; return (map[ESC].function); } - else - { - map = FUNCTION_TO_KEYMAP (map, ESC); - ic = UNMETA (ic); - } } if (map[ic].type == ISKMAP) { /* If this is the last key in the key sequence, return the map. */ - if (!keyseq[i + 1]) + if (keyseq[i + 1] == '\0') { if (type) *type = ISKMAP; @@ -709,7 +733,12 @@ rl_function_of_keyseq (keyseq, map, type) else map = FUNCTION_TO_KEYMAP (map, ic); } - else + /* If we're not at the end of the key sequence, and the current key + is bound to something other than a keymap, then the entire key + sequence is not bound. */ + else if (map[ic].type != ISKMAP && keyseq[i+1]) + return ((rl_command_func_t *)NULL); + else /* map[ic].type != ISKMAP && keyseq[i+1] == 0 */ { if (type) *type = map[ic].type; @@ -791,6 +820,7 @@ rl_re_read_init_file (count, ignore) 1. the filename used for the previous call 2. the value of the shell variable `INPUTRC' 3. ~/.inputrc + 4. /etc/inputrc If the file existed and could be opened and read, 0 is returned, otherwise errno is returned. */ int @@ -799,17 +829,18 @@ rl_read_init_file (filename) { /* Default the filename. */ if (filename == 0) + filename = last_readline_init_file; + if (filename == 0) + filename = sh_get_env_value ("INPUTRC"); + if (filename == 0 || *filename == 0) { - filename = last_readline_init_file; - if (filename == 0) - filename = sh_get_env_value ("INPUTRC"); - if (filename == 0) - filename = DEFAULT_INPUTRC; + filename = DEFAULT_INPUTRC; + /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */ + if (_rl_read_init_file (filename, 0) == 0) + return 0; + filename = SYS_INPUTRC; } - if (*filename == 0) - filename = DEFAULT_INPUTRC; - #if defined (__MSDOS__) if (_rl_read_init_file (filename, 0) == 0) return 0; @@ -1506,8 +1537,6 @@ rl_variable_value (name) const char *name; { register int i; - int v; - char *ret; /* Check for simple variables first. */ i = find_boolean_var (name); @@ -1948,12 +1977,16 @@ rl_invoking_keyseqs_in_map (function, map) char *keyname = (char *)xmalloc (6 + strlen (seqs[i])); if (key == ESC) -#if 0 - sprintf (keyname, "\\e"); -#else - /* XXX - experimental */ - sprintf (keyname, "\\M-"); -#endif + { + /* If ESC is the meta prefix and we're converting chars + with the eighth bit set to ESC-prefixed sequences, then + we can use \M-. Otherwise we need to use the sequence + for ESC. */ + if (_rl_convert_meta_chars_to_ascii && map[ESC].type == ISKMAP) + sprintf (keyname, "\\M-"); + else + sprintf (keyname, "\\e"); + } else if (CTRL_CHAR (key)) sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key))); else if (key == RUBOUT) @@ -2170,7 +2203,6 @@ _rl_get_string_variable_value (name) { static char numbuf[32]; char *ret; - int n; if (_rl_stricmp (name, "bell-style") == 0) { diff --git a/lib/readline/callback.c b/lib/readline/callback.c index 9120969c..ada04d85 100644 --- a/lib/readline/callback.c +++ b/lib/readline/callback.c @@ -43,6 +43,7 @@ #include "rldefs.h" #include "readline.h" #include "rlprivate.h" +#include "xmalloc.h" /* Private data for callback registration functions. See comments in rl_callback_read_char for more details. */ @@ -124,73 +125,73 @@ rl_callback_read_char () return; } - if (RL_ISSTATE (RL_STATE_ISEARCH)) + do { - eof = _rl_isearch_callback (_rl_iscxt); - if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) - rl_callback_read_char (); - - return; - } - else if (RL_ISSTATE (RL_STATE_NSEARCH)) - { - eof = _rl_nsearch_callback (_rl_nscxt); - return; - } - else if (RL_ISSTATE (RL_STATE_NUMERICARG)) - { - eof = _rl_arg_callback (_rl_argcxt); - if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) - rl_callback_read_char (); - /* XXX - this should handle _rl_last_command_was_kill better */ - else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) - _rl_internal_char_cleanup (); + if (RL_ISSTATE (RL_STATE_ISEARCH)) + { + eof = _rl_isearch_callback (_rl_iscxt); + if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) + rl_callback_read_char (); - return; - } - else if (RL_ISSTATE (RL_STATE_MULTIKEY)) - { - eof = _rl_dispatch_callback (_rl_kscxt); /* For now */ - while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED)) - eof = _rl_dispatch_callback (_rl_kscxt); - if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0) + return; + } + else if (RL_ISSTATE (RL_STATE_NSEARCH)) { - _rl_internal_char_cleanup (); - _rl_want_redisplay = 1; + eof = _rl_nsearch_callback (_rl_nscxt); + return; } - } - else if (_rl_callback_func) - { - /* This allows functions that simply need to read an additional character - (like quoted-insert) to register a function to be called when input is - available. _rl_callback_data is simply a pointer to a struct that has - the argument count originally passed to the registering function and - space for any additional parameters. */ - eof = (*_rl_callback_func) (_rl_callback_data); - /* If the function `deregisters' itself, make sure the data is cleaned - up. */ - if (_rl_callback_func == 0) + else if (RL_ISSTATE (RL_STATE_NUMERICARG)) + { + eof = _rl_arg_callback (_rl_argcxt); + if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) + rl_callback_read_char (); + /* XXX - this should handle _rl_last_command_was_kill better */ + else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) + _rl_internal_char_cleanup (); + + return; + } + else if (RL_ISSTATE (RL_STATE_MULTIKEY)) { - if (_rl_callback_data) + eof = _rl_dispatch_callback (_rl_kscxt); /* For now */ + while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED)) + eof = _rl_dispatch_callback (_rl_kscxt); + if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0) { - _rl_callback_data_dispose (_rl_callback_data); - _rl_callback_data = 0; + _rl_internal_char_cleanup (); + _rl_want_redisplay = 1; } - _rl_internal_char_cleanup (); } - } - else - eof = readline_internal_char (); + else if (_rl_callback_func) + { + /* This allows functions that simply need to read an additional + character (like quoted-insert) to register a function to be + called when input is available. _rl_callback_data is simply a + pointer to a struct that has the argument count originally + passed to the registering function and space for any additional + parameters. */ + eof = (*_rl_callback_func) (_rl_callback_data); + /* If the function `deregisters' itself, make sure the data is + cleaned up. */ + if (_rl_callback_func == 0) + { + if (_rl_callback_data) + { + _rl_callback_data_dispose (_rl_callback_data); + _rl_callback_data = 0; + } + _rl_internal_char_cleanup (); + } + } + else + eof = readline_internal_char (); - if (rl_done == 0 && _rl_want_redisplay) - { - (*rl_redisplay_function) (); - _rl_want_redisplay = 0; - } + if (rl_done == 0 && _rl_want_redisplay) + { + (*rl_redisplay_function) (); + _rl_want_redisplay = 0; + } - /* We loop in case some function has pushed input back with rl_execute_next. */ - for (;;) - { if (rl_done) { line = readline_internal_teardown (eof); @@ -212,11 +213,8 @@ rl_callback_read_char () if (in_handler == 0 && rl_linefunc) _rl_callback_newline (); } - if (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT)) - eof = readline_internal_char (); - else - break; } + while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT)); } /* Remove the handler, and make sure the terminal is in its normal state. */ diff --git a/lib/readline/complete.c b/lib/readline/complete.c index d93c15ae..73f834a6 100644 --- a/lib/readline/complete.c +++ b/lib/readline/complete.c @@ -950,7 +950,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) rl_compentry_func_t *our_func; int found_quote, quote_char; { - char **matches, *temp; + char **matches; rl_completion_found_quote = found_quote; rl_completion_quote_character = quote_char; @@ -969,21 +969,9 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) } } - /* Beware -- we're stripping the quotes here. Do this only if we know - we are doing filename completion and the application has defined a - filename dequoting function. */ - temp = (char *)NULL; - - if (found_quote && our_func == rl_filename_completion_function && - rl_filename_dequoting_function) - { - /* delete single and double quotes */ - temp = (*rl_filename_dequoting_function) (text, quote_char); - text = temp; /* not freeing text is not a memory leak */ - } + /* XXX -- filename dequoting moved into rl_filename_completion_function */ matches = rl_completion_matches (text, our_func); - FREE (temp); return matches; } @@ -1116,7 +1104,8 @@ compute_lcd_of_matches (match_list, matches, text) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { - mbstate_t ps_back = ps1; + mbstate_t ps_back; + ps_back = ps1; if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2)) break; else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1) @@ -1974,13 +1963,30 @@ rl_filename_completion_function (text, state) if (rl_directory_rewrite_hook) (*rl_directory_rewrite_hook) (&dirname); + /* The directory completion hook should perform any necessary + dequoting. */ if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) { free (users_dirname); users_dirname = savestring (dirname); } - + else if (rl_completion_found_quote && rl_filename_dequoting_function) + { + /* delete single and double quotes */ + temp = (*rl_filename_dequoting_function) (users_dirname, rl_completion_quote_character); + free (users_dirname); + users_dirname = temp; + } directory = opendir (dirname); + + /* Now dequote a non-null filename. */ + if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function) + { + /* delete single and double quotes */ + temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character); + free (filename); + filename = temp; + } filename_len = strlen (filename); rl_filename_completion_desired = 1; diff --git a/lib/readline/display.c b/lib/readline/display.c index b22521bf..47ff0615 100644 --- a/lib/readline/display.c +++ b/lib/readline/display.c @@ -1,6 +1,6 @@ /* display.c -- readline redisplay facility. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for reading lines of text with interactive input and history editing. @@ -59,10 +59,6 @@ extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ -#if defined (HACK_TERMCAP_MOTION) -extern char *_rl_term_forward_char; -#endif - static void update_line PARAMS((char *, char *, int, int, int, int)); static void space_to_eol PARAMS((int)); static void delete_chars PARAMS((int)); @@ -80,9 +76,18 @@ static int *inv_lbreaks, *vis_lbreaks; static int inv_lbsize, vis_lbsize; /* Heuristic used to decide whether it is faster to move from CUR to NEW - by backing up or outputting a carriage return and moving forward. */ + by backing up or outputting a carriage return and moving forward. CUR + and NEW are either both buffer positions or absolute screen positions. */ #define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new))) +/* _rl_last_c_pos is an absolute cursor position in multibyte locales and a + buffer index in others. This macro is used when deciding whether the + current cursor position is in the middle of a prompt string containing + invisible characters. */ +#define PROMPT_ENDING_INDEX \ + ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1) + + /* **************************************************************** */ /* */ /* Display stuff */ @@ -135,6 +140,7 @@ int _rl_last_c_pos = 0; int _rl_last_v_pos = 0; static int cpos_adjusted; +static int cpos_buffer_position; /* Number of lines currently on screen minus 1. */ int _rl_vis_botlin = 0; @@ -162,6 +168,7 @@ static int line_size = 1024; include invisible characters. */ static char *local_prompt, *local_prompt_prefix; +static int local_prompt_len; static int prompt_visible_length, prompt_prefix_length; /* The number of invisible characters in the line currently being @@ -197,6 +204,7 @@ static char *saved_local_prefix; static int saved_last_invisible; static int saved_visible_length; static int saved_prefix_length; +static int saved_local_length; static int saved_invis_chars_first_line; static int saved_physical_chars; @@ -220,7 +228,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp) char *pmt; int *lp, *lip, *niflp, *vlp; { - char *r, *ret, *p; + char *r, *ret, *p, *igstart; int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars; /* Short-circuit if we can. */ @@ -244,19 +252,21 @@ expand_prompt (pmt, lp, lip, niflp, vlp) invfl = 0; /* invisible chars in first line of prompt */ invflset = 0; /* we only want to set invfl once */ + igstart = 0; for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */ - if (*p == RL_PROMPT_START_IGNORE) + if (ignoring == 0 && *p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */ { - ignoring++; + ignoring = 1; + igstart = p; continue; } else if (ignoring && *p == RL_PROMPT_END_IGNORE) { ignoring = 0; - if (p[-1] != RL_PROMPT_START_IGNORE) + if (p != (igstart + 1)) last = r - ret - 1; continue; } @@ -356,6 +366,7 @@ rl_expand_prompt (prompt) FREE (local_prompt_prefix); local_prompt = local_prompt_prefix = (char *)0; + local_prompt_len = 0; prompt_last_invisible = prompt_invis_chars_first_line = 0; prompt_visible_length = prompt_physical_chars = 0; @@ -371,6 +382,7 @@ rl_expand_prompt (prompt) &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)0; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; return (prompt_visible_length); } else @@ -389,6 +401,7 @@ rl_expand_prompt (prompt) &prompt_invis_chars_first_line, (int *)NULL); *t = c; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; return (prompt_prefix_length); } } @@ -445,7 +458,7 @@ rl_redisplay () { register int in, out, c, linenum, cursor_linenum; register char *line; - int c_pos, inv_botlin, lb_botlin, lb_linenum, o_cpos; + int inv_botlin, lb_botlin, lb_linenum, o_cpos; int newlines, lpos, temp, modmark, n0, num; char *prompt_this_line; #if defined (HANDLE_MULTIBYTE) @@ -469,7 +482,7 @@ rl_redisplay () } /* Draw the line into the buffer. */ - c_pos = -1; + cpos_buffer_position = -1; line = invisible_line; out = inv_botlin = 0; @@ -496,24 +509,23 @@ rl_redisplay () number of non-visible characters in the prompt string. */ if (rl_display_prompt == rl_prompt || local_prompt) { - int local_len = local_prompt ? strlen (local_prompt) : 0; if (local_prompt_prefix && forced_display) _rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix)); - if (local_len > 0) + if (local_prompt_len > 0) { - temp = local_len + out + 2; + temp = local_prompt_len + out + 2; if (temp >= line_size) { line_size = (temp + 1024) - (temp % 1024); visible_line = (char *)xrealloc (visible_line, line_size); line = invisible_line = (char *)xrealloc (invisible_line, line_size); } - strncpy (line + out, local_prompt, local_len); - out += local_len; + strncpy (line + out, local_prompt, local_prompt_len); + out += local_prompt_len; } line[out] = '\0'; - wrap_offset = local_len - prompt_visible_length; + wrap_offset = local_prompt_len - prompt_visible_length; } else { @@ -614,6 +626,7 @@ rl_redisplay () contents of the command line? */ while (lpos >= _rl_screenwidth) { + int z; /* fix from Darin Johnson <darin@acuson.com> for prompt string with invisible characters that is longer than the screen width. The prompt_invis_chars_first_line variable could be made into an array @@ -622,37 +635,46 @@ rl_redisplay () prompts that exceed two physical lines? Additional logic fix from Edward Catmur <ed@catmur.co.uk> */ #if defined (HANDLE_MULTIBYTE) - n0 = num; - temp = local_prompt ? strlen (local_prompt) : 0; - while (num < temp) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { - if (_rl_col_width (local_prompt, n0, num) > _rl_screenwidth) + n0 = num; + temp = local_prompt_len; + while (num < temp) { - num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY); - break; + z = _rl_col_width (local_prompt, n0, num); + if (z > _rl_screenwidth) + { + num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY); + break; + } + else if (z == _rl_screenwidth) + break; + num++; } - num++; + temp = num; } - temp = num + -#else - temp = ((newlines + 1) * _rl_screenwidth) + + else #endif /* !HANDLE_MULTIBYTE */ - ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line - : ((newlines == 1) ? wrap_offset : 0)) - : ((newlines == 0) ? wrap_offset :0)); + temp = ((newlines + 1) * _rl_screenwidth); + + /* Now account for invisible characters in the current line. */ + temp += ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line + : ((newlines == 1) ? wrap_offset : 0)) + : ((newlines == 0) ? wrap_offset :0)); inv_lbreaks[++newlines] = temp; #if defined (HANDLE_MULTIBYTE) - lpos -= _rl_col_width (local_prompt, n0, num); -#else - lpos -= _rl_screenwidth; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + lpos -= _rl_col_width (local_prompt, n0, num); + else #endif + lpos -= _rl_screenwidth; } prompt_last_screen_line = newlines; /* Draw the rest of the line (after the prompt) into invisible_line, keeping - track of where the cursor is (c_pos), the number of the line containing + track of where the cursor is (cpos_buffer_position), the number of the line containing the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin). It maintains an array of line breaks for display (inv_lbreaks). This handles expanding tabs for display and displaying meta characters. */ @@ -705,7 +727,7 @@ rl_redisplay () if (in == rl_point) { - c_pos = out; + cpos_buffer_position = out; lb_linenum = newlines; } @@ -799,7 +821,7 @@ rl_redisplay () } if (in == rl_point) { - c_pos = out; + cpos_buffer_position = out; lb_linenum = newlines; } for (i = in; i < in+wc_bytes; i++) @@ -830,9 +852,9 @@ rl_redisplay () } line[out] = '\0'; - if (c_pos < 0) + if (cpos_buffer_position < 0) { - c_pos = out; + cpos_buffer_position = out; lb_linenum = newlines; } @@ -841,7 +863,7 @@ rl_redisplay () inv_lbreaks[newlines+1] = out; cursor_linenum = lb_linenum; - /* C_POS == position in buffer where cursor should be placed. + /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed. CURSOR_LINENUM == line number where the cursor should be placed. */ /* PWP: now is when things get a bit hairy. The visible and invisible @@ -886,6 +908,8 @@ rl_redisplay () /* For each line in the buffer, do the updating display. */ for (linenum = 0; linenum <= inv_botlin; linenum++) { + /* This can lead us astray if we execute a program that changes + the locale from a non-multibyte to a multibyte one. */ o_cpos = _rl_last_c_pos; cpos_adjusted = 0; update_line (VIS_LINE(linenum), INV_LINE(linenum), linenum, @@ -898,7 +922,11 @@ rl_redisplay () change update_line itself. There is one case in which update_line adjusts _rl_last_c_pos itself (so it can pass _rl_move_cursor_relative accurate values); it communicates - this back by setting cpos_adjusted */ + this back by setting cpos_adjusted. If we assume that + _rl_last_c_pos is correct (an absolute cursor position) each + time update_line is called, then we can assume in our + calculations that o_cpos does not need to be adjusted by + wrap_offset. */ if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && cpos_adjusted == 0 && _rl_last_c_pos != o_cpos && @@ -967,7 +995,11 @@ rl_redisplay () invisible character in the prompt string. */ nleft = prompt_visible_length + wrap_offset; if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && - _rl_last_c_pos <= prompt_last_invisible && local_prompt) +#if 0 + _rl_last_c_pos <= PROMPT_ENDING_INDEX && local_prompt) +#else + _rl_last_c_pos < PROMPT_ENDING_INDEX && local_prompt) +#endif { #if defined (__MSDOS__) putc ('\r', rl_outstream); @@ -986,8 +1018,8 @@ rl_redisplay () in the buffer? */ pos = inv_lbreaks[cursor_linenum]; /* nleft == number of characters in the line buffer between the - start of the line and the cursor position. */ - nleft = c_pos - pos; + start of the line and the desired cursor position. */ + nleft = cpos_buffer_position - pos; /* NLEFT is now a number of characters in a buffer. When in a multibyte locale, however, _rl_last_c_pos is an absolute cursor @@ -999,6 +1031,7 @@ rl_redisplay () those characters here and call _rl_backspace() directly. */ if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos) { + /* TX == new physical cursor position in multibyte locale. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) tx = _rl_col_width (&visible_line[pos], 0, nleft) - visible_wrap_offset; else @@ -1032,11 +1065,11 @@ rl_redisplay () will be LMARGIN. */ /* The number of characters that will be displayed before the cursor. */ - ndisp = c_pos - wrap_offset; + ndisp = cpos_buffer_position - wrap_offset; nleft = prompt_visible_length + wrap_offset; /* Where the new cursor position will be on the screen. This can be longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ - phys_c_pos = c_pos - (last_lmargin ? last_lmargin : wrap_offset); + phys_c_pos = cpos_buffer_position - (last_lmargin ? last_lmargin : wrap_offset); t = _rl_screenwidth / 3; /* If the number of characters had already exceeded the screenwidth, @@ -1047,7 +1080,7 @@ rl_redisplay () two-thirds of the way across the screen. */ if (phys_c_pos > _rl_screenwidth - 2) { - lmargin = c_pos - (2 * t); + lmargin = cpos_buffer_position - (2 * t); if (lmargin < 0) lmargin = 0; /* If the left margin would be in the middle of a prompt with @@ -1061,7 +1094,7 @@ rl_redisplay () { /* If we are moving back towards the beginning of the line and the last margin is no longer correct, compute a new one. */ - lmargin = ((c_pos - 1) / t) * t; /* XXX */ + lmargin = ((cpos_buffer_position - 1) / t) * t; /* XXX */ if (wrap_offset && lmargin > 0 && lmargin < nleft) lmargin = nleft; } @@ -1106,7 +1139,7 @@ rl_redisplay () if (visible_first_line_len > _rl_screenwidth) visible_first_line_len = _rl_screenwidth; - _rl_move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); + _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin]); last_lmargin = lmargin; } } @@ -1164,7 +1197,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) int col_lendiff, col_temp; #if defined (HANDLE_MULTIBYTE) mbstate_t ps_new, ps_old; - int new_offset, old_offset, tmp; + int new_offset, old_offset; #endif /* If we're at the right edge of a terminal that supports xn, we're @@ -1397,11 +1430,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) sequences (like drawing the `unbold' sequence without a corresponding `bold') that manifests itself on certain terminals. */ - lendiff = local_prompt ? strlen (local_prompt) : 0; + lendiff = local_prompt_len; od = ofd - old; /* index of first difference in visible line */ if (current_line == 0 && !_rl_horizontal_scroll_mode && _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && - od >= lendiff && _rl_last_c_pos <= prompt_last_invisible) + od >= lendiff && _rl_last_c_pos < PROMPT_ENDING_INDEX) { #if defined (__MSDOS__) putc ('\r', rl_outstream); @@ -1420,7 +1453,19 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) _rl_last_c_pos = lendiff; } + /* When this function returns, _rl_last_c_pos is correct, and an absolute + cursor postion in multibyte mode, but a buffer index when not in a + multibyte locale. */ _rl_move_cursor_relative (od, old); +#if 1 +#if defined (HANDLE_MULTIBYTE) + /* We need to indicate that the cursor position is correct in the presence of + invisible characters in the prompt string. Let's see if setting this when + we make sure we're at the end of the drawn prompt string works. */ + if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars) + cpos_adjusted = 1; +#endif +#endif /* if (len (new) > len (old)) lendiff == difference in buffer @@ -1648,10 +1693,11 @@ rl_on_new_line_with_prompt () int rl_forced_update_display () { + register char *temp; + if (visible_line) { - register char *temp = visible_line; - + temp = visible_line; while (*temp) *temp++ = '\0'; } @@ -1686,8 +1732,14 @@ _rl_move_cursor_relative (new, data) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { dpos = _rl_col_width (data, 0, new); - if (dpos > woff) - dpos -= woff; + if (dpos > prompt_last_invisible) /* XXX - don't use woff here */ + { + dpos -= woff; + /* Since this will be assigned to _rl_last_c_pos at the end (more + precisely, _rl_last_c_pos == dpos when this function returns), + let the caller know. */ + cpos_adjusted = 1; + } } else #endif @@ -1706,7 +1758,7 @@ _rl_move_cursor_relative (new, data) else #endif i = _rl_last_c_pos - woff; - if (new == 0 || CR_FASTER (new, _rl_last_c_pos) || + if (dpos == 0 || CR_FASTER (dpos, _rl_last_c_pos) || (_rl_term_autowrap && i == _rl_screenwidth)) { #if defined (__MSDOS__) @@ -1728,19 +1780,27 @@ _rl_move_cursor_relative (new, data) sequence telling the terminal to move forward one character. That kind of control is for people who don't know what the data is underneath the cursor. */ -#if defined (HACK_TERMCAP_MOTION) - if (_rl_term_forward_char) - { - for (i = cpos; i < dpos; i++) - tputs (_rl_term_forward_char, 1, _rl_output_character_function); - } - else -#endif /* HACK_TERMCAP_MOTION */ + + /* However, we need a handle on where the current display position is + in the buffer for the immediately preceding comment to be true. + In multibyte locales, we don't currently have that info available. + Without it, we don't know where the data we have to display begins + in the buffer and we have to go back to the beginning of the screen + line. In this case, we can use the terminal sequence to move forward + if it's available. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { - tputs (_rl_term_cr, 1, _rl_output_character_function); - for (i = 0; i < new; i++) - putc (data[i], rl_outstream); + if (_rl_term_forward_char) + { + for (i = cpos; i < dpos; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + else + { + tputs (_rl_term_cr, 1, _rl_output_character_function); + for (i = 0; i < new; i++) + putc (data[i], rl_outstream); + } } else for (i = cpos; i < new; i++) @@ -1889,6 +1949,7 @@ rl_message (va_alist) &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; (*rl_redisplay_function) (); return 0; @@ -1912,6 +1973,7 @@ rl_message (format, arg1, arg2) &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; (*rl_redisplay_function) (); return 0; @@ -1948,12 +2010,14 @@ rl_save_prompt () saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; saved_prefix_length = prompt_prefix_length; + saved_local_length = local_prompt_len; saved_last_invisible = prompt_last_invisible; saved_visible_length = prompt_visible_length; saved_invis_chars_first_line = prompt_invis_chars_first_line; saved_physical_chars = prompt_physical_chars; local_prompt = local_prompt_prefix = (char *)0; + local_prompt_len = 0; prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0; prompt_invis_chars_first_line = prompt_physical_chars = 0; } @@ -1966,6 +2030,7 @@ rl_restore_prompt () local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; + local_prompt_len = saved_local_length; prompt_prefix_length = saved_prefix_length; prompt_last_invisible = saved_last_invisible; prompt_visible_length = saved_visible_length; @@ -1974,6 +2039,7 @@ rl_restore_prompt () /* can test saved_local_prompt to see if prompt info has been saved. */ saved_local_prompt = saved_local_prefix = (char *)0; + saved_local_length = 0; saved_last_invisible = saved_visible_length = saved_prefix_length = 0; saved_invis_chars_first_line = saved_physical_chars = 0; } @@ -1983,11 +2049,15 @@ _rl_make_prompt_for_search (pchar) int pchar; { int len; - char *pmt; + char *pmt, *p; rl_save_prompt (); - if (saved_local_prompt == 0) + /* We've saved the prompt, and can do anything with the various prompt + strings we need before they're restored. We want the unexpanded + portion of the prompt string after any final newline. */ + p = rl_prompt ? strrchr (rl_prompt, '\n') : 0; + if (p == 0) { len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; pmt = (char *)xmalloc (len + 2); @@ -1998,19 +2068,17 @@ _rl_make_prompt_for_search (pchar) } else { - len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; + p++; + len = strlen (p); pmt = (char *)xmalloc (len + 2); if (len) - strcpy (pmt, saved_local_prompt); + strcpy (pmt, p); pmt[len] = pchar; pmt[len+1] = '\0'; - local_prompt = savestring (pmt); - prompt_last_invisible = saved_last_invisible; - prompt_visible_length = saved_visible_length + 1; - } + } + /* will be overwritten by expand_prompt, called from rl_message */ prompt_physical_chars = saved_physical_chars + 1; - return pmt; } @@ -2160,7 +2228,8 @@ _rl_update_final () char *last_line; last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; - _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); + cpos_buffer_position = -1; /* don't know where we are in buffer */ + _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); /* XXX */ _rl_clear_to_eol (0); putc (last_line[_rl_screenwidth - 1], rl_outstream); } @@ -2203,6 +2272,7 @@ redraw_prompt (t) &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; + local_prompt_len = local_prompt ? strlen (local_prompt) : 0; rl_forced_update_display (); @@ -2305,12 +2375,14 @@ _rl_col_width (str, start, end) int start, end; { wchar_t wc; - mbstate_t ps = {0}; + mbstate_t ps; int tmp, point, width, max; if (end <= start) return 0; + memset (&ps, 0, sizeof (mbstate_t)); + point = 0; max = end; diff --git a/lib/readline/doc/history.texi b/lib/readline/doc/history.texi index f6a3d205..1af40c73 100644 --- a/lib/readline/doc/history.texi +++ b/lib/readline/doc/history.texi @@ -14,7 +14,7 @@ This document describes the GNU History library a programming tool that provides a consistent user interface for recalling lines of previously typed input. -Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. +Copyright @copyright{} 1988-2006 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -22,7 +22,7 @@ are preserved on all copies. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is diff --git a/lib/readline/doc/hstech.texi b/lib/readline/doc/hstech.texi index 4fdda5f1..47ba8a55 100644 --- a/lib/readline/doc/hstech.texi +++ b/lib/readline/doc/hstech.texi @@ -1,7 +1,7 @@ @ignore This file documents the user interface to the GNU History library. -Copyright (C) 1988-2002 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. Permission is granted to make and distribute verbatim copies of this manual diff --git a/lib/readline/doc/hsuser.texi b/lib/readline/doc/hsuser.texi index 6c891833..f98983b6 100644 --- a/lib/readline/doc/hsuser.texi +++ b/lib/readline/doc/hsuser.texi @@ -1,7 +1,7 @@ @ignore This file documents the user interface to the GNU History library. -Copyright (C) 1988-2002 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. Permission is granted to make and distribute verbatim copies of this manual diff --git a/lib/readline/doc/rlman.texi b/lib/readline/doc/rlman.texi index f834b582..e14c655f 100644 --- a/lib/readline/doc/rlman.texi +++ b/lib/readline/doc/rlman.texi @@ -14,7 +14,7 @@ This manual describes the GNU Readline Library consistency of user interface across discrete programs which provide a command line interface. -Copyright @copyright{} 1988-2004 Free Software Foundation, Inc. +Copyright @copyright{} 1988-2006 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -22,7 +22,7 @@ are preserved on all copies. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi index 6f2e2ee2..ecff1060 100644 --- a/lib/readline/doc/rltech.texi +++ b/lib/readline/doc/rltech.texi @@ -8,7 +8,7 @@ This document describes the GNU Readline Library, a utility for aiding in the consistency of user interface across discrete programs that need to provide a command line interface. -Copyright (C) 1988-2005 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1033,8 +1033,10 @@ pending input has not already been read with @code{rl_read_key()}. @deftypefun int rl_set_keyboard_input_timeout (int u) While waiting for keyboard input in @code{rl_read_key()}, Readline will wait for @var{u} microseconds for input before calling any function -assigned to @code{rl_event_hook}. The default waiting period is -one-tenth of a second. Returns the old timeout value. +assigned to @code{rl_event_hook}. @var{u} must be greater than or equal +to zero (a zero-length timeout is equivalent to a poll). +The default waiting period is one-tenth of a second. +Returns the old timeout value. @end deftypefun @node Terminal Management @@ -1668,6 +1670,9 @@ the directory portion of the pathname the user typed. It returns an integer that should be non-zero if the function modifies its directory argument. It could be used to expand symbolic links or shell variables in pathnames. +At the least, even if no other expansion is performed, this function should +remove any quote characters from the directory name, because its result will +be passed directly to @code{opendir()}. @end deftypevar @deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook diff --git a/lib/readline/doc/rluser.texi b/lib/readline/doc/rluser.texi index 478b41fa..5c6467a9 100644 --- a/lib/readline/doc/rluser.texi +++ b/lib/readline/doc/rluser.texi @@ -10,7 +10,7 @@ use these features. There is a document entitled "readline.texinfo" which contains both end-user and programmer documentation for the GNU Readline Library. -Copyright (C) 1988-2005 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. @@ -336,7 +336,9 @@ file is taken from the value of the shell variable @env{INPUTRC}. If @ifclear BashFeatures file is taken from the value of the environment variable @env{INPUTRC}. If @end ifclear -that variable is unset, the default is @file{~/.inputrc}. +that variable is unset, the default is @file{~/.inputrc}. If that +file does not exist or cannot be read, the ultimate default is +@file{/etc/inputrc}. When a program which uses the Readline library starts up, the init file is read, and the key bindings are set. @@ -593,9 +595,11 @@ the command does. Once you know the name of the command, simply place on a line in the init file the name of the key you wish to bind the command to, a colon, and then the name of the -command. The name of the key -can be expressed in different ways, depending on what you find most -comfortable. +command. +There can be no space between the key name and the colon -- that will be +interpreted as part of the key name. +The name of the key can be expressed in different ways, depending on +what you find most comfortable. In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a @var{macro}). diff --git a/lib/readline/doc/rluserman.texi b/lib/readline/doc/rluserman.texi index db80b312..086aa838 100644 --- a/lib/readline/doc/rluserman.texi +++ b/lib/readline/doc/rluserman.texi @@ -14,7 +14,7 @@ This manual describes the end user interface of the GNU Readline Library consistency of user interface across discrete programs which provide a command line interface. -Copyright @copyright{} 1988-2005 Free Software Foundation, Inc. +Copyright @copyright{} 1988-2006 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -22,7 +22,7 @@ are preserved on all copies. @quotation Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. A copy of the license is diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi index 99816bf6..654e8377 100644 --- a/lib/readline/doc/version.texi +++ b/lib/readline/doc/version.texi @@ -1,10 +1,10 @@ @ignore -Copyright (C) 1988-2005 Free Software Foundation, Inc. +Copyright (C) 1988-2006 Free Software Foundation, Inc. @end ignore -@set EDITION 5.1-beta1 -@set VERSION 5.1-beta1 -@set UPDATED 11 November 2005 -@set UPDATED-MONTH November 2005 +@set EDITION 5.2 +@set VERSION 5.2 +@set UPDATED 26 April 2006 +@set UPDATED-MONTH April 2006 -@set LASTCHANGE Fri Nov 11 19:50:51 EST 2005 +@set LASTCHANGE Wed Apr 26 09:22:57 EDT 2006 diff --git a/lib/readline/examples/excallback.c b/lib/readline/examples/excallback.c index 3d4bb189..385492b1 100644 --- a/lib/readline/examples/excallback.c +++ b/lib/readline/examples/excallback.c @@ -32,6 +32,9 @@ Let me know what you think. Jeff */ +/* +Copyright (C) 1999 Jeff Solomon +*/ #if defined (HAVE_CONFIG_H) #include <config.h> diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c index 68470146..f46c0b2a 100644 --- a/lib/readline/histexpand.c +++ b/lib/readline/histexpand.c @@ -56,8 +56,6 @@ typedef int _hist_search_func_t PARAMS((const char *, int)); -extern int rl_byte_oriented; /* declared in mbutil.c */ - static char error_pointer; static char *subst_lhs; @@ -564,12 +562,12 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { - int c, l; + int ch, l; l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY); - c = string[l]; + ch = string[l]; /* XXX - original patch had i - 1 ??? If i == 0 it would fail. */ - if (i && (c == '\'' || c == '"')) - quoted_search_delimiter = c; + if (i && (ch == '\'' || ch == '"')) + quoted_search_delimiter = ch; } else #endif /* HANDLE_MULTIBYTE */ @@ -1430,6 +1428,8 @@ history_tokenize_word (string, ind) { if (peek == '<' && string[i + 2] == '-') i++; + else if (peek == '<' && string[i + 2] == '<') + i++; i += 2; return i; } diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c index 717bbee6..2f051a32 100644 --- a/lib/readline/histfile.c +++ b/lib/readline/histfile.c @@ -256,7 +256,11 @@ read_history_range (filename, from, to) for (line_end = line_start; line_end < bufend; line_end++) if (*line_end == '\n') { - *line_end = '\0'; + /* Change to allow Windows-like \r\n end of line delimiter. */ + if (line_end > line_start && line_end[-1] == '\r') + line_end[-1] = '\0'; + else + *line_end = '\0'; if (*line_start) { diff --git a/lib/readline/history.c b/lib/readline/history.c index a538f91c..1ccf4db7 100644 --- a/lib/readline/history.c +++ b/lib/readline/history.c @@ -209,6 +209,22 @@ history_get (offset) : the_history[local_index]; } +HIST_ENTRY * +alloc_history_entry (string, ts) + char *string; + char *ts; +{ + HIST_ENTRY *temp; + + temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + + temp->line = string ? savestring (string) : string; + temp->data = (char *)NULL; + temp->timestamp = ts; + + return temp; +} + time_t history_get_time (hist) HIST_ENTRY *hist; @@ -290,11 +306,7 @@ add_history (string) } } - temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); - temp->line = savestring (string); - temp->data = (char *)NULL; - - temp->timestamp = hist_inittime (); + temp = alloc_history_entry (string, hist_inittime ()); the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; @@ -328,6 +340,26 @@ free_history_entry (hist) free (hist); return (x); } + +HIST_ENTRY * +copy_history_entry (hist) + HIST_ENTRY *hist; +{ + HIST_ENTRY *ret; + char *ts; + + if (hist == 0) + return hist; + + ret = alloc_history_entry (hist->line, (char *)NULL); + + ts = hist->timestamp ? savestring (hist->timestamp) : hist->timestamp; + ret->timestamp = ts; + + ret->data = hist->data; + + return ret; +} /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an @@ -354,6 +386,51 @@ replace_history_entry (which, line, data) return (old_value); } +/* Replace the DATA in the specified history entries, replacing OLD with + NEW. WHICH says which one(s) to replace: WHICH == -1 means to replace + all of the history entries where entry->data == OLD; WHICH == -2 means + to replace the `newest' history entry where entry->data == OLD; and + WHICH >= 0 means to replace that particular history entry's data, as + long as it matches OLD. */ +void +replace_history_data (which,old, new) + int which; + histdata_t *old, *new; +{ + HIST_ENTRY *entry; + register int i, last; + + if (which < -2 || which >= history_length || history_length == 0 || the_history == 0) + return; + + if (which >= 0) + { + entry = the_history[which]; + if (entry && entry->data == old) + entry->data = new; + return; + } + + last = -1; + for (i = 0; i < history_length; i++) + { + entry = the_history[i]; + if (entry == 0) + continue; + if (entry->data == old) + { + last = i; + if (which == -1) + entry->data = new; + } + } + if (which == -2 && last >= 0) + { + entry = the_history[last]; + entry->data = new; /* XXX - we don't check entry->old */ + } +} + /* Remove history element WHICH from the history. The removed element is returned to you so you can free the line, data, and containing structure. */ diff --git a/lib/readline/input.c b/lib/readline/input.c index 0ec507ec..da5d771c 100644 --- a/lib/readline/input.c +++ b/lib/readline/input.c @@ -179,6 +179,7 @@ rl_gather_tyi () struct timeval timeout; #endif + chars_avail = 0; tty = fileno (rl_instream); #if defined (HAVE_SELECT) @@ -220,6 +221,13 @@ rl_gather_tyi () } #endif /* O_NDELAY */ +#if defined (__MINGW32__) + /* Use getch/_kbhit to check for available console input, in the same way + that we read it normally. */ + chars_avail = isatty (tty) ? _kbhit () : 0; + result = 0; +#endif + /* If there's nothing available, don't waste time trying to read something. */ if (chars_avail <= 0) @@ -263,7 +271,7 @@ rl_set_keyboard_input_timeout (u) int o; o = _keyboard_input_timeout; - if (u > 0) + if (u >= 0) _keyboard_input_timeout = u; return (o); } @@ -305,6 +313,11 @@ _rl_input_available () #endif +#if defined (__MINGW32__) + if (isatty (tty)) + return (_kbhit ()); +#endif + return 0; } @@ -489,7 +502,7 @@ rl_getc (stream) this is simply an interrupted system call to read (). Otherwise, some error ocurred, also signifying EOF. */ if (errno != EINTR) - return (EOF); + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); } } @@ -537,21 +550,21 @@ _rl_read_mbchar (mbchar, size) } /* Read a multibyte-character string whose first character is FIRST into - the buffer MB of length MBLEN. Returns the last character read, which + the buffer MB of length MLEN. Returns the last character read, which may be FIRST. Used by the search functions, among others. Very similar to _rl_read_mbchar. */ int -_rl_read_mbstring (first, mb, mblen) +_rl_read_mbstring (first, mb, mlen) int first; char *mb; - int mblen; + int mlen; { int i, c; mbstate_t ps; c = first; - memset (mb, 0, mblen); - for (i = 0; i < mblen; i++) + memset (mb, 0, mlen); + for (i = 0; i < mlen; i++) { mb[i] = (char)c; memset (&ps, 0, sizeof (mbstate_t)); diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c index d7d8520e..9f67bfc0 100644 --- a/lib/readline/isearch.c +++ b/lib/readline/isearch.c @@ -68,8 +68,8 @@ static void _rl_isearch_fini PARAMS((_rl_search_cxt *)); static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int)); /* Last line found by the current incremental search, so we don't `find' - identical lines many times in a row. */ -static char *prev_line_found; + identical lines many times in a row. Now part of isearch context. */ +/* static char *prev_line_found; */ /* Last search string and its length. */ static char *last_isearch_string; diff --git a/lib/readline/kill.c b/lib/readline/kill.c index 1d3254c3..031ddf47 100644 --- a/lib/readline/kill.c +++ b/lib/readline/kill.c @@ -582,6 +582,7 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) if (!arg || !*arg) { rl_ding (); + FREE (arg); return -1; } diff --git a/lib/readline/macro.c b/lib/readline/macro.c index 2975bf1f..00cd58d6 100644 --- a/lib/readline/macro.c +++ b/lib/readline/macro.c @@ -113,7 +113,7 @@ _rl_next_macro_key () #if defined (READLINE_CALLBACKS) c = rl_executing_macro[executing_macro_index++]; - if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD) && rl_executing_macro[executing_macro_index] == 0) + if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD|RL_STATE_MOREINPUT) && rl_executing_macro[executing_macro_index] == 0) _rl_pop_executing_macro (); return c; #else diff --git a/lib/readline/misc.c b/lib/readline/misc.c index d4558321..94ecb259 100644 --- a/lib/readline/misc.c +++ b/lib/readline/misc.c @@ -212,6 +212,8 @@ rl_digit_loop () if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) break; } + + return r; } /* Create a default argument. */ diff --git a/lib/readline/readline.c b/lib/readline/readline.c index 5e9767ab..c2b74006 100644 --- a/lib/readline/readline.c +++ b/lib/readline/readline.c @@ -49,6 +49,11 @@ #include <stdio.h> #include "posixjmp.h" +#include <errno.h> + +#if !defined (errno) +extern int errno; +#endif /* !errno */ /* System-specific feature definitions and include files. */ #include "rldefs.h" @@ -282,6 +287,7 @@ rl_set_prompt (prompt) { FREE (rl_prompt); rl_prompt = prompt ? savestring (prompt) : (char *)NULL; + rl_display_prompt = rl_prompt ? rl_prompt : ""; rl_visible_prompt_length = rl_expand_prompt (rl_prompt); return 0; @@ -478,6 +484,20 @@ readline_internal_charloop () c = rl_read_key (); RL_UNSETSTATE(RL_STATE_READCMD); + /* look at input.c:rl_getc() for the circumstances under which this will + be returned; punt immediately on read error without converting it to + a newline. */ + if (c == READERR) + { +#if defined (READLINE_CALLBACKS) + RL_SETSTATE(RL_STATE_DONE); + return (rl_done = 1); +#else + eof_found = 1; + break; +#endif + } + /* EOF typed to a non-blank line is a <NL>. */ if (c == EOF && rl_end) c = NEWLINE; @@ -714,7 +734,7 @@ _rl_dispatch_subseq (key, map, got_subseq) rl_dispatching = 1; RL_SETSTATE(RL_STATE_DISPATCHING); - r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); + (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); RL_UNSETSTATE(RL_STATE_DISPATCHING); rl_dispatching = 0; diff --git a/lib/readline/readline.h b/lib/readline/readline.h index fade6d41..b71bf98d 100644 --- a/lib/readline/readline.h +++ b/lib/readline/readline.h @@ -40,9 +40,9 @@ extern "C" { #endif /* Hex-encoded Readline version number. */ -#define RL_READLINE_VERSION 0x0501 /* Readline 5.1 */ +#define RL_READLINE_VERSION 0x0502 /* Readline 5.2 */ #define RL_VERSION_MAJOR 5 -#define RL_VERSION_MINOR 1 +#define RL_VERSION_MINOR 2 /* Readline data structures. */ @@ -757,6 +757,10 @@ extern int rl_ignore_completion_duplicates; completion character will be inserted as any other. */ extern int rl_inhibit_completion; +/* Input error; can be returned by (*rl_getc_function) if readline is reading + a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */ +#define READERR (-2) + /* Definitions available for use by readline clients. */ #define RL_PROMPT_START_IGNORE '\001' #define RL_PROMPT_END_IGNORE '\002' diff --git a/lib/readline/rlconf.h b/lib/readline/rlconf.h index c651fd8b..ff3929e0 100644 --- a/lib/readline/rlconf.h +++ b/lib/readline/rlconf.h @@ -37,9 +37,12 @@ /* Ugly but working hack for binding prefix meta. */ #define PREFIX_META_HACK -/* The final, last-ditch effort file name for an init file. */ +/* The next-to-last-ditch effort file name for a user-specific init file. */ #define DEFAULT_INPUTRC "~/.inputrc" +/* The ultimate last-ditch filenname for an init file -- system-wide. */ +#define SYS_INPUTRC "/etc/inputrc" + /* If defined, expand tabs to spaces. */ #define DISPLAY_TABS diff --git a/lib/readline/rlmbutil.h b/lib/readline/rlmbutil.h index 11adacb4..dd317e2a 100644 --- a/lib/readline/rlmbutil.h +++ b/lib/readline/rlmbutil.h @@ -32,10 +32,19 @@ /* For platforms which support the ISO C amendement 1 functionality we support user defined character classes. */ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ -#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) # include <wchar.h> # include <wctype.h> -# if defined (HAVE_MBSRTOWCS) && defined (HAVE_MBRTOWC) && defined (HAVE_MBRLEN) && defined (HAVE_WCWIDTH) +# if defined (HAVE_ISWCTYPE) && \ + defined (HAVE_ISWLOWER) && \ + defined (HAVE_ISWUPPER) && \ + defined (HAVE_MBSRTOWCS) && \ + defined (HAVE_MBRTOWC) && \ + defined (HAVE_MBRLEN) && \ + defined (HAVE_TOWLOWER) && \ + defined (HAVE_TOWUPPER) && \ + defined (HAVE_WCHAR_T) && \ + defined (HAVE_WCWIDTH) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif diff --git a/lib/readline/rlprivate.h b/lib/readline/rlprivate.h index 1c216ead..64aa7bdd 100644 --- a/lib/readline/rlprivate.h +++ b/lib/readline/rlprivate.h @@ -309,6 +309,10 @@ extern int _rl_char_search_internal PARAMS((int, int, int)); #endif extern int _rl_set_mark_at_pos PARAMS((int)); +/* undo.c */ +extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); +extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); + /* util.c */ extern int _rl_abort_internal PARAMS((void)); extern char *_rl_strindex PARAMS((const char *, const char *)); @@ -404,6 +408,7 @@ extern char *_rl_term_up; extern char *_rl_term_dc; extern char *_rl_term_cr; extern char *_rl_term_IC; +extern char *_rl_term_forward_char; extern int _rl_screenheight; extern int _rl_screenwidth; extern int _rl_screenchars; diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c index 9a0326ed..0a570f85 100644 --- a/lib/readline/rltty.c +++ b/lib/readline/rltty.c @@ -933,7 +933,6 @@ rltty_set_default_bindings (kmap) #if !defined (NO_TTY_DRIVER) TIOTYPE ttybuff; int tty; - static int called = 0; tty = fileno (rl_instream); diff --git a/lib/readline/search.c b/lib/readline/search.c index 8013916c..33cc4fc1 100644 --- a/lib/readline/search.c +++ b/lib/readline/search.c @@ -70,7 +70,6 @@ static int rl_history_search_pos; static char *history_search_string; static int history_string_size; -static UNDO_LIST *noninc_saved_undo_list; static void make_history_line_current PARAMS((HIST_ENTRY *)); static int noninc_search_from_pos PARAMS((char *, int, int)); static int noninc_dosearch PARAMS((char *, int)); @@ -212,7 +211,7 @@ _rl_nsearch_init (dir, pchar) rl_end = rl_point = 0; p = _rl_make_prompt_for_search (pchar ? pchar : ':'); - rl_message (p, 0, 0); + rl_message ("%s", p, 0); free (p); RL_SETSTATE(RL_STATE_NSEARCH); diff --git a/lib/readline/signals.c b/lib/readline/signals.c index f344ed83..54f2a642 100644 --- a/lib/readline/signals.c +++ b/lib/readline/signals.c @@ -160,6 +160,7 @@ rl_signal_handler (sig) rl_cleanup_after_signal (); #if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&set); sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); sigdelset (&set, sig); #else /* !HAVE_POSIX_SIGNALS */ @@ -288,9 +289,44 @@ rl_set_signals () { sighandler_cxt dummy; SigHandler *oh; +#if defined (HAVE_POSIX_SIGNALS) + static int sigmask_set = 0; + static sigset_t bset, oset; +#endif + +#if defined (HAVE_POSIX_SIGNALS) + if (rl_catch_signals && sigmask_set == 0) + { + sigemptyset (&bset); + + sigaddset (&bset, SIGINT); + sigaddset (&bset, SIGINT); +#if defined (SIGQUIT) + sigaddset (&bset, SIGQUIT); +#endif +#if defined (SIGALRM) + sigaddset (&bset, SIGALRM); +#endif +#if defined (SIGTSTP) + sigaddset (&bset, SIGTSTP); +#endif +#if defined (SIGTTIN) + sigaddset (&bset, SIGTTIN); +#endif +#if defined (SIGTTOU) + sigaddset (&bset, SIGTTOU); +#endif + sigmask_set = 1; + } +#endif /* HAVE_POSIX_SIGNALS */ if (rl_catch_signals && signals_set_flag == 0) { +#if defined (HAVE_POSIX_SIGNALS) + sigemptyset (&oset); + sigprocmask (SIG_BLOCK, &bset, &oset); +#endif + rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); #if defined (SIGQUIT) @@ -324,6 +360,10 @@ rl_set_signals () #endif /* SIGTTIN */ signals_set_flag = 1; + +#if defined (HAVE_POSIX_SIGNALS) + sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); +#endif } #if defined (SIGWINCH) @@ -390,8 +430,8 @@ rl_cleanup_after_signal () _rl_clean_up_for_exit (); if (rl_deprep_term_function) (*rl_deprep_term_function) (); - rl_clear_signals (); rl_clear_pending_input (); + rl_clear_signals (); } /* Reset the terminal and readline state after a signal handler returns. */ diff --git a/lib/readline/terminal.c b/lib/readline/terminal.c index cc61388f..547f6f5d 100644 --- a/lib/readline/terminal.c +++ b/lib/readline/terminal.c @@ -1,6 +1,6 @@ /* terminal.c -- controlling the terminal with termcap. */ -/* Copyright (C) 1996-2005 Free Software Foundation, Inc. +/* Copyright (C) 1996-2006 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for reading lines of text with interactive input and history editing. @@ -66,10 +66,24 @@ #include "rlshell.h" #include "xmalloc.h" +#if defined (__MINGW32__) +# include <windows.h> +# include <wincon.h> + +static void _win_get_screensize PARAMS((int *, int *)); +#endif + +#if defined (__EMX__) +static void _emx_get_screensize PARAMS((int *, int *)); +#endif + #define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) #define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) -int rl_prefer_env_winsize; +/* If the calling application sets this to a non-zero value, readline will + use the $LINES and $COLUMNS environment variables to set its idea of the + window size before interrogating the kernel. */ +int rl_prefer_env_winsize = 0; /* **************************************************************** */ /* */ @@ -111,9 +125,7 @@ char *_rl_term_IC; char *_rl_term_dc; char *_rl_term_DC; -#if defined (HACK_TERMCAP_MOTION) char *_rl_term_forward_char; -#endif /* HACK_TERMCAP_MOTION */ /* How to go up a line. */ char *_rl_term_up; @@ -122,7 +134,7 @@ char *_rl_term_up; static char *_rl_visible_bell; /* Non-zero means the terminal can auto-wrap lines. */ -int _rl_term_autowrap; +int _rl_term_autowrap = -1; /* Non-zero means that this terminal has a meta key. */ static int term_has_meta; @@ -184,6 +196,26 @@ _emx_get_screensize (swp, shp) } #endif +#if defined (__MINGW32__) +static void +_win_get_screensize (swp, shp) + int *swp, *shp; +{ + HANDLE hConOut; + CONSOLE_SCREEN_BUFFER_INFO scr; + + hConOut = GetStdHandle (STD_OUTPUT_HANDLE); + if (hConOut != INVALID_HANDLE_VALUE) + { + if (GetConsoleScreenBufferInfo (hConOut, &scr)) + { + *swp = scr.dwSize.X; + *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1; + } + } +} +#endif + /* Get readline's idea of the screen size. TTY is a file descriptor open to the terminal. If IGNORE_ENV is true, we do not pay attention to the values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being @@ -208,7 +240,9 @@ _rl_get_screen_size (tty, ignore_env) #endif /* TIOCGWINSZ */ #if defined (__EMX__) - _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight); + _emx_get_screensize (&wc, &wr); +#elif defined (__MINGW32__) + _win_get_screensize (&wc, &wr); #endif if (ignore_env || rl_prefer_env_winsize == 0) @@ -274,6 +308,9 @@ void _rl_set_screen_size (rows, cols) int rows, cols; { + if (_rl_term_autowrap == -1) + _rl_init_terminal_io (rl_terminal_name); + if (rows > 0) _rl_screenheight = rows; if (cols > 0) @@ -355,9 +392,7 @@ static struct _tc_string tc_strings[] = { "le", &_rl_term_backspace }, { "mm", &_rl_term_mm }, { "mo", &_rl_term_mo }, -#if defined (HACK_TERMCAP_MOTION) { "nd", &_rl_term_forward_char }, -#endif { "pc", &_rl_term_pc }, { "up", &_rl_term_up }, { "vb", &_rl_visible_bell }, @@ -454,9 +489,7 @@ _rl_init_terminal_io (terminal_name) _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL; _rl_term_mm = _rl_term_mo = (char *)NULL; _rl_term_ve = _rl_term_vs = (char *)NULL; -#if defined (HACK_TERMCAP_MOTION) - term_forward_char = (char *)NULL; -#endif + _rl_term_forward_char = (char *)NULL; _rl_terminal_can_insert = term_has_meta = 0; /* Reasonable defaults for tgoto(). Readline currently only uses diff --git a/lib/readline/text.c b/lib/readline/text.c index 9053e969..399a48c5 100644 --- a/lib/readline/text.c +++ b/lib/readline/text.c @@ -1071,7 +1071,7 @@ int rl_delete (count, key) int count, key; { - int r; + int xpoint; if (count < 0) return (_rl_rubout_char (-count, key)); @@ -1084,23 +1084,21 @@ rl_delete (count, key) if (count > 1 || rl_explicit_arg) { - int orig_point = rl_point; + xpoint = rl_point; if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_forward_char (count, key); else rl_forward_byte (count, key); - r = rl_kill_text (orig_point, rl_point); - rl_point = orig_point; - return r; + rl_kill_text (xpoint, rl_point); + rl_point = xpoint; } else { - int new_point; - - new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); - return (rl_delete_text (rl_point, new_point)); + xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + rl_delete_text (rl_point, xpoint); } + return 0; } /* Delete the character under the cursor, unless the insertion @@ -1239,8 +1237,8 @@ rl_change_case (count, op) #if defined (HANDLE_MULTIBYTE) wchar_t wc, nwc; char mb[MB_LEN_MAX+1]; - int mblen, p; - mbstate_t ps; + int mlen; + mbstate_t mps; #endif start = rl_point; @@ -1257,7 +1255,7 @@ rl_change_case (count, op) SWAP (start, end); #if defined (HANDLE_MULTIBYTE) - memset (&ps, 0, sizeof (mbstate_t)); + memset (&mps, 0, sizeof (mbstate_t)); #endif /* We are going to modify some text, so let's prepare to undo it. */ @@ -1292,15 +1290,15 @@ rl_change_case (count, op) #if defined (HANDLE_MULTIBYTE) else { - mbrtowc (&wc, rl_line_buffer + start, end - start, &ps); + mbrtowc (&wc, rl_line_buffer + start, end - start, &mps); nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc); if (nwc != wc) /* just skip unchanged characters */ { - mblen = wcrtomb (mb, nwc, &ps); - if (mblen > 0) - mb[mblen] = '\0'; + mlen = wcrtomb (mb, nwc, &mps); + if (mlen > 0) + mb[mlen] = '\0'; /* Assume the same width */ - strncpy (rl_line_buffer + start, mb, mblen); + strncpy (rl_line_buffer + start, mb, mlen); } } #endif diff --git a/lib/readline/tilde.c b/lib/readline/tilde.c index d757f7a9..1b76c9f2 100644 --- a/lib/readline/tilde.c +++ b/lib/readline/tilde.c @@ -404,17 +404,17 @@ tilde_expand_word (filename) free (expansion); } } - free (username); /* If we don't have a failure hook, or if the failure hook did not expand the tilde, return a copy of what we were passed. */ if (dirname == 0) dirname = savestring (filename); } +#if defined (HAVE_GETPWENT) else - { - free (username); - dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); - } + dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); +#endif + + free (username); #if defined (HAVE_GETPWENT) endpwent (); #endif diff --git a/lib/readline/undo.c b/lib/readline/undo.c index fedfa121..9d9bd25b 100644 --- a/lib/readline/undo.c +++ b/lib/readline/undo.c @@ -1,7 +1,7 @@ /* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ -/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1987, 1989, 1992, 2006 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for reading lines of text with interactive input and history editing. @@ -50,6 +50,8 @@ #include "rlprivate.h" #include "xmalloc.h" +extern void replace_history_data PARAMS((int, histdata_t *, histdata_t *)); + /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ int _rl_doing_an_undo = 0; @@ -66,19 +68,35 @@ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; /* */ /* **************************************************************** */ -/* Remember how to undo something. Concatenate some undos if that - seems right. */ -void -rl_add_undo (what, start, end, text) +static UNDO_LIST * +alloc_undo_entry (what, start, end, text) enum undo_code what; int start, end; char *text; { - UNDO_LIST *temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); + UNDO_LIST *temp; + + temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); temp->what = what; temp->start = start; temp->end = end; temp->text = text; + + temp->next = (UNDO_LIST *)NULL; + return temp; +} + +/* Remember how to undo something. Concatenate some undos if that + seems right. */ +void +rl_add_undo (what, start, end, text) + enum undo_code what; + int start, end; + char *text; +{ + UNDO_LIST *temp; + + temp = alloc_undo_entry (what, start, end, text); temp->next = rl_undo_list; rl_undo_list = temp; } @@ -87,9 +105,12 @@ rl_add_undo (what, start, end, text) void rl_free_undo_list () { + UNDO_LIST *release, *orig_list; + + orig_list = rl_undo_list; while (rl_undo_list) { - UNDO_LIST *release = rl_undo_list; + release = rl_undo_list; rl_undo_list = rl_undo_list->next; if (release->what == UNDO_DELETE) @@ -98,6 +119,43 @@ rl_free_undo_list () free (release); } rl_undo_list = (UNDO_LIST *)NULL; + replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL); +} + +UNDO_LIST * +_rl_copy_undo_entry (entry) + UNDO_LIST *entry; +{ + UNDO_LIST *new; + + new = alloc_undo_entry (entry->what, entry->start, entry->end, (char *)NULL); + new->text = entry->text ? savestring (entry->text) : 0; + return new; +} + +UNDO_LIST * +_rl_copy_undo_list (head) + UNDO_LIST *head; +{ + UNDO_LIST *list, *new, *roving, *c; + + list = head; + new = 0; + while (list) + { + c = _rl_copy_undo_entry (list); + if (new == 0) + roving = new = c; + else + { + roving->next = c; + roving = roving->next; + } + list = list->next; + } + + roving->next = 0; + return new; } /* Undo the next thing in the list. Return 0 if there @@ -161,6 +219,8 @@ rl_do_undo () release = rl_undo_list; rl_undo_list = rl_undo_list->next; + replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list); + free (release); } while (waiting_for_begin); diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c index ac5fd744..d0b7e330 100644 --- a/lib/readline/vi_mode.c +++ b/lib/readline/vi_mode.c @@ -109,12 +109,16 @@ static int vi_mark_chars['z' - 'a' + 1]; static void _rl_vi_stuff_insert PARAMS((int)); static void _rl_vi_save_insert PARAMS((UNDO_LIST *)); +static void _rl_vi_backup PARAMS((void)); + static int _rl_vi_arg_dispatch PARAMS((int)); static int rl_digit_loop1 PARAMS((void)); static int _rl_vi_set_mark PARAMS((void)); static int _rl_vi_goto_mark PARAMS((void)); +static void _rl_vi_append_forward PARAMS((int)); + static int _rl_vi_callback_getchar PARAMS((char *, int)); #if defined (READLINE_CALLBACKS) @@ -205,7 +209,16 @@ rl_vi_redo (count, c) _rl_vi_stuff_insert (count); /* And back up point over the last character inserted. */ if (rl_point > 0) - rl_point--; + _rl_vi_backup (); + } + /* Ditto for redoing an insert with `a', but move forward a character first + like the `a' command does. */ + else if (_rl_vi_last_command == 'a' && vi_insert_buffer && *vi_insert_buffer) + { + _rl_vi_append_forward ('a'); + _rl_vi_stuff_insert (count); + if (rl_point > 0) + _rl_vi_backup (); } else r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); @@ -575,23 +588,32 @@ rl_vi_insert_beg (count, key) return (0); } -int -rl_vi_append_mode (count, key) - int count, key; +static void +_rl_vi_append_forward (key) + int key; { + int point; + if (rl_point < rl_end) { if (MB_CUR_MAX == 1 || rl_byte_oriented) rl_point++; else { - int point = rl_point; + point = rl_point; rl_forward_char (1, key); if (point == rl_point) rl_point = rl_end; } } - rl_vi_insertion_mode (1, key); +} + +int +rl_vi_append_mode (count, key) + int count, key; +{ + _rl_vi_append_forward (key); + rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } @@ -631,7 +653,7 @@ _rl_vi_save_insert (up) { int len, start, end; - if (up == 0) + if (up == 0 || up->what != UNDO_INSERT) { if (vi_insert_buffer_size >= 1) vi_insert_buffer[0] = '\0'; @@ -716,7 +738,7 @@ _rl_vi_change_mbchar_case (count) { wchar_t wc; char mb[MB_LEN_MAX+1]; - int mblen, p; + int mlen, p; mbstate_t ps; memset (&ps, 0, sizeof (mbstate_t)); @@ -740,9 +762,9 @@ _rl_vi_change_mbchar_case (count) if (wc) { p = rl_point; - mblen = wcrtomb (mb, wc, &ps); - if (mblen >= 0) - mb[mblen] = '\0'; + mlen = wcrtomb (mb, wc, &ps); + if (mlen >= 0) + mb[mlen] = '\0'; rl_begin_undo_group (); rl_vi_delete (1, 0); if (rl_point < p) /* Did we retreat at EOL? */ @@ -820,6 +842,15 @@ rl_vi_put (count, key) return (0); } +static void +_rl_vi_backup () +{ + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + rl_point--; +} + int rl_vi_check () { @@ -1111,7 +1142,7 @@ int rl_vi_rubout (count, key) int count, key; { - int p, opoint; + int opoint; if (count < 0) return (rl_vi_delete (-count, key)); @@ -1426,9 +1457,9 @@ _rl_vi_change_char (count, c, mb) } static int -_rl_vi_callback_getchar (mb, mblen) +_rl_vi_callback_getchar (mb, mlen) char *mb; - int mblen; + int mlen; { int c; @@ -1438,7 +1469,7 @@ _rl_vi_callback_getchar (mb, mblen) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) - c = _rl_read_mbstring (c, mb, mblen); + c = _rl_read_mbstring (c, mb, mlen); #endif return c; diff --git a/lib/sh/Makefile.in b/lib/sh/Makefile.in index 32e2b313..bf95d192 100644 --- a/lib/sh/Makefile.in +++ b/lib/sh/Makefile.in @@ -88,7 +88,8 @@ CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \ shquote.c strtrans.c strindex.c snprintf.c mailstat.c \ fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \ strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \ - mktime.c strftime.c xstrchr.c zcatfd.c winsize.c + mktime.c strftime.c xstrchr.c zcatfd.c winsize.c eaccess.c \ + wcsdup.c # The header files for this library. HSOURCES = @@ -96,11 +97,12 @@ HSOURCES = # The object files contained in $(LIBRARY_NAME) LIBOBJS = @LIBOBJS@ OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \ - itos.o zread.o zwrite.o shtty.o shmatch.o \ + itos.o zread.o zwrite.o shtty.o shmatch.o eaccess.o \ netconn.o netopen.o timeval.o makepath.o pathcanon.o \ pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \ strtrans.o strindex.o snprintf.o mailstat.o fmtulong.o \ - fmtullong.o fmtumax.o xstrchr.o zcatfd.o winsize.o ${LIBOBJS} + fmtullong.o fmtumax.o xstrchr.o zcatfd.o winsize.o wcsdup.o \ + ${LIBOBJS} SUPPORT = Makefile @@ -134,6 +136,7 @@ ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile # rules for losing makes, like SunOS clktck.o: clktck.c clock.o: clock.c +eaccess.o: eaccess.c fmtullong.o: fmtullong.c fmtulong.o: fmtulong.c fmtumax.o: fmtumax.c @@ -176,6 +179,7 @@ times.o: times.c timeval.o: timeval.c tmpfile.o: tmpfile.c vprint.o: vprint.c +wcsdup.o: wcsdup.c xstrchr.o: xstrchr.c zcatfd.o: zcatfd.c zread.o: zread.c @@ -191,6 +195,7 @@ strtoull.o: strtol.c # all files in the library depend on config.h clktck.o: ${BUILD_DIR}/config.h clock.o: ${BUILD_DIR}/config.h +eaccess.o: ${BUILD_DIR}/config.h fmtullong.o: ${BUILD_DIR}/config.h fmtulong.o: ${BUILD_DIR}/config.h fmtumax.o: ${BUILD_DIR}/config.h @@ -233,6 +238,7 @@ times.o: ${BUILD_DIR}/config.h timeval.o: ${BUILD_DIR}/config.h tmpfile.o: ${BUILD_DIR}/config.h vprint.o: ${BUILD_DIR}/config.h +wcsdup.o: ${BUILD_DIR}/config.h xstrchr.o: ${BUILD_DIR}/config.h zcatfd.o: ${BUILD_DIR}/config.h zread.o: ${BUILD_DIR}/config.h @@ -327,6 +333,19 @@ rename.o: ${BASHINCDIR}/posixstat.h setlinebuf.o: ${topdir}/xmalloc.h ${topdir}/bashansi.h setlinebuf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/stdc.h +eaccess.o: ${topdir}/bashtypes.h +eaccess.o: ${BASHINCDIR}/posixstat.h +eaccess.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +eaccess.o: ${BASHINCDIR}/filecntl.h +eaccess.o: ${BASHINCDIR}/stdc.h +eaccess.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h +eaccess.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h +eaccess.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h +eaccess.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h +eaccess.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h +eaccess.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h +eaccess.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h + shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h @@ -450,6 +469,10 @@ fmtumax.o: ${BASHINCDIR}/stdc.h fmtumax.o: ${BASHINCDIR}/typemax.h fmtumax.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h +wcsdup.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h +wcsdup.o: ${BASHINCDIR}/stdc.h +wcsdup.o: ${topdir}/xmalloc.h + xstrchr.o: ${topdir}/bashansi.h xstrchr.o: ${BASHINCDIR}/ansi_stdlib.h xstrchr.o: ${BASHINCDIR}/shmbutil.h diff --git a/lib/sh/eaccess.c b/lib/sh/eaccess.c new file mode 100644 index 00000000..1cff692c --- /dev/null +++ b/lib/sh/eaccess.c @@ -0,0 +1,222 @@ +/* eaccess.c - eaccess replacement for the shell, plus other access functions. */ + +/* Copyright (C) 2006 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + Bash is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with Bash; see the file COPYING. If not, write to the Free Software + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#if defined (HAVE_CONFIG_H) +# include <config.h> +#endif + +#include <stdio.h> + +#include "bashtypes.h" + +#if defined (HAVE_UNISTD_H) +# include <unistd.h> +#endif + +#include "bashansi.h" + +#include <errno.h> +#if !defined (errno) +extern int errno; +#endif /* !errno */ + +#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H) +# include <sys/file.h> +#endif /* !_POSIX_VERSION */ +#include "posixstat.h" +#include "filecntl.h" + +#include "shell.h" + +#if !defined (R_OK) +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 +#endif /* R_OK */ + +static int path_is_devfd __P((const char *)); +static int sh_stataccess __P((char *, int)); +#if HAVE_DECL_SETREGID +static int sh_euidaccess __P((char *, int)); +#endif + +static int +path_is_devfd (path) + const char *path; +{ + if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) + return 1; + else if (STREQN (path, "/dev/std", 8)) + { + if (STREQ (path+8, "in") || STREQ (path+8, "out") || STREQ (path+8, "err")) + return 1; + else + return 0; + } + else + return 0; +} + +/* A wrapper for stat () which disallows pathnames that are empty strings + and handles /dev/fd emulation on systems that don't have it. */ +int +sh_stat (path, finfo) + const char *path; + struct stat *finfo; +{ + if (*path == '\0') + { + errno = ENOENT; + return (-1); + } + if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) + { +#if !defined (HAVE_DEV_FD) + intmax_t fd; + int r; + + if (legal_number (path + 8, &fd) && fd == (int)fd) + { + r = fstat ((int)fd, finfo); + if (r == 0 || errno != EBADF) + return (r); + } + errno = ENOENT; + return (-1); +#else + /* If HAVE_DEV_FD is defined, DEV_FD_PREFIX is defined also, and has a + trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx. + On most systems, with the notable exception of linux, this is + effectively a no-op. */ + char pbuf[32]; + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); + return (stat (pbuf, finfo)); +#endif /* !HAVE_DEV_FD */ + } +#if !defined (HAVE_DEV_STDIN) + else if (STREQN (path, "/dev/std", 8)) + { + if (STREQ (path+8, "in")) + return (fstat (0, finfo)); + else if (STREQ (path+8, "out")) + return (fstat (1, finfo)); + else if (STREQ (path+8, "err")) + return (fstat (2, finfo)); + else + return (stat (path, finfo)); + } +#endif /* !HAVE_DEV_STDIN */ + return (stat (path, finfo)); +} + +/* Do the same thing access(2) does, but use the effective uid and gid, + and don't make the mistake of telling root that any file is + executable. This version uses stat(2). */ +static int +sh_stataccess (path, mode) + char *path; + int mode; +{ + struct stat st; + + if (sh_stat (path, &st) < 0) + return (-1); + + if (current_user.euid == 0) + { + /* Root can read or write any file. */ + if ((mode & X_OK) == 0) + return (0); + + /* Root can execute any file that has any one of the execute + bits set. */ + if (st.st_mode & S_IXUGO) + return (0); + } + + if (st.st_uid == current_user.euid) /* owner */ + mode <<= 6; + else if (group_member (st.st_gid)) + mode <<= 3; + + if (st.st_mode & mode) + return (0); + + errno = EACCES; + return (-1); +} + +#if HAVE_DECL_SETREGID +/* Version to call when uid != euid or gid != egid. We temporarily swap + the effective and real uid and gid as appropriate. */ +static int +sh_euidaccess (path, mode) + char *path; + int mode; +{ + int r, e; + + if (current_user.uid != current_user.euid) + setreuid (current_user.euid, current_user.uid); + if (current_user.gid != current_user.egid) + setregid (current_user.egid, current_user.gid); + + r = access (path, mode); + e = errno; + + if (current_user.uid != current_user.euid) + setreuid (current_user.uid, current_user.euid); + if (current_user.gid != current_user.egid) + setregid (current_user.gid, current_user.egid); + + errno = e; + return r; +} +#endif + +int +sh_eaccess (path, mode) + char *path; + int mode; +{ + if (path_is_devfd (path)) + return (sh_stataccess (path, mode)); + +#if defined (HAVE_EACCESS) /* FreeBSD */ + return (eaccess (path, mode)); +#elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */ + return access (path, mode|EFF_ONLY_OK); +#else + if (mode == F_OK) + return (sh_stataccess (path, mode)); + +# if HAVE_DECL_SETREGID + if (current_user.uid != current_user.euid || current_user.gid != current_user.egid) + return (sh_euidaccess (path, mode)); +# endif + + if (current_user.uid == current_user.euid && current_user.gid == current_user.egid) + return (access (path, mode)); + + return (sh_stataccess (path, mode)); +#endif +} diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c index aaf0c475..d8eec758 100644 --- a/lib/sh/netopen.c +++ b/lib/sh/netopen.c @@ -67,6 +67,16 @@ extern int inet_aton __P((const char *, struct in_addr *)); #endif #ifndef HAVE_GETADDRINFO +static int _getaddr __P((char *, struct in_addr *)); +static int _getserv __P((char *, int, unsigned short *)); +static int _netopen4 __P((char *, char *, int)); +#else /* HAVE_GETADDRINFO */ +static int _netopen6 __P((char *, char *, int)); +#endif + +static int _netopen __P((char *, char *, int)); + +#ifndef HAVE_GETADDRINFO /* Stuff the internet address corresponding to HOST into AP, in network byte order. Return 1 on success, 0 on failure. */ diff --git a/lib/sh/shmatch.c b/lib/sh/shmatch.c index 4508ed02..f03a2ee5 100644 --- a/lib/sh/shmatch.c +++ b/lib/sh/shmatch.c @@ -57,8 +57,7 @@ sh_regmatch (string, pattern, flags) char *subexp_str; int subexp_len; #endif - int result; - + int result; #if defined (ARRAY_VARS) rematch = (SHELL_VAR *)NULL; diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c index 114135f0..4a964746 100644 --- a/lib/sh/snprintf.c +++ b/lib/sh/snprintf.c @@ -65,6 +65,7 @@ #define HAVE_PRINTF_A_FORMAT #endif #define HAVE_ISINF_IN_LIBC +#define HAVE_ISNAN_IN_LIBC #define PREFER_STDARG #define HAVE_STRINGIZE #define HAVE_LIMITS_H @@ -370,6 +371,12 @@ static void xfree __P((void *)); for (; (p)->width > 0; (p)->width--) \ PUT_CHAR((p)->pad, p) +/* pad with zeros from decimal precision */ +#define PAD_ZERO(p) \ + if ((p)->precision > 0) \ + for (; (p)->precision > 0; (p)->precision--) \ + PUT_CHAR('0', p) + /* if width and prec. in the args */ #define STAR_ARGS(p) \ do { \ @@ -651,6 +658,10 @@ number(p, d, base) long sd; int flags; + /* An explicit precision turns off the zero-padding flag. */ + if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) + p->flags &= ~PF_ZEROPAD; + sd = d; /* signed for ' ' padding in base 10 */ flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; if (*p->pf == 'X') @@ -668,6 +679,12 @@ number(p, d, base) p->width -= strlen(tmp); PAD_RIGHT(p); + if ((p->flags & PF_DOT) && p->precision > 0) + { + p->precision -= strlen(tmp); + PAD_ZERO(p); + } + switch (base) { case 10: @@ -711,6 +728,10 @@ lnumber(p, d, base) long long sd; int flags; + /* An explicit precision turns off the zero-padding flag. */ + if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT)) + p->flags &= ~PF_ZEROPAD; + sd = d; /* signed for ' ' padding in base 10 */ flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; if (*p->pf == 'X') @@ -728,6 +749,12 @@ lnumber(p, d, base) p->width -= strlen(tmp); PAD_RIGHT(p); + if ((p->flags & PF_DOT) && p->precision > 0) + { + p->precision -= strlen(tmp); + PAD_ZERO(p); + } + switch (base) { case 10: @@ -881,7 +908,9 @@ isinf(d) #endif return 0; } +#endif +#ifndef HAVE_ISNAN_IN_LIBC static int isnan(d) double d; diff --git a/lib/sh/strtrans.c b/lib/sh/strtrans.c index acf9d69b..1f0290e3 100644 --- a/lib/sh/strtrans.c +++ b/lib/sh/strtrans.c @@ -81,8 +81,18 @@ ansicstr (string, len, flags, sawc, rlen) case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; - case '0': case '1': case '2': case '3': - case '4': case '5': case '6': case '7': + case '1': case '2': case '3': + case '4': case '5': case '6': + case '7': +#if 1 + if (flags & 1) + { + *r++ = '\\'; + break; + } + /*FALLTHROUGH*/ +#endif + case '0': /* If (FLAGS & 1), we're translating a string for echo -e (or the equivalent xpg_echo option), so we obey the SUSv3/ POSIX-2001 requirement and accept 0-3 octal digits after @@ -166,7 +176,7 @@ ansic_quote (str, flags, rlen) int flags, *rlen; { char *r, *ret, *s; - int l, rsize, t; + int l, rsize; unsigned char c; if (str == 0 || *str == 0) diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c index fb7b732d..5f2279d0 100644 --- a/lib/sh/tmpfile.c +++ b/lib/sh/tmpfile.c @@ -47,6 +47,9 @@ extern int errno; extern pid_t dollar_dollar_pid; +static char *get_sys_tmpdir __P((void)); +static char *get_tmpdir __P((int)); + static char *sys_tmpdir = (char *)NULL; static int ntmpfiles; static int tmpnamelen = -1; @@ -55,8 +58,6 @@ static unsigned long filenum = 1L; static char * get_sys_tmpdir () { - struct stat sb; - if (sys_tmpdir) return sys_tmpdir; diff --git a/lib/sh/wcsdup.c b/lib/sh/wcsdup.c new file mode 100644 index 00000000..e0453077 --- /dev/null +++ b/lib/sh/wcsdup.c @@ -0,0 +1,44 @@ +/* wcsdup.c - wcsdup(3) library function */ + +/* Copyright (C) 2006 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + Bash is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with Bash; see the file COPYING. If not, write to the Free Software + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#include <config.h> + +#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) + +#include <stdc.h> +#include <wchar.h> +#include <bashansi.h> +#include <xmalloc.h> + +wchar_t * +wcsdup (ws) + const wchar_t *ws; +{ + wchar_t *ret; + size_t len; + + len = wcslen (ws); + ret = xmalloc ((len + 1) * sizeof (wchar_t)); + if (ret == 0) + return ret; + + return (wcscpy (ret, ws)); +} +#endif /* !HAVE_WCSDUP && HANDLE_MULTIBYTE */ diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c index 8b39c99e..f4696de0 100644 --- a/lib/sh/winsize.c +++ b/lib/sh/winsize.c @@ -55,6 +55,7 @@ extern int shell_tty; #if defined (READLINE) extern void rl_set_screen_size __P((int, int)); #endif +extern void sh_set_lines_and_columns __P((int, int)); void get_new_window_size (from_sig, rp, cp) diff --git a/lib/termcap/termcap.c b/lib/termcap/termcap.c index 780b15ce..0addcc64 100644 --- a/lib/termcap/termcap.c +++ b/lib/termcap/termcap.c @@ -27,6 +27,10 @@ Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #include <fcntl.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #ifdef HAVE_STDLIB_H # include <stdlib.h> #else @@ -35,6 +39,14 @@ extern char *malloc (); extern char *realloc (); #endif +#if defined (HAVE_STRING_H) +#include <string.h> +#endif + +#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS)) +# define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + #else /* not HAVE_CONFIG_H */ #ifdef STDC_HEADERS diff --git a/lib/termcap/tparam.c b/lib/termcap/tparam.c index 1c83f045..644042d2 100644 --- a/lib/termcap/tparam.c +++ b/lib/termcap/tparam.c @@ -27,6 +27,14 @@ extern char *malloc (); extern char *realloc (); #endif +#if defined (HAVE_STRING_H) +#include <string.h> +#endif + +#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS)) +# define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif + #else /* not HAVE_CONFIG_H */ #if defined(HAVE_STRING_H) || defined(STDC_HEADERS) diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c index d757f7a9..1b76c9f2 100644 --- a/lib/tilde/tilde.c +++ b/lib/tilde/tilde.c @@ -404,17 +404,17 @@ tilde_expand_word (filename) free (expansion); } } - free (username); /* If we don't have a failure hook, or if the failure hook did not expand the tilde, return a copy of what we were passed. */ if (dirname == 0) dirname = savestring (filename); } +#if defined (HAVE_GETPWENT) else - { - free (username); - dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); - } + dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); +#endif + + free (username); #if defined (HAVE_GETPWENT) endpwent (); #endif @@ -78,7 +78,6 @@ void set_default_locale_vars () { char *val; - int r; #if defined (HAVE_SETLOCALE) @@ -251,6 +250,20 @@ set_lang (var, value) return ((lc_all == 0 || *lc_all == 0) ? reset_locale_vars () : 0); } +/* Set default values for LANG and LC_ALL. Default values for all other + locale-related variables depend on these. */ +void +set_default_lang () +{ + char *v; + + v = get_string_value ("LC_ALL"); + set_locale_var ("LC_ALL", v); + + v = get_string_value ("LANG"); + set_lang ("LANG", v); +} + /* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE). The precedence is as POSIX.2 specifies: LC_ALL has precedence over the specific locale variables, and LANG, if set, is used as the default. */ @@ -267,7 +280,7 @@ get_locale_var (var) if (locale == 0 || *locale == 0) locale = lang; if (locale == 0 || *locale == 0) - locale = default_locale; /* system-dependent; not really portable */ + locale = default_locale; /* system-dependent; not really portable. should it be "C"? */ return (locale); } @@ -279,12 +292,9 @@ static int reset_locale_vars () { #if defined (HAVE_SETLOCALE) - char *locale; - - locale = lang; - if (locale == 0 || *locale == '\0') - locale = default_locale; - if (setlocale (LC_ALL, locale) == 0) + if (lang == 0 || *lang == '\0') + maybe_make_export_env (); /* trust that this will change environment for setlocale */ + if (setlocale (LC_ALL, lang ? lang : "") == 0) return 0; # if defined (LC_CTYPE) @@ -487,10 +497,13 @@ locale_setblanks () for (x = 0; x < sh_syntabsiz; x++) { if (isblank (x)) - sh_syntaxtab[x] |= CSHBRK; + sh_syntaxtab[x] |= CSHBRK|CBLANK; else if (member (x, shell_break_chars)) - sh_syntaxtab[x] |= CSHBRK; + { + sh_syntaxtab[x] |= CSHBRK; + sh_syntaxtab[x] &= ~CBLANK; + } else - sh_syntaxtab[x] &= ~CSHBRK; + sh_syntaxtab[x] &= ~(CSHBRK|CBLANK); } } @@ -610,6 +610,11 @@ make_here_document (temp) line = full_line; line_number++; + /* If set -v is in effect, echo the line read. read_secondary_line/ + read_a_line leaves the newline at the end, so don't print another. */ + if (echo_input_at_read) + fprintf (stderr, "%s", line); + if (kill_leading && *line) { /* Hack: To be compatible with some Bourne shells, we @@ -750,7 +755,6 @@ make_function_def (name, command, lineno, lstart) #if defined (ARRAY_VARS) SHELL_VAR *bash_source_v; ARRAY *bash_source_a; - char *t; #endif temp = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF)); @@ -62,6 +62,7 @@ struct wordflag { { CXQUOTE, "CXQUOTE" }, { CSPECVAR, "CSPECVAR" }, { CSUBSTOP, "CSUBSTOP" }, + { CBLANK, "CBLANK" }, }; #define N_WFLAGS (sizeof (wordflags) / sizeof (wordflags[0])) @@ -196,6 +197,22 @@ addcchar (c, flag) lsyntax[c] |= flag; } +static void +addblanks () +{ + register int i; + unsigned char uc; + + for (i = 0; i < SYNSIZE; i++) + { + uc = i; + /* Since we don't call setlocale(), this defaults to the "C" locale, and + the default blank characters will be space and tab. */ + if (isblank (uc)) + lsyntax[uc] |= CBLANK; + } +} + /* load up the correct flag values in lsyntax */ static void load_lsyntax () @@ -230,6 +247,8 @@ load_lsyntax () addcstr ("@*#?-$!", CSPECVAR); /* omits $0...$9 and $_ */ addcstr ("-=?+", CSUBSTOP); /* OP in ${paramOPword} */ + + addblanks (); } static void @@ -3,7 +3,7 @@ /* This file works under BSD, System V, minix, and Posix systems. It does not implement job control. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -429,9 +429,11 @@ reap_zombie_children () pid_t pid; WAIT status; + CHECK_TERMSIG; while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0) set_pid_status (pid, status); # endif /* WNOHANG */ + CHECK_TERMSIG; } #endif /* WAITPID */ @@ -584,6 +586,7 @@ wait_for_single_pid (pid) siginterrupt (SIGINT, 1); while ((got_pid = WAITPID (pid, &status, 0)) != pid) { + CHECK_TERMSIG; if (got_pid < 0) { if (errno != EINTR && errno != ECHILD) @@ -737,6 +740,7 @@ wait_for (pid) while ((got_pid = WAITPID (-1, &status, 0)) != pid) /* XXX was pid now -1 */ { + CHECK_TERMSIG; if (got_pid < 0 && errno == ECHILD) { #if !defined (_POSIX_VERSION) @@ -775,7 +779,7 @@ wait_for (pid) if (maybe_call_trap_handler (SIGINT) == 0) { if (temp_handler == SIG_DFL) - termination_unwind_protect (SIGINT); + termsig_handler (SIGINT); else if (temp_handler != INVALID_SIGNAL_HANDLER && temp_handler != SIG_IGN) (*temp_handler) (SIGINT); } @@ -1,6 +1,6 @@ /* Yacc grammar for bash. */ -/* Copyright (C) 1989-2005 Free Software Foundation, Inc. +/* Copyright (C) 1989-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -118,7 +118,6 @@ extern int current_command_number; extern int sourcelevel; extern int posixly_correct; extern int last_command_exit_value; -extern int interrupt_immediately; extern char *shell_name, *current_host_name; extern char *dist_version; extern int patch_level; @@ -206,10 +205,6 @@ static void reset_readline_prompt __P((void)); #endif static void print_prompt __P((void)); -#if defined (HISTORY) -char *history_delimiting_chars __P((void)); -#endif - #if defined (HANDLE_MULTIBYTE) static void set_line_mbstate __P((void)); static char *shell_input_line_property = NULL; @@ -1212,10 +1207,12 @@ yy_readline_get () old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler); interrupt_immediately++; } + terminate_immediately = 1; current_readline_line = readline (current_readline_prompt ? current_readline_prompt : ""); + terminate_immediately = 0; if (signal_is_ignored (SIGINT) == 0 && old_sigint) { interrupt_immediately--; @@ -1347,10 +1344,16 @@ yy_stream_get () if (bash_input.location.file) { if (interactive) - interrupt_immediately++; + { + interrupt_immediately++; + terminate_immediately++; + } result = getc_with_restart (bash_input.location.file); if (interactive) - interrupt_immediately--; + { + interrupt_immediately--; + terminate_immediately--; + } } return (result); } @@ -1869,7 +1872,6 @@ shell_getc (remove_quoted_newline) register int i; int c; unsigned char uc; - static int mustpop = 0; QUIT; @@ -2142,8 +2144,8 @@ discard_until (character) } void -execute_prompt_command (command) - char *command; +execute_variable_command (command, vname) + char *command, *vname; { char *last_lastarg; sh_parser_state_t ps; @@ -2153,7 +2155,7 @@ execute_prompt_command (command) if (last_lastarg) last_lastarg = savestring (last_lastarg); - parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); + parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); restore_parser_state (&ps); bind_variable ("_", last_lastarg, 0); @@ -2556,7 +2558,7 @@ read_token (command) #endif /* ALIAS */ /* Read a single word from input. Start by skipping blanks. */ - while ((character = shell_getc (1)) != EOF && whitespace (character)) + while ((character = shell_getc (1)) != EOF && shellblank (character)) ; if (character == EOF) @@ -2716,6 +2718,7 @@ read_token (command) #define P_ALLOWESC 0x02 #define P_DQUOTE 0x04 #define P_COMMAND 0x08 /* parsing a command, so look for comments */ +#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */ static char matched_pair_error; static char * @@ -2725,12 +2728,13 @@ parse_matched_pair (qc, open, close, lenp, flags) int *lenp, flags; { int count, ch, was_dollar, in_comment, check_comment; - int pass_next_character, nestlen, ttranslen, start_lineno; + int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; int retind, retsize, rflags; +/* itrace("parse_matched_pair: open = %c close = %c", open, close); */ count = 1; - pass_next_character = was_dollar = in_comment = 0; + pass_next_character = backq_backslash = was_dollar = in_comment = 0; check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; /* RFLAGS is the set of flags we want to pass to recursive calls. */ @@ -2742,11 +2746,8 @@ parse_matched_pair (qc, open, close, lenp, flags) start_lineno = line_number; while (count) { -#if 0 - ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0); -#else - ch = shell_getc (qc != '\'' && pass_next_character == 0); -#endif + ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0); + if (ch == EOF) { free (ret); @@ -2770,10 +2771,19 @@ parse_matched_pair (qc, open, close, lenp, flags) continue; } - /* Not exactly right yet */ - else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1]))) + /* Not exactly right yet, should handle shell metacharacters, too. If + any changes are made to this test, make analogous changes to subst.c: + extract_delimited_string(). */ + else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1]))) in_comment = 1; + /* last char was backslash inside backquoted command substitution */ + if (backq_backslash) + { + backq_backslash = 0; + /* Placeholder for adding special characters */ + } + if (pass_next_character) /* last char was backslash */ { pass_next_character = 0; @@ -2798,11 +2808,9 @@ parse_matched_pair (qc, open, close, lenp, flags) } else if MBTEST(ch == close) /* ending delimiter */ count--; -#if 1 /* handle nested ${...} specially. */ else if MBTEST(open != close && was_dollar && open == '{' && ch == open) /* } */ count++; -#endif else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */ count++; @@ -2814,6 +2822,10 @@ parse_matched_pair (qc, open, close, lenp, flags) { if MBTEST((flags & P_ALLOWESC) && ch == '\\') pass_next_character++; +#if 0 + else if MBTEST((flags & P_BACKQUOTE) && ch == '\\') + backq_backslash++; +#endif continue; } @@ -2896,18 +2908,24 @@ add_nestret: } FREE (nestret); } +#if 0 else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0) { - nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags); + /* Add P_BACKQUOTE so backslash quotes the next character and + shell_getc does the right thing with \<newline>. We do this for + a measure of backwards compatibility -- it's not strictly the + right POSIX thing. */ + nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE); goto add_nestret; } - else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ +#endif + else if MBTEST(open != '`' && was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ /* check for $(), $[], or ${} inside quoted string. */ { if (open == ch) /* undo previous increment */ count--; if (ch == '(') /* ) */ - nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags); + nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE); else if (ch == '{') /* } */ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); else if (ch == '[') /* ] */ @@ -2933,8 +2951,8 @@ static int parse_dparen (c) int c; { - int cmdtyp, len, sline; - char *wval, *wv2; + int cmdtyp, sline; + char *wval; WORD_DESC *wd; #if defined (ARITH_FOR_COMMAND) @@ -2946,7 +2964,6 @@ parse_dparen (c) { wd = alloc_word_desc (); wd->word = wval; - wd = make_word (wval); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); return (ARITH_FOR_EXPRS); } @@ -3496,7 +3513,7 @@ read_token_word (character) } else { - /* Try to locale)-expand the converted string. */ + /* Try to locale-expand the converted string. */ ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen); free (ttok); @@ -3578,7 +3595,7 @@ read_token_word (character) FREE (ttok); all_digit_token = 0; compound_assignment = 1; -#if 0 +#if 1 goto next_character; #else goto got_token; /* ksh93 seems to do this */ @@ -3676,8 +3693,8 @@ got_token: if (dollar_present) the_word->flags |= W_HASDOLLAR; if (quoted) - the_word->flags |= W_QUOTED; - if (compound_assignment) + the_word->flags |= W_QUOTED; /*(*/ + if (compound_assignment && token[token_index-1] == ')') the_word->flags |= W_COMPASSIGN; /* A word is an assignment if it appears at the beginning of a simple command, or after another assignment word. This is @@ -3695,7 +3712,9 @@ got_token: struct builtin *b; b = builtin_address_internal (token, 0); if (b && (b->flags & ASSIGNMENT_BUILTIN)) - parser_state |= PST_ASSIGNOK; + parser_state |= PST_ASSIGNOK; + else if (STREQ (token, "eval") || STREQ (token, "let")) + parser_state |= PST_ASSIGNOK; } yylval.word = the_word; @@ -3974,7 +3993,7 @@ decode_prompt_string (string) int last_exit_value; #if defined (PROMPT_STRING_DECODE) int result_size, result_index; - int c, n; + int c, n, i; char *temp, octal_string[4]; struct tm *tm; time_t the_time; @@ -4136,7 +4155,7 @@ decode_prompt_string (string) case 'W': { /* Use the value of PWD because it is much more efficient. */ - char t_string[PATH_MAX], *t; + char t_string[PATH_MAX]; int tlen; temp = get_string_value ("PWD"); @@ -4246,9 +4265,12 @@ decode_prompt_string (string) break; } temp = (char *)xmalloc (3); - temp[0] = '\001'; - temp[1] = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; - temp[2] = '\0'; + n = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; + i = 0; + if (n == CTLESC || n == CTLNUL) + temp[i++] = CTLESC; + temp[i++] = n; + temp[i] = '\0'; goto add_string; #endif /* READLINE */ @@ -4344,15 +4366,15 @@ yyerror (msg) } static char * -error_token_from_token (token) - int token; +error_token_from_token (tok) + int tok; { char *t; - if (t = find_token_in_alist (token, word_token_alist, 0)) + if (t = find_token_in_alist (tok, word_token_alist, 0)) return t; - if (t = find_token_in_alist (token, other_token_alist, 0)) + if (t = find_token_in_alist (tok, other_token_alist, 0)) return t; t = (char *)NULL; @@ -4686,18 +4708,21 @@ parse_compound_assignment (retlenp) int *retlenp; { WORD_LIST *wl, *rl; - int tok, orig_line_number, orig_token_size; + int tok, orig_line_number, orig_token_size, orig_last_token, assignok; char *saved_token, *ret; saved_token = token; orig_token_size = token_buffer_size; orig_line_number = line_number; + orig_last_token = last_read_token; last_read_token = WORD; /* WORD to allow reserved words here */ token = (char *)NULL; token_buffer_size = 0; + assignok = parser_state&PST_ASSIGNOK; /* XXX */ + wl = (WORD_LIST *)NULL; /* ( */ parser_state |= PST_COMPASSIGN; @@ -4740,7 +4765,8 @@ parse_compound_assignment (retlenp) jump_to_top_level (DISCARD); } - last_read_token = WORD; + last_read_token = orig_last_token; /* XXX - was WORD? */ + if (wl) { rl = REVERSE_LIST (wl, WORD_LIST *); @@ -4752,6 +4778,10 @@ parse_compound_assignment (retlenp) if (retlenp) *retlenp = (ret && *ret) ? strlen (ret) : 0; + + if (assignok) + parser_state |= PST_ASSIGNOK; + return ret; } diff --git a/patchlevel.h b/patchlevel.h index b11fc16d..246f7eed 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1,6 +1,6 @@ /* patchlevel.h -- current bash patch level */ -/* Copyright (C) 2001-2005 Free Software Foundation, Inc. +/* Copyright (C) 2001-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. diff --git a/pcomplete.c b/pcomplete.c index ee462dc8..471fb54f 100644 --- a/pcomplete.c +++ b/pcomplete.c @@ -815,7 +815,7 @@ gen_wordlist_matches (cs, text) { WORD_LIST *l, *l2; STRINGLIST *sl; - int nw, tlen, qc; + int nw, tlen; char *ntxt; /* dequoted TEXT to use in comparisons */ if (cs->words == 0 || cs->words[0] == '\0') @@ -1,2 +1,2 @@ # Set of available languages. -en@quot en@boldquot +en@quot en@boldquot ru diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 00000000..5eecad93 --- /dev/null +++ b/po/ru.po @@ -0,0 +1,2560 @@ +# Russian translations for GNU bash package +# áÎÇÌÉÊÓËÉÅ ÐÅÒÅ×ÏÄÙ ÄÌÑ ÐÁËÅÔÁ GNU bash. +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is distributed under the same license as the GNU bash package. +# <dushistov@mail.ru>, 2006. +# +msgid "" +msgstr "" +"Project-Id-Version: GNU bash 3.1-release\n" +"POT-Creation-Date: 2005-10-03 17:31-0400\n" +"PO-Revision-Date: 2006-01-05 21:28+0300\n" +"Last-Translator: Evgeniy Dushistov <dushistov@mail.ru>\n" +"Language-Team: Russian <ru@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#: arrayfunc.c:48 +msgid "bad array subscript" +msgstr "ÎÅÐÒÁ×ÉÌØÎÙÊ ÉÎÄÅËÓ ÍÁÓÓÉ×Á" + +#: arrayfunc.c:360 +#, c-format +msgid "%s: cannot assign to non-numeric index" +msgstr "%s; ÎÅ ÍÏÇÕ ÐÒÉÐÉÓÁÔØ ÎÅ ÞÉÓÌÏ×ÏÊ ÉÎÄÅËÓ" + +#: bashhist.c:328 +#, c-format +msgid "%s: cannot create: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ: %s" + +#: bashline.c:2947 +msgid "bash_execute_unix_command: cannot find keymap for command" +msgstr "" + +#: bashline.c:2996 +#, c-format +msgid "%s: first non-whitespace character is not `\"'" +msgstr "%s: ÐÅÒ×ÙÊ ÎÅÐÒÏÂÅÌØÎÙÊ ÓÉÍ×ÏÌ ÎÅ `\"'" + +#: bashline.c:3025 +#, c-format +msgid "no closing `%c' in %s" +msgstr "ÎÅÔ ÚÁËÒÙ×ÁÀÝÅÇÏ `%c' × %s" + +#: bashline.c:3059 +#, c-format +msgid "%s: missing colon separator" +msgstr "%s: ÐÒÏÐÕÝÅÎ ÒÁÚÄÅÌÉÔÅÌØ Ä×ÏÅÔÏÞÉÅ" + +#: builtins/bind.def:194 +#, c-format +msgid "`%s': invalid keymap name" +msgstr "" + +#: builtins/bind.def:233 +#, c-format +msgid "%s: cannot read: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÐÒÏÞÉÔÁÔØ: %s" + +#: builtins/bind.def:248 +#, c-format +msgid "`%s': cannot unbind" +msgstr "" + +#: builtins/bind.def:283 +#, c-format +msgid "`%s': unknown function name" +msgstr "`%s': ÉÍÑ ÆÕÎËÃÉÉ ÎÅÉÚ×ÅÓÔÎÏ" + +#: builtins/bind.def:291 +#, c-format +msgid "%s is not bound to any keys.\n" +msgstr "%s ÎÅ ÐÒÉ×ÑÚÁÎÁ ÎÅ Ë ÏÄÎÏÊ ÉÚ ËÌÁ×ÉÛ.\n" + +#: builtins/bind.def:295 +#, c-format +msgid "%s can be invoked via " +msgstr "%s ÍÏÖÅÔ ÂÙÔØ ×ÙÚ×ÁÎ Ó ÐÏÍÏÝØÀ" + +#: builtins/break.def:128 +msgid "only meaningful in a `for', `while', or `until' loop" +msgstr "ÉÍÅÅÔ ÓÍÙÓÌ ÔÏÌØËÏ × ÃÉËÌÁÈ `for', `while', ÉÌÉ `until'" + +#: builtins/caller.def:132 +msgid "Returns the context of the current subroutine call." +msgstr "" + +#: builtins/caller.def:133 +#: builtins/caller.def:137 +#: builtins/pushd.def:660 +#: builtins/pushd.def:668 +#: builtins/pushd.def:671 +#: builtins/pushd.def:681 +#: builtins/pushd.def:685 +#: builtins/pushd.def:689 +#: builtins/pushd.def:692 +#: builtins/pushd.def:695 +#: builtins/pushd.def:704 +#: builtins/pushd.def:708 +#: builtins/pushd.def:712 +#: builtins/pushd.def:715 +msgid " " +msgstr "" + +#: builtins/caller.def:134 +msgid "Without EXPR, returns returns \"$line $filename\". With EXPR," +msgstr "âÅÚ ÷ùòáö ×ÏÚ×ÒÁÝÁÅÔ \"$ÓÔÒÏËÁ $ÉÍÑÆÁÊÌÁ\". ó ÷ùòáö," + +#: builtins/caller.def:135 +msgid "returns \"$line $subroutine $filename\"; this extra information" +msgstr "÷ÏÚ×ÒÁÝÁÅÔ \"$ÓÔÒÏËÁ $ÐÒÏÃÅÄÕÒÁ $ÉÍÑÆÁÊÌÁ\"; ÜÔÁ ÄÏÐÏÌÎÉÔÅÌØÎÁÑ ÉÎÆÏÒÍÁÃÉÑ " + +#: builtins/caller.def:136 +msgid "can be used used to provide a stack trace." +msgstr "ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ÄÌÑ ÓÏÚÄÁÎÉÑ `stack trace'" + +#: builtins/caller.def:138 +msgid "The value of EXPR indicates how many call frames to go back before the" +msgstr "" + +#: builtins/caller.def:139 +msgid "current one; the top frame is frame 0." +msgstr "" + +#: builtins/cd.def:203 +msgid "HOME not set" +msgstr "ÐÅÒÅÍÅÎÎÁÑ HOME ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁ" + +#: builtins/cd.def:215 +msgid "OLDPWD not set" +msgstr "ÐÅÒÅÍÅÎÎÁÑ OLDPWD ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁ" + +#: builtins/common.c:133 +#: test.c:921 +msgid "too many arguments" +msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÁÒÇÕÍÅÎÔÏ×" + +#: builtins/common.c:157 +#: shell.c:474 +#: shell.c:747 +#, c-format +msgid "%s: option requires an argument" +msgstr "%s: ÏÐÃÉÑ ÔÒÅÂÕÅÔ ÁÒÇÕÍÅÎÔÁ" + +#: builtins/common.c:164 +#, c-format +msgid "%s: numeric argument required" +msgstr "%s: ÔÒÅÂÕÅÔÓÑ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ" + +#: builtins/common.c:171 +#, c-format +msgid "%s: not found" +msgstr "%s: ÎÅ ÎÁÊÄÅÎ" + +#: builtins/common.c:180 +#: shell.c:760 +#, c-format +msgid "%s: invalid option" +msgstr "%s: ÎÅÐÒÁ×ÉÌØÎÁÑ ÏÐÃÉÑ" + +#: builtins/common.c:187 +#, c-format +msgid "%s: invalid option name" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ" + +#: builtins/common.c:194 +#: general.c:231 +#: general.c:236 +#, c-format +msgid "`%s': not a valid identifier" +msgstr "`%s': ÎÅÐÒÁ×ÉÌØÎÙÊ ÉÄÅÎÔÉÆÉËÁÔÏÒ" + +#: builtins/common.c:201 +#, c-format +msgid "%s: invalid number" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ" + +#: builtins/common.c:208 +#, c-format +msgid "%s: invalid signal specification" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÁÑ ÓÐÅÃÉÆÉËÁÃÉÑ ÓÉÇÎÁÌÁ" + +#: builtins/common.c:215 +#, c-format +msgid "`%s': not a pid or valid job spec" +msgstr "`%s': ÎÅ ÉÄÅÎÔÉÆÉËÁÔÏÒ ÐÒÏÃÅÓÓÁ ÉÌÉ ÐÒÁ×ÉÌØÎÏÅ ÉÍÑ ÚÁÄÁÞÉ" + +#: builtins/common.c:222 +#: error.c:453 +#, c-format +msgid "%s: readonly variable" +msgstr "%s: ÄÏÓÔÕÐÎÁÑ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅ ÐÅÒÅÍÅÎÎÁÑ" + +#: builtins/common.c:230 +#, c-format +msgid "%s: %s out of range" +msgstr "%s: %s ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ ÄÏÐÕÓÔÉÍÙÈ ÚÎÁÞÅÎÉÊ" + +#: builtins/common.c:230 +#: builtins/common.c:232 +msgid "argument" +msgstr "ÁÒÇÕÍÅÎÔ" + +#: builtins/common.c:232 +#, c-format +msgid "%s out of range" +msgstr "%s ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ ÄÏÐÕÓÔÉÍÙÈ ÚÎÁÞÅÎÉÊ" + +#: builtins/common.c:240 +#, c-format +msgid "%s: no such job" +msgstr "%s: ÎÅ ÔÁËÏÊ ÚÁÄÁÞÉ" + +#: builtins/common.c:248 +#, c-format +msgid "%s: no job control" +msgstr "" + +#: builtins/common.c:250 +msgid "no job control" +msgstr "" + +#: builtins/common.c:260 +#, c-format +msgid "%s: restricted" +msgstr "" + +#: builtins/common.c:262 +msgid "restricted" +msgstr "" + +#: builtins/common.c:270 +#, c-format +msgid "%s: not a shell builtin" +msgstr "%s: ÎÅ ×ÓÔÒÏÅÎÎÁ × ÏÂÏÌÏÞËÕ" + +#: builtins/common.c:276 +#, c-format +msgid "write error: %s" +msgstr "ÏÛÉÂËÁ ÚÁÐÉÓÉ: %s" + +#: builtins/common.c:484 +#, c-format +msgid "%s: error retrieving current directory: %s: %s\n" +msgstr "%s: ÏÛÉÂËÁ ÐÏÌÕÞÅÎÉÑ ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ: %s: %s\n" + +#: builtins/common.c:550 +#: builtins/common.c:552 +#, c-format +msgid "%s: ambiguous job spec" +msgstr "" + +#: builtins/complete.def:251 +#, c-format +msgid "%s: invalid action name" +msgstr "" + +#: builtins/complete.def:381 +#: builtins/complete.def:524 +#, c-format +msgid "%s: no completion specification" +msgstr "" + +#: builtins/complete.def:571 +msgid "warning: -F option may not work as you expect" +msgstr "" + +#: builtins/complete.def:573 +msgid "warning: -C option may not work as you expect" +msgstr "" + +#: builtins/declare.def:105 +msgid "can only be used in a function" +msgstr "ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ÔÏÌØËÏ × ÆÕÎËÃÉÉ" + +#: builtins/declare.def:301 +msgid "cannot use `-f' to make functions" +msgstr "" + +#: builtins/declare.def:313 +#: execute_cmd.c:3986 +#, c-format +msgid "%s: readonly function" +msgstr "%s: ÄÏÓÔÕÐÎÁÑ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅ ÆÕÎËÃÉÑ" + +#: builtins/declare.def:401 +#, c-format +msgid "%s: cannot destroy array variables in this way" +msgstr "%s: ÎÅ ÍÏÇÕ ÕÄÁÌÉÔØ ÐÅÒÅÍÅÎÎÕÀ-ÍÁÓÓÉ× ÔÁËÉÍ ÓÐÏÓÏÂÏÍ" + +#: builtins/enable.def:128 +#: builtins/enable.def:136 +msgid "dynamic loading not available" +msgstr "" + +#: builtins/enable.def:303 +#, c-format +msgid "cannot open shared object %s: %s" +msgstr "" + +#: builtins/enable.def:326 +#, c-format +msgid "cannot find %s in shared object %s: %s" +msgstr "" + +#: builtins/enable.def:450 +#, c-format +msgid "%s: not dynamically loaded" +msgstr "" + +#: builtins/enable.def:465 +#, c-format +msgid "%s: cannot delete: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÕÄÁÌÉÔØ: %s" + +#: builtins/evalfile.c:129 +#: execute_cmd.c:3852 +#: shell.c:1408 +#, c-format +msgid "%s: is a directory" +msgstr "%s: Ñ×ÌÑÅÔÓÑ ÄÉÒÅËÔÏÒÉÅÊ" + +#: builtins/evalfile.c:134 +#, c-format +msgid "%s: not a regular file" +msgstr "%s: ÎÅ Ñ×ÌÑÅÔÓÑ ÏÂÙÞÎÙÍ ÆÁÊÌÏÍ" + +#: builtins/evalfile.c:142 +#, c-format +msgid "%s: file is too large" +msgstr "%s: ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ ÆÁÊÌ" + +#: builtins/exec.def:205 +#, c-format +msgid "%s: cannot execute: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÚÁÐÕÓÔÉÔØ: %s" + +#: builtins/exit.def:83 +msgid "not login shell: use `exit'" +msgstr "ÏÂÏÌÏÞËÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÚÁÐÕÝÅÎÎÏÊ ÐÏÓÌÅ ×ÈÏÄÁ × ÓÉÓÔÅÍÕ: ÉÓÐÏÌØÚÕÊÔÅ `exit' " + +#: builtins/exit.def:111 +msgid "There are stopped jobs.\n" +msgstr "åÓÔØ ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÅ ÚÁÄÁÞÉ.\n" + +#: builtins/fc.def:259 +msgid "no command found" +msgstr "ÎÅ ÎÁÛÅÌ ÔÁËÕÀ ËÏÍÁÎÄÕ" + +#: builtins/fc.def:329 +msgid "history specification" +msgstr "" + +#: builtins/fc.def:350 +#, c-format +msgid "%s: cannot open temp file: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ: %s" + +#: builtins/fg_bg.def:149 +#, c-format +msgid "job %d started without job control" +msgstr "" + +#: builtins/getopt.c:109 +#, c-format +msgid "%s: illegal option -- %c\n" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÁÑ ÏÐÃÉÑ -- %c\n" + +#: builtins/getopt.c:110 +#, c-format +msgid "%s: option requires an argument -- %c\n" +msgstr "" + +#: builtins/hash.def:83 +msgid "hashing disabled" +msgstr "" + +#: builtins/hash.def:128 +#, c-format +msgid "%s: hash table empty\n" +msgstr "" + +#: builtins/help.def:108 +msgid "Shell commands matching keywords `" +msgstr "" + +#: builtins/help.def:110 +msgid "Shell commands matching keyword `" +msgstr "" + +#: builtins/help.def:138 +#, c-format +msgid "no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'." +msgstr "" + +#: builtins/help.def:164 +#, c-format +msgid "%s: cannot open: %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ: %s" + +#: builtins/help.def:182 +msgid "" +"These shell commands are defined internally. Type `help' to see this list.\n" +"Type `help name' to find out more about the function `name'.\n" +"Use `info bash' to find out more about the shell in general.\n" +"Use `man -k' or `info' to find out more about commands not in this list.\n" +"\n" +"A star (*) next to a name means that the command is disabled.\n" +"\n" +msgstr "" + +#: builtins/history.def:150 +msgid "cannot use more than one of -anrw" +msgstr "" + +#: builtins/history.def:182 +msgid "history position" +msgstr "" + +#: builtins/history.def:400 +#, c-format +msgid "%s: history expansion failed" +msgstr "" + +#: builtins/jobs.def:99 +msgid "no other options allowed with `-x'" +msgstr "" + +#: builtins/kill.def:187 +#, c-format +msgid "%s: arguments must be process or job IDs" +msgstr "" + +#: builtins/kill.def:250 +msgid "Unknown error" +msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ" + +#: builtins/let.def:94 +#: builtins/let.def:119 +#: expr.c:497 +#: expr.c:512 +msgid "expression expected" +msgstr "ÏÖÉÄÁÌÏÓØ ×ÙÒÁÖÅÎÉÅ" + +#: builtins/printf.def:327 +#, c-format +msgid "`%s': missing format character" +msgstr "`%s': ÐÒÏÐÕÝÅÎ ÓÉÍ×ÏÌ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÑ" + +#: builtins/printf.def:502 +#, c-format +msgid "`%c': invalid format character" +msgstr "%c': ÎÅÄÏÐÕÓÔÉÍÙÊ ÓÉÍ×ÏÌ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÑ" + +#: builtins/printf.def:708 +msgid "missing hex digit for \\x" +msgstr "" + +#: builtins/pushd.def:173 +msgid "no other directory" +msgstr "ÎÅÔ ÄÒÕÇÏÊ ÄÉÒÅËÔÏÒÉÉ" + +#: builtins/pushd.def:440 +msgid "<no current directory>" +msgstr "" + +#: builtins/pushd.def:657 +msgid "Display the list of currently remembered directories. Directories" +msgstr "" + +#: builtins/pushd.def:658 +msgid "find their way onto the list with the `pushd' command; you can get" +msgstr "" + +#: builtins/pushd.def:659 +msgid "back up through the list with the `popd' command." +msgstr "" + +#: builtins/pushd.def:661 +msgid "The -l flag specifies that `dirs' should not print shorthand versions" +msgstr "" + +#: builtins/pushd.def:662 +msgid "of directories which are relative to your home directory. This means" +msgstr "" + +#: builtins/pushd.def:663 +msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag" +msgstr "" + +#: builtins/pushd.def:664 +msgid "causes `dirs' to print the directory stack with one entry per line," +msgstr "" + +#: builtins/pushd.def:665 +msgid "prepending the directory name with its position in the stack. The -p" +msgstr "" + +#: builtins/pushd.def:666 +msgid "flag does the same thing, but the stack position is not prepended." +msgstr "" + +#: builtins/pushd.def:667 +msgid "The -c flag clears the directory stack by deleting all of the elements." +msgstr "" + +#: builtins/pushd.def:669 +msgid "+N displays the Nth entry counting from the left of the list shown by" +msgstr "" + +#: builtins/pushd.def:670 +#: builtins/pushd.def:673 +msgid " dirs when invoked without options, starting with zero." +msgstr "" + +#: builtins/pushd.def:672 +msgid "-N displays the Nth entry counting from the right of the list shown by" +msgstr "" + +#: builtins/pushd.def:678 +msgid "Adds a directory to the top of the directory stack, or rotates" +msgstr "" + +#: builtins/pushd.def:679 +msgid "the stack, making the new top of the stack the current working" +msgstr "" + +#: builtins/pushd.def:680 +msgid "directory. With no arguments, exchanges the top two directories." +msgstr "" + +#: builtins/pushd.def:682 +msgid "+N Rotates the stack so that the Nth directory (counting" +msgstr "" + +#: builtins/pushd.def:683 +msgid " from the left of the list shown by `dirs', starting with" +msgstr "" + +#: builtins/pushd.def:684 +#: builtins/pushd.def:688 +msgid " zero) is at the top." +msgstr "" + +#: builtins/pushd.def:686 +msgid "-N Rotates the stack so that the Nth directory (counting" +msgstr "" + +#: builtins/pushd.def:687 +msgid " from the right of the list shown by `dirs', starting with" +msgstr "" + +#: builtins/pushd.def:690 +msgid "-n suppress the normal change of directory when adding directories" +msgstr "" + +#: builtins/pushd.def:691 +msgid " to the stack, so only the stack is manipulated." +msgstr "" + +#: builtins/pushd.def:693 +msgid "dir adds DIR to the directory stack at the top, making it the" +msgstr "" + +#: builtins/pushd.def:694 +msgid " new current working directory." +msgstr "" + +#: builtins/pushd.def:696 +#: builtins/pushd.def:716 +msgid "You can see the directory stack with the `dirs' command." +msgstr "" + +#: builtins/pushd.def:701 +msgid "Removes entries from the directory stack. With no arguments," +msgstr "" + +#: builtins/pushd.def:702 +msgid "removes the top directory from the stack, and cd's to the new" +msgstr "" + +#: builtins/pushd.def:703 +msgid "top directory." +msgstr "" + +#: builtins/pushd.def:705 +msgid "+N removes the Nth entry counting from the left of the list" +msgstr "" + +#: builtins/pushd.def:706 +msgid " shown by `dirs', starting with zero. For example: `popd +0'" +msgstr "" + +#: builtins/pushd.def:707 +msgid " removes the first directory, `popd +1' the second." +msgstr "" + +#: builtins/pushd.def:709 +msgid "-N removes the Nth entry counting from the right of the list" +msgstr "" + +#: builtins/pushd.def:710 +msgid " shown by `dirs', starting with zero. For example: `popd -0'" +msgstr "" + +#: builtins/pushd.def:711 +msgid " removes the last directory, `popd -1' the next to last." +msgstr "" + +#: builtins/pushd.def:713 +msgid "-n suppress the normal change of directory when removing directories" +msgstr "" + +#: builtins/pushd.def:714 +msgid " from the stack, so only the stack is manipulated." +msgstr "" + +#: builtins/read.def:211 +#, c-format +msgid "%s: invalid timeout specification" +msgstr "" + +#: builtins/read.def:234 +#, c-format +msgid "%s: invalid file descriptor specification" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÏÐÉÓÁÎÉÅ ÆÁÊÌÏ×ÏÇÏ ÄÅÓËÒÉÐÔÏÒÁ" + +#: builtins/read.def:241 +#, c-format +msgid "%d: invalid file descriptor: %s" +msgstr "%d: ÎÅÄÏÐÕÓÔÉÍÙÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ: %s" + +#: builtins/read.def:474 +#, c-format +msgid "read error: %d: %s" +msgstr "ÏÛÉÂËÁ ÞÔÅÎÉÑ: %d: %s" + +#: builtins/return.def:63 +msgid "can only `return' from a function or sourced script" +msgstr "" + +#: builtins/set.def:745 +msgid "cannot simultaneously unset a function and a variable" +msgstr "" + +#: builtins/set.def:782 +#, c-format +msgid "%s: cannot unset" +msgstr "%s: ÎÅ ÍÏÇÕ ÓÂÒÏÓÉÔØ" + +#: builtins/set.def:789 +#, c-format +msgid "%s: cannot unset: readonly %s" +msgstr "%s: ÎÅ ÍÏÇÕ ÓÂÒÏÓÉÔØ: ÄÏÓÔÕÐÎÏ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ %s" + +#: builtins/set.def:800 +#, c-format +msgid "%s: not an array variable" +msgstr "%s: ÎÅ ÐÅÒÅÍÅÎÎÁÑ-ÍÁÓÓÉ×" + +#: builtins/setattr.def:166 +#, c-format +msgid "%s: not a function" +msgstr "%s: ÎÅ ÆÕÎËÃÉÑ" + +#: builtins/shift.def:66 +#: builtins/shift.def:72 +msgid "shift count" +msgstr "" + +#: builtins/shopt.def:227 +msgid "cannot set and unset shell options simultaneously" +msgstr "" + +#: builtins/shopt.def:292 +#, c-format +msgid "%s: invalid shell option name" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ ÏÂÏÌÏÞËÉ" + +#: builtins/source.def:117 +msgid "filename argument required" +msgstr "ÔÒÅÂÕÅÔÓÑ ÁÒÇÕÍÅÎÔ ÉÍÑ ÆÁÊÌÁ" + +#: builtins/source.def:137 +#, c-format +msgid "%s: file not found" +msgstr "%s: ÆÁÊÌ ÎÅ ÎÁÊÄÅÎ" + +#: builtins/suspend.def:93 +msgid "cannot suspend" +msgstr "" + +#: builtins/suspend.def:103 +msgid "cannot suspend a login shell" +msgstr "" + +#: builtins/type.def:232 +#, c-format +msgid "%s is aliased to `%s'\n" +msgstr "" + +#: builtins/type.def:253 +#, c-format +msgid "%s is a shell keyword\n" +msgstr "%s Ñ×ÌÑÅÔÓÑ ËÌÀÞÅ×ÙÍ ÓÌÏ×ÏÍ ÏÂÏÌÏÞËÉ\n" + +#: builtins/type.def:273 +#, c-format +msgid "%s is a function\n" +msgstr "%s Ñ×ÌÑÅÔÓÑ ÆÕÎËÃÉÅÊ\n" + +#: builtins/type.def:298 +#, c-format +msgid "%s is a shell builtin\n" +msgstr "" + +#: builtins/type.def:319 +#, c-format +msgid "%s is %s\n" +msgstr "" + +#: builtins/type.def:339 +#, c-format +msgid "%s is hashed (%s)\n" +msgstr "" + +#: builtins/ulimit.def:344 +#, c-format +msgid "%s: invalid limit argument" +msgstr "" + +#: builtins/ulimit.def:370 +#, c-format +msgid "`%c': bad command" +msgstr "`%c': ÐÌÏÈÁÑ ËÏÍÁÎÄÁ" + +#: builtins/ulimit.def:399 +#, c-format +msgid "%s: cannot get limit: %s" +msgstr "" + +#: builtins/ulimit.def:437 +#, c-format +msgid "%s: cannot modify limit: %s" +msgstr "" + +#: builtins/umask.def:112 +msgid "octal number" +msgstr "ÞÉÓÌÏ × ×ÏÓØÍÅÒÉÞÎÏÊ ÓÉÓÔÅÍÅ ÉÓÞÉÓÌÅÎÉÑ" + +#: builtins/umask.def:226 +#, c-format +msgid "`%c': invalid symbolic mode operator" +msgstr "" + +#: builtins/umask.def:281 +#, c-format +msgid "`%c': invalid symbolic mode character" +msgstr "" + +#: error.c:165 +#, c-format +msgid "last command: %s\n" +msgstr "ÐÏÓÌÅÄÎÑÑ ËÏÍÁÎÄÁ: %s\n" + +#: error.c:173 +msgid "Aborting..." +msgstr "úÁ×ÅÒÛÁÀ ÒÁÂÏÔÕ..." + +#: error.c:260 +#, c-format +msgid "%s: warning: " +msgstr "%s: ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ:" + +#: error.c:405 +msgid "unknown command error" +msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ ËÏÍÁÎÄÙ" + +#: error.c:406 +msgid "bad command type" +msgstr "" + +#: error.c:407 +msgid "bad connector" +msgstr "" + +#: error.c:408 +msgid "bad jump" +msgstr "" + +#: error.c:446 +#, c-format +msgid "%s: unbound variable" +msgstr "" + +#: eval.c:176 +msgid "timed out waiting for input: auto-logout\n" +msgstr "" + +#: execute_cmd.c:471 +#, c-format +msgid "cannot redirect standard input from /dev/null: %s" +msgstr "" + +#: execute_cmd.c:1036 +#, c-format +msgid "TIMEFORMAT: `%c': invalid format character" +msgstr "" + +#: execute_cmd.c:3551 +#, c-format +msgid "%s: restricted: cannot specify `/' in command names" +msgstr "" + +#: execute_cmd.c:3639 +#, c-format +msgid "%s: command not found" +msgstr "%s: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ" + +#: execute_cmd.c:3876 +#, c-format +msgid "%s: %s: bad interpreter" +msgstr "%s: %s: ÐÌÏÈÏÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ" + +#: execute_cmd.c:3913 +#, c-format +msgid "%s: cannot execute binary file" +msgstr "%s: ÎÅ ÍÏÇÕ ÚÁÐÕÓÔÉÔØ ÂÉÎÁÒÎÙÊ ÆÁÊÌ" + +#: execute_cmd.c:4025 +#, c-format +msgid "cannot duplicate fd %d to fd %d" +msgstr "ÎÅ ÍÏÇÕ ÄÕÂÌÉÒÏ×ÁÔØ fd %d × fd %d" + +#: expr.c:240 +msgid "expression recursion level exceeded" +msgstr "" + +#: expr.c:264 +msgid "recursion stack underflow" +msgstr "" + +#: expr.c:375 +msgid "syntax error in expression" +msgstr "ÓÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ × ×ÙÒÁÖÅÎÉÅ" + +#: expr.c:415 +msgid "attempted assignment to non-variable" +msgstr "ÐÏÐÙÔËÁ ÐÒÉÓ×ÏÅÎÉÑ ÎÅ-ÐÅÒÅÍÅÎÎÏÊ" + +#: expr.c:436 +#: expr.c:441 +#: expr.c:751 +msgid "division by 0" +msgstr "ÄÅÌÅÎÉÅ ÎÁ 0" + +#: expr.c:467 +msgid "bug: bad expassign token" +msgstr "" + +#: expr.c:509 +msgid "`:' expected for conditional expression" +msgstr "" + +#: expr.c:776 +msgid "exponent less than 0" +msgstr "" + +#: expr.c:821 +msgid "identifier expected after pre-increment or pre-decrement" +msgstr "" + +#: expr.c:849 +msgid "missing `)'" +msgstr "ÐÒÏÐÕÝÅÎ `)'" + +#: expr.c:892 +msgid "syntax error: operand expected" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: ÏÖÉÄÁÅÔÓÑ ÏÐÅÒÁÎÄ" + +#: expr.c:1178 +msgid "invalid number" +msgstr "ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ" + +#: expr.c:1182 +msgid "invalid arithmetic base" +msgstr "" + +#: expr.c:1202 +msgid "value too great for base" +msgstr "" + +#: general.c:62 +msgid "getcwd: cannot access parent directories" +msgstr "" + +#: input.c:231 +#, c-format +msgid "cannot allocate new file descriptor for bash input from fd %d" +msgstr "" + +#: input.c:239 +#, c-format +msgid "save_bash_input: buffer already exists for new fd %d" +msgstr "" + +#: jobs.c:923 +#, c-format +msgid "deleting stopped job %d with process group %ld" +msgstr "" + +#: jobs.c:1308 +#, c-format +msgid "describe_pid: %ld: no such pid" +msgstr "" + +#: jobs.c:1981 +#: nojobs.c:648 +#, c-format +msgid "wait: pid %ld is not a child of this shell" +msgstr "" + +#: jobs.c:2180 +#, c-format +msgid "wait_for: No record of process %ld" +msgstr "" + +#: jobs.c:2435 +#, c-format +msgid "wait_for_job: job %d is stopped" +msgstr "" + +#: jobs.c:2657 +#, c-format +msgid "%s: job has terminated" +msgstr "" + +#: jobs.c:2666 +#, c-format +msgid "%s: job %d already in background" +msgstr "" + +#: jobs.c:3452 +msgid "no job control in this shell" +msgstr "" + +#: lib/malloc/malloc.c:298 +#, c-format +msgid "malloc: failed assertion: %s\n" +msgstr "" + +#: lib/malloc/malloc.c:314 +#, c-format +msgid "" +"\r\n" +"malloc: %s:%d: assertion botched\r\n" +msgstr "" + +#: lib/malloc/malloc.c:740 +msgid "malloc: block on free list clobbered" +msgstr "" + +#: lib/malloc/malloc.c:817 +msgid "free: called with already freed block argument" +msgstr "" + +#: lib/malloc/malloc.c:820 +msgid "free: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:839 +msgid "free: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:845 +msgid "free: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/malloc.c:942 +msgid "realloc: called with unallocated block argument" +msgstr "" + +#: lib/malloc/malloc.c:957 +msgid "realloc: underflow detected; mh_nbytes out of range" +msgstr "" + +#: lib/malloc/malloc.c:963 +msgid "realloc: start and end chunk sizes differ" +msgstr "" + +#: lib/malloc/table.c:175 +msgid "register_alloc: alloc table is full with FIND_ALLOC?\n" +msgstr "" + +#: lib/malloc/table.c:182 +#, c-format +msgid "register_alloc: %p already in table as allocated?\n" +msgstr "" + +#: lib/malloc/table.c:218 +#, c-format +msgid "register_free: %p already in table as free?\n" +msgstr "" + +#: lib/malloc/watch.c:46 +msgid "allocated" +msgstr "" + +#: lib/malloc/watch.c:48 +msgid "freed" +msgstr "" + +#: lib/malloc/watch.c:50 +msgid "requesting resize" +msgstr "" + +#: lib/malloc/watch.c:52 +msgid "just resized" +msgstr "" + +#: lib/malloc/watch.c:54 +msgid "bug: unknown operation" +msgstr "ÏÛÉÂËÁ: ÎÅÉÚ×ÅÓÔÎÁÑ ÏÐÅÒÁÃÉÑ" + +#: lib/malloc/watch.c:56 +#, c-format +msgid "malloc: watch alert: %p %s " +msgstr "" + +#: lib/sh/fmtulong.c:101 +msgid "invalid base" +msgstr "" + +#: lib/sh/netopen.c:158 +#, c-format +msgid "%s: host unknown" +msgstr "%s: ÈÏÓÔ ÎÅÉÚ×ÅÓÔÅÎ" + +#: lib/sh/netopen.c:165 +#, c-format +msgid "%s: invalid service" +msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÙÊ ÓÅÒ×ÉÓ" + +#: lib/sh/netopen.c:296 +#, c-format +msgid "%s: bad network path specification" +msgstr "" + +#: lib/sh/netopen.c:336 +msgid "network operations not supported" +msgstr "" + +#: mailcheck.c:386 +msgid "You have mail in $_" +msgstr "õ ×ÁÓ ÅÓÔØ ÐÏÞÔÁ × $_" + +#: mailcheck.c:411 +msgid "You have new mail in $_" +msgstr "õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × $_" + +#: mailcheck.c:427 +#, c-format +msgid "The mail in %s has been read\n" +msgstr "ðÏÞÔÁ × %s ÂÙÌÁ ÐÒÏÞÉÔÁÎÁ\n" + +#: make_cmd.c:322 +msgid "syntax error: arithmetic expression required" +msgstr "" + +#: make_cmd.c:324 +msgid "syntax error: `;' unexpected" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: `;' ÎÅ ÏÖÉÄÁÅÔÓÑ" + +#: make_cmd.c:325 +#, c-format +msgid "syntax error: `((%s))'" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: `((%s))'" + +#: make_cmd.c:566 +#, c-format +msgid "make_here_document: bad instruction type %d" +msgstr "" + +#: make_cmd.c:736 +#, c-format +msgid "make_redirection: redirection instruction `%d' out of range" +msgstr "" + +#: parse.y:2747 +#, c-format +msgid "unexpected EOF while looking for matching `%c'" +msgstr "" + +#: parse.y:3043 +msgid "unexpected EOF while looking for `]]'" +msgstr "" + +#: parse.y:3048 +#, c-format +msgid "syntax error in conditional expression: unexpected token `%s'" +msgstr "" + +#: parse.y:3052 +msgid "syntax error in conditional expression" +msgstr "" + +#: parse.y:3130 +#, c-format +msgid "unexpected token `%s', expected `)'" +msgstr "" + +#: parse.y:3134 +msgid "expected `)'" +msgstr "ÏÖÉÄÁÌÓÑ `)'" + +#: parse.y:3162 +#, c-format +msgid "unexpected argument `%s' to conditional unary operator" +msgstr "" + +#: parse.y:3166 +msgid "unexpected argument to conditional unary operator" +msgstr "" + +#: parse.y:3203 +#, c-format +msgid "unexpected token `%s', conditional binary operator expected" +msgstr "" + +#: parse.y:3207 +msgid "conditional binary operator expected" +msgstr "" + +#: parse.y:3223 +#, c-format +msgid "unexpected argument `%s' to conditional binary operator" +msgstr "" + +#: parse.y:3227 +msgid "unexpected argument to conditional binary operator" +msgstr "" + +#: parse.y:3238 +#, c-format +msgid "unexpected token `%c' in conditional command" +msgstr "" + +#: parse.y:3241 +#, c-format +msgid "unexpected token `%s' in conditional command" +msgstr "" + +#: parse.y:3245 +#, c-format +msgid "unexpected token %d in conditional command" +msgstr "" + +#: parse.y:4461 +#, c-format +msgid "syntax error near unexpected token `%s'" +msgstr "" + +#: parse.y:4479 +#, c-format +msgid "syntax error near `%s'" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ ÏËÏÌÏ `%s'" + +#: parse.y:4489 +msgid "syntax error: unexpected end of file" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ" + +#: parse.y:4489 +msgid "syntax error" +msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ" + +#: parse.y:4551 +#, c-format +msgid "Use \"%s\" to leave the shell.\n" +msgstr "éÓÐÏÌØÚÕÊÔÅ \"%s\", ÞÔÏÂÙ ÚÁ×ÅÒÛÉÔØÓÑ ÒÁÂÏÔÕ Ó ÏÂÏÌÏÞËÏÊ.\n" + +#: parse.y:4710 +msgid "unexpected EOF while looking for matching `)'" +msgstr "" + +#: pcomplete.c:1001 +#, c-format +msgid "completion: function `%s' not found" +msgstr "" + +#: pcomplib.c:179 +#, c-format +msgid "progcomp_insert: %s: NULL COMPSPEC" +msgstr "" + +#: print_cmd.c:264 +#, c-format +msgid "print_command: bad connector `%d'" +msgstr "" + +#: print_cmd.c:1236 +#, c-format +msgid "cprintf: `%c': invalid format character" +msgstr "" + +#: redir.c:99 +msgid "file descriptor out of range" +msgstr "ÆÁÊÌÏ×ÙÊ ÄÅÓËÒÉÐÔÏÒ ÚÁ ÐÒÅÄÅÌÁÍÉ ÄÏÐÕÓÔÉÍÏÇÏ ÄÉÁÐÁÚÏÎÁ" + +#: redir.c:141 +#, c-format +msgid "%s: ambiguous redirect" +msgstr "" + +#: redir.c:145 +#, c-format +msgid "%s: cannot overwrite existing file" +msgstr "%s: ÎÅ ÍÏÇÕ ÐÅÒÅÐÉÓÁÔØ ÕÖÅ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ" + +#: redir.c:150 +#, c-format +msgid "%s: restricted: cannot redirect output" +msgstr "" + +#: redir.c:155 +#, c-format +msgid "cannot create temp file for here document: %s" +msgstr "" + +#: redir.c:509 +msgid "/dev/(tcp|udp)/host/port not supported without networking" +msgstr "" + +#: redir.c:956 +msgid "redirection error: cannot duplicate fd" +msgstr "ÏÛÉÂËÁ ÐÅÒÅÎÁÐÒÁ×ÌÅÎÉÑ: ÎÅ ÍÏÇÕ ÄÕÂÌÉÒÏ×ÁÔØ fd" + +#: shell.c:309 +msgid "could not find /tmp, please create!" +msgstr "ÎÅ ÍÏÇÕ ÎÁÊÔÉ /tmp, ÐÏÖÁÌÕÊÓÔÁ ÓÏÚÄÁÊÔÅ!" + +#: shell.c:313 +msgid "/tmp must be a valid directory name" +msgstr "/tmp ÄÏÌÖÎÁ ÂÙÔØ ÄÅÊÓÔ×ÉÔÅÌØÎÙÍ ÉÍÅÎÅÍ ÄÉÒÅËÔÏÒÉÉ" + +#: shell.c:849 +#, c-format +msgid "%c%c: invalid option" +msgstr "%c%c: ÎÅÄÏÐÕÓÔÉÍÁÑ ÏÐÃÉÑ" + +#: shell.c:1598 +msgid "I have no name!" +msgstr "õ ÍÅÎÑ ÎÅÔ ÉÍÅÎÉ!" + +#: shell.c:1733 +#, c-format +msgid "" +"Usage:\t%s [GNU long option] [option] ...\n" +"\t%s [GNU long option] [option] script-file ...\n" +msgstr "" +"éÓÐÏÌØÚÏ×ÁÎÉÅ:\n" +"%s [ÄÌÉÎÎÙÅ ÏÐÃÉÉ Á-ÌÑ `GNU'] [ÏÐÃÉÉ] ...\n" +"\t%s [ÄÌÉÎÎÙÅ ÏÐÃÉÉ Á-ÌÑ `GNU'] [ÏÐÃÉÉ] ÆÁÊÌ_ÓÏ_ÓËÒÉÐÔÏÍ...\n" + +#: shell.c:1735 +msgid "GNU long options:\n" +msgstr "äÌÉÎÎÙÅ ÏÐÃÉÉ × ÓÔÅÌÅ GNU:\n" + +#: shell.c:1739 +msgid "Shell options:\n" +msgstr "ïÐÃÉÉ ÏÂÏÌÏÞËÉ:\n" + +#: shell.c:1740 +msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n" +msgstr "" + +#: shell.c:1755 +#, c-format +msgid "\t-%s or -o option\n" +msgstr "\t-%s ÉÌÉ ÏÐÃÉÑ -o\n" + +#: shell.c:1761 +#, c-format +msgid "Type `%s -c \"help set\"' for more information about shell options.\n" +msgstr "" + +#: shell.c:1762 +#, c-format +msgid "Type `%s -c help' for more information about shell builtin commands.\n" +msgstr "" + +#: shell.c:1763 +msgid "Use the `bashbug' command to report bugs.\n" +msgstr "" + +#: sig.c:494 +#, c-format +msgid "sigprocmask: %d: invalid operation" +msgstr "" + +#: subst.c:1123 +#, c-format +msgid "bad substitution: no closing `%s' in %s" +msgstr "" + +#: subst.c:2269 +#, c-format +msgid "%s: cannot assign list to array member" +msgstr "" + +#: subst.c:4208 +#: subst.c:4224 +msgid "cannot make pipe for process substitution" +msgstr "" + +#: subst.c:4255 +msgid "cannot make child for process substitution" +msgstr "" + +#: subst.c:4300 +#, c-format +msgid "cannot open named pipe %s for reading" +msgstr "ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ÉÍÅÎÎÏÊ ËÁÎÁÌ %s ÄÌÑ ÞÔÅÎÉÑ" + +#: subst.c:4302 +#, c-format +msgid "cannot open named pipe %s for writing" +msgstr "ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ÉÍÅÎÎÏÊ ËÁÎÁÌ %s ÄÌÑ ÚÁÐÉÓÉ" + +#: subst.c:4310 +#, c-format +msgid "cannout reset nodelay mode for fd %d" +msgstr "" + +#: subst.c:4320 +#, c-format +msgid "cannot duplicate named pipe %s as fd %d" +msgstr "" + +#: subst.c:4495 +msgid "cannot make pipe for command substitution" +msgstr "" + +#: subst.c:4531 +msgid "cannot make child for command substitution" +msgstr "" + +#: subst.c:4548 +msgid "command_substitute: cannot duplicate pipe as fd 1" +msgstr "" + +#: subst.c:5013 +#, c-format +msgid "%s: parameter null or not set" +msgstr "%s: ÐÁÒÁÍÅÔÒ null ÉÌÉ ÎÅ ÕÓÔÁÎÏ×ÌÅÎ" + +#: subst.c:5287 +#, c-format +msgid "%s: substring expression < 0" +msgstr "" + +#: subst.c:6058 +#, c-format +msgid "%s: bad substitution" +msgstr "" + +#: subst.c:6134 +#, c-format +msgid "$%s: cannot assign in this way" +msgstr "" + +#: subst.c:7687 +#, c-format +msgid "no match: %s" +msgstr "ÎÅÔ ÓÏ×ÐÁÄÅÎÉÑ Ó: %s" + +#: test.c:154 +msgid "argument expected" +msgstr "ÐÒÅÄÐÏÌÁÇÁÅÔÓÑ ÞÔÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÎ ÁÒÇÕÍÅÎÔ" + +#: test.c:163 +#, c-format +msgid "%s: integer expression expected" +msgstr "" + +#: test.c:361 +msgid "`)' expected" +msgstr "ÏÖÉÄÁÅÔÓÑ `)' " + +#: test.c:363 +#, c-format +msgid "`)' expected, found %s" +msgstr "ÏÖÉÄÁÌÓÑ `)', ÎÁÊÄÅÎ %s" + +#: test.c:378 +#: test.c:787 +#: test.c:790 +#, c-format +msgid "%s: unary operator expected" +msgstr "%s: ÏÖÉÄÁÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÕÎÁÒÎÏÇÏ ÏÐÅÒÁÔÏÒÁ" + +#: test.c:543 +#: test.c:830 +#, c-format +msgid "%s: binary operator expected" +msgstr "%s: ÏÖÉÄÁÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÂÉÎÁÒÎÏÇÏ ÏÐÅÒÁÔÏÒÁ" + +#: test.c:905 +msgid "missing `]'" +msgstr "ÐÒÏÐÕÝÅÎ `]'" + +#: trap.c:194 +msgid "invalid signal number" +msgstr "ÎÅÄÏÐÕÓÔÉÍÙÊ ÎÏÍÅÒ ÓÉÇÎÁÌÁ" + +#: trap.c:309 +#, c-format +msgid "run_pending_traps: bad value in trap_list[%d]: %p" +msgstr "" + +#: trap.c:313 +#, c-format +msgid "run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself" +msgstr "" + +#: trap.c:349 +#, c-format +msgid "trap_handler: bad signal %d" +msgstr "" + +#: variables.c:320 +#, c-format +msgid "error importing function definition for `%s'" +msgstr "" + +#: variables.c:692 +#, c-format +msgid "shell level (%d) too high, resetting to 1" +msgstr "" + +#: variables.c:1651 +msgid "make_local_variable: no function context at current scope" +msgstr "" + +#: variables.c:2807 +msgid "all_local_variables: no function context at current scope" +msgstr "" + +#: variables.c:3021 +#: variables.c:3030 +#, c-format +msgid "invalid character %d in exportstr for %s" +msgstr "" + +#: variables.c:3036 +#, c-format +msgid "no `=' in exportstr for %s" +msgstr "" + +#: variables.c:3463 +msgid "pop_var_context: head of shell_variables not a function context" +msgstr "" + +#: variables.c:3476 +msgid "pop_var_context: no global_variables context" +msgstr "" + +#: variables.c:3548 +msgid "pop_scope: head of shell_variables not a temporary environment scope" +msgstr "" + +#: version.c:82 +msgid "Copyright (C) 2005 Free Software Foundation, Inc.\n" +msgstr "" + +#: xmalloc.c:93 +#, c-format +msgid "xmalloc: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:95 +#, c-format +msgid "xmalloc: cannot allocate %lu bytes" +msgstr "" + +#: xmalloc.c:115 +#, c-format +msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:117 +#, c-format +msgid "xrealloc: cannot allocate %lu bytes" +msgstr "" + +#: xmalloc.c:151 +#, c-format +msgid "xmalloc: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:153 +#, c-format +msgid "xmalloc: %s:%d: cannot allocate %lu bytes" +msgstr "" + +#: xmalloc.c:175 +#, c-format +msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)" +msgstr "" + +#: xmalloc.c:177 +#, c-format +msgid "xrealloc: %s:%d: cannot allocate %lu bytes" +msgstr "" + +#: builtins.c:244 +msgid "" +" `alias' with no arguments or with the -p option prints the list\n" +" of aliases in the form alias NAME=VALUE on standard output.\n" +" Otherwise, an alias is defined for each NAME whose VALUE is given.\n" +" A trailing space in VALUE causes the next word to be checked for\n" +" alias substitution when the alias is expanded. Alias returns\n" +" true unless a NAME is given for which no alias has been defined." +msgstr "" + +#: builtins.c:257 +msgid "" +" Remove NAMEs from the list of defined aliases. If the -a option is given,\n" +" then remove all alias definitions." +msgstr "" + +#: builtins.c:266 +msgid "" +" Bind a key sequence to a Readline function or a macro, or set\n" +" a Readline variable. The non-option argument syntax is equivalent\n" +" to that found in ~/.inputrc, but must be passed as a single argument:\n" +" bind '\"\\C-x\\C-r\": re-read-init-file'.\n" +" bind accepts the following options:\n" +" -m keymap Use `keymap' as the keymap for the duration of this\n" +" command. Acceptable keymap names are emacs,\n" +" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,\n" +" vi-command, and vi-insert.\n" +" -l List names of functions.\n" +" -P List function names and bindings.\n" +" -p List functions and bindings in a form that can be\n" +" reused as input.\n" +" -r keyseq Remove the binding for KEYSEQ.\n" +" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n" +" \t\t\t\tKEYSEQ is entered.\n" +" -f filename Read key bindings from FILENAME.\n" +" -q function-name Query about which keys invoke the named function.\n" +" -u function-name Unbind all keys which are bound to the named function.\n" +" -V List variable names and values\n" +" -v List variable names and values in a form that can\n" +" be reused as input.\n" +" -S List key sequences that invoke macros and their values\n" +" -s List key sequences that invoke macros and their values\n" +" in a form that can be reused as input." +msgstr "" + +#: builtins.c:297 +msgid "" +" Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n" +" break N levels." +msgstr "" + +#: builtins.c:304 +msgid "" +" Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n" +" If N is specified, resume at the N-th enclosing loop." +msgstr "" + +#: builtins.c:311 +msgid "" +" Run a shell builtin. This is useful when you wish to rename a\n" +" shell builtin to be a function, but need the functionality of the\n" +" builtin within the function itself." +msgstr "" + +#: builtins.c:320 +msgid "" +" Returns the context of the current subroutine call.\n" +" \n" +" Without EXPR, returns returns \"$line $filename\". With EXPR,\n" +" returns \"$line $subroutine $filename\"; this extra information\n" +" can be used used to provide a stack trace.\n" +" \n" +" The value of EXPR indicates how many call frames to go back before the\n" +" current one; the top frame is frame 0." +msgstr "" + +#: builtins.c:334 +msgid "" +" Change the current directory to DIR. The variable $HOME is the\n" +" default DIR. The variable CDPATH defines the search path for\n" +" the directory containing DIR. Alternative directory names in CDPATH\n" +" are separated by a colon (:). A null directory name is the same as\n" +" the current directory, i.e. `.'. If DIR begins with a slash (/),\n" +" then CDPATH is not used. If the directory is not found, and the\n" +" shell option `cdable_vars' is set, then try the word as a variable\n" +" name. If that variable has a value, then cd to the value of that\n" +" variable. The -P option says to use the physical directory structure\n" +" instead of following symbolic links; the -L option forces symbolic links\n" +" to be followed." +msgstr "" + +#: builtins.c:350 +msgid "" +" Print the current working directory. With the -P option, pwd prints\n" +" the physical directory, without any symbolic links; the -L option\n" +" makes pwd follow symbolic links." +msgstr "" + +#: builtins.c:358 +msgid " No effect; the command does nothing. A zero exit code is returned." +msgstr " îÅÔ ËÁËÏÇÏ-ÌÉÂÏ ÜÆÆÅËÔÁ; ËÏÍÁÎÄÁ ÎÉÞÅÇÏ ÎÅ ÄÅÌÁÅÔ. îÕÌØ ×ÏÚ×ÒÁÝÁÅÔÓÑ × ËÁÞÅÓÔ×Å ÒÅÚÕÌØÔÁÔÁ." + +#: builtins.c:364 +msgid " Return a successful result." +msgstr "÷ÏÚ×ÒÁÝÁÅÔ ÒÅÚÕÌØÔÁÔ: ×ÓÅ ÈÏÒÏÛÏ." + +#: builtins.c:370 +msgid " Return an unsuccessful result." +msgstr "÷ÏÚ×ÒÁÝÁÅÔ ÒÅÚÕÌØÔÁÔ: ÎÅÕÄÁÞÁ." + +#: builtins.c:376 +msgid "" +" Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n" +" function called `ls', and you wish to call the command `ls', you can\n" +" say \"command ls\". If the -p option is given, a default value is used\n" +" for PATH that is guaranteed to find all of the standard utilities. If\n" +" the -V or -v option is given, a string is printed describing COMMAND.\n" +" The -V option produces a more verbose description." +msgstr "" + +#: builtins.c:387 +msgid "" +" Declare variables and/or give them attributes. If no NAMEs are\n" +" given, then display the values of variables instead. The -p option\n" +" will display the attributes and values of each NAME.\n" +" \n" +" The flags are:\n" +" \n" +" -a\tto make NAMEs arrays (if supported)\n" +" -f\tto select from among function names only\n" +" -F\tto display function names (and line number and source file name if\n" +" \tdebugging) without definitions\n" +" -i\tto make NAMEs have the `integer' attribute\n" +" -r\tto make NAMEs readonly\n" +" -t\tto make NAMEs have the `trace' attribute\n" +" -x\tto make NAMEs export\n" +" \n" +" Variables with the integer attribute have arithmetic evaluation (see\n" +" `let') done when the variable is assigned to.\n" +" \n" +" When displaying values of variables, -f displays a function's name\n" +" and definition. The -F option restricts the display to function\n" +" name only.\n" +" \n" +" Using `+' instead of `-' turns off the given attribute instead. When\n" +" used in a function, makes NAMEs local, as with the `local' command." +msgstr "" + +#: builtins.c:416 +msgid " Obsolete. See `declare'." +msgstr " ÷ÙÛÅÌ ÉÚ ÕÐÏÔÒÅÂÌÅÎÉÑ. óÍ. `declare'." + +#: builtins.c:422 +msgid "" +" Create a local variable called NAME, and give it VALUE. LOCAL\n" +" can only be used within a function; it makes the variable NAME\n" +" have a visible scope restricted to that function and its children." +msgstr "" + +#: builtins.c:431 +msgid "" +" Output the ARGs. If -n is specified, the trailing newline is\n" +" suppressed. If the -e option is given, interpretation of the\n" +" following backslash-escaped characters is turned on:\n" +" \t\\a\talert (bell)\n" +" \t\\b\tbackspace\n" +" \t\\c\tsuppress trailing newline\n" +" \t\\E\tescape character\n" +" \t\\f\tform feed\n" +" \t\\n" +"\tnew line\n" +" \t\\r\tcarriage return\n" +" \t\\t\thorizontal tab\n" +" \t\\v\tvertical tab\n" +" \t\\\\\tbackslash\n" +" \t\\n" +"um\tthe character whose ASCII code is NUM (octal).\n" +" \n" +" You can explicitly turn off the interpretation of the above characters\n" +" with the -E option." +msgstr "" + +#: builtins.c:455 +msgid " Output the ARGs. If -n is specified, the trailing newline is suppressed." +msgstr "" + +#: builtins.c:462 +msgid "" +" Enable and disable builtin shell commands. This allows\n" +" you to use a disk command which has the same name as a shell\n" +" builtin without specifying a full pathname. If -n is used, the\n" +" NAMEs become disabled; otherwise NAMEs are enabled. For example,\n" +" to use the `test' found in $PATH instead of the shell builtin\n" +" version, type `enable -n test'. On systems supporting dynamic\n" +" loading, the -f option may be used to load new builtins from the\n" +" shared object FILENAME. The -d option will delete a builtin\n" +" previously loaded with -f. If no non-option names are given, or\n" +" the -p option is supplied, a list of builtins is printed. The\n" +" -a option means to print every builtin with an indication of whether\n" +" or not it is enabled. The -s option restricts the output to the POSIX.2\n" +" `special' builtins. The -n option displays a list of all disabled builtins." +msgstr "" + +#: builtins.c:480 +msgid " Read ARGs as input to the shell and execute the resulting command(s)." +msgstr "" + +#: builtins.c:486 +msgid "" +" Getopts is used by shell procedures to parse positional parameters.\n" +" \n" +" OPTSTRING contains the option letters to be recognized; if a letter\n" +" is followed by a colon, the option is expected to have an argument,\n" +" which should be separated from it by white space.\n" +" \n" +" Each time it is invoked, getopts will place the next option in the\n" +" shell variable $name, initializing name if it does not exist, and\n" +" the index of the next argument to be processed into the shell\n" +" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n" +" a shell script is invoked. When an option requires an argument,\n" +" getopts places that argument into the shell variable OPTARG.\n" +" \n" +" getopts reports errors in one of two ways. If the first character\n" +" of OPTSTRING is a colon, getopts uses silent error reporting. In\n" +" this mode, no error messages are printed. If an invalid option is\n" +" seen, getopts places the option character found into OPTARG. If a\n" +" required argument is not found, getopts places a ':' into NAME and\n" +" sets OPTARG to the option character found. If getopts is not in\n" +" silent mode, and an invalid option is seen, getopts places '?' into\n" +" NAME and unsets OPTARG. If a required argument is not found, a '?'\n" +" is placed in NAME, OPTARG is unset, and a diagnostic message is\n" +" printed.\n" +" \n" +" If the shell variable OPTERR has the value 0, getopts disables the\n" +" printing of error messages, even if the first character of\n" +" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n" +" \n" +" Getopts normally parses the positional parameters ($0 - $9), but if\n" +" more arguments are given, they are parsed instead." +msgstr "" + +#: builtins.c:521 +msgid "" +" Exec FILE, replacing this shell with the specified program.\n" +" If FILE is not specified, the redirections take effect in this\n" +" shell. If the first argument is `-l', then place a dash in the\n" +" zeroth arg passed to FILE, as login does. If the `-c' option\n" +" is supplied, FILE is executed with a null environment. The `-a'\n" +" option means to make set argv[0] of the executed process to NAME.\n" +" If the file cannot be executed and the shell is not interactive,\n" +" then the shell exits, unless the shell option `execfail' is set." +msgstr "" + +#: builtins.c:534 +msgid "" +" Exit the shell with a status of N. If N is omitted, the exit status\n" +" is that of the last command executed." +msgstr "" + +#: builtins.c:541 +msgid " Logout of a login shell." +msgstr "úÁ×ÅÒÛÅÎÉÑ ÓÅÁÎÓÁ ËÏÍÁÎÄÎÏÇÏ ÉÎÔÅÒÐÒÅÔÁÔÏÒÁ ÚÁÐÕÝÅÎÎÏÇÏ ÐÏÓÌÅ ×ÈÏÄÁ × ÓÉÓÔÅÍÕ." + +#: builtins.c:548 +msgid "" +" fc is used to list or edit and re-execute commands from the history list.\n" +" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n" +" string, which means the most recent command beginning with that\n" +" string.\n" +" \n" +" -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,\n" +" then vi.\n" +" \n" +" -l means list lines instead of editing.\n" +" -n means no line numbers listed.\n" +" -r means reverse the order of the lines (making it newest listed first).\n" +" \n" +" With the `fc -s [pat=rep ...] [command]' format, the command is\n" +" re-executed after the substitution OLD=NEW is performed.\n" +" \n" +" A useful alias to use with this is r='fc -s', so that typing `r cc'\n" +" runs the last command beginning with `cc' and typing `r' re-executes\n" +" the last command." +msgstr "" + +#: builtins.c:573 +msgid "" +" Place JOB_SPEC in the foreground, and make it the current job. If\n" +" JOB_SPEC is not present, the shell's notion of the current job is\n" +" used." +msgstr "" + +#: builtins.c:583 +msgid "" +" Place each JOB_SPEC in the background, as if it had been started with\n" +" `&'. If JOB_SPEC is not present, the shell's notion of the current\n" +" job is used." +msgstr "" + +#: builtins.c:592 +msgid "" +" For each NAME, the full pathname of the command is determined and\n" +" remembered. If the -p option is supplied, PATHNAME is used as the\n" +" full pathname of NAME, and no path search is performed. The -r\n" +" option causes the shell to forget all remembered locations. The -d\n" +" option causes the shell to forget the remembered location of each NAME.\n" +" If the -t option is supplied the full pathname to which each NAME\n" +" corresponds is printed. If multiple NAME arguments are supplied with\n" +" -t, the NAME is printed before the hashed full pathname. The -l option\n" +" causes output to be displayed in a format that may be reused as input.\n" +" If no arguments are given, information about remembered commands is displayed." +msgstr "" + +#: builtins.c:608 +msgid "" +" Display helpful information about builtin commands. If PATTERN is\n" +" specified, gives detailed help on all commands matching PATTERN,\n" +" otherwise a list of the builtins is printed. The -s option\n" +" restricts the output for each builtin command matching PATTERN to\n" +" a short usage synopsis." +msgstr "" + +#: builtins.c:620 +msgid "" +" Display the history list with line numbers. Lines listed with\n" +" with a `*' have been modified. Argument of N says to list only\n" +" the last N lines. The `-c' option causes the history list to be\n" +" cleared by deleting all of the entries. The `-d' option deletes\n" +" the history entry at offset OFFSET. The `-w' option writes out the\n" +" current history to the history file; `-r' means to read the file and\n" +" append the contents to the history list instead. `-a' means\n" +" to append history lines from this session to the history file.\n" +" Argument `-n' means to read all history lines not already read\n" +" from the history file and append them to the history list.\n" +" \n" +" If FILENAME is given, then that is used as the history file else\n" +" if $HISTFILE has a value, that is used, else ~/.bash_history.\n" +" If the -s option is supplied, the non-option ARGs are appended to\n" +" the history list as a single entry. The -p option means to perform\n" +" history expansion on each ARG and display the result, without storing\n" +" anything in the history list.\n" +" \n" +" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n" +" as a format string for strftime(3) to print the time stamp associated\n" +" with each displayed history entry. No time stamps are printed otherwise." +msgstr "" + +#: builtins.c:648 +msgid "" +" Lists the active jobs. The -l option lists process id's in addition\n" +" to the normal information; the -p option lists process id's only.\n" +" If -n is given, only processes that have changed status since the last\n" +" notification are printed. JOBSPEC restricts output to that job. The\n" +" -r and -s options restrict output to running and stopped jobs only,\n" +" respectively. Without options, the status of all active jobs is\n" +" printed. If -x is given, COMMAND is run after all job specifications\n" +" that appear in ARGS have been replaced with the process ID of that job's\n" +" process group leader." +msgstr "" + +#: builtins.c:664 +msgid "" +" By default, removes each JOBSPEC argument from the table of active jobs.\n" +" If the -h option is given, the job is not removed from the table, but is\n" +" marked so that SIGHUP is not sent to the job if the shell receives a\n" +" SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove all\n" +" jobs from the job table; the -r option means to remove only running jobs." +msgstr "" + +#: builtins.c:675 +msgid "" +" Send the processes named by PID (or JOBSPEC) the signal SIGSPEC. If\n" +" SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'\n" +" lists the signal names; if arguments follow `-l' they are assumed to\n" +" be signal numbers for which names should be listed. Kill is a shell\n" +" builtin for two reasons: it allows job IDs to be used instead of\n" +" process IDs, and, if you have reached the limit on processes that\n" +" you can create, you don't have to start a process to kill another one." +msgstr "" + +#: builtins.c:687 +msgid "" +" Each ARG is an arithmetic expression to be evaluated. Evaluation\n" +" is done in fixed-width integers with no check for overflow, though\n" +" division by 0 is trapped and flagged as an error. The following\n" +" list of operators is grouped into levels of equal-precedence operators.\n" +" The levels are listed in order of decreasing precedence.\n" +" \n" +" \tid++, id--\tvariable post-increment, post-decrement\n" +" \t++id, --id\tvariable pre-increment, pre-decrement\n" +" \t-, +\t\tunary minus, plus\n" +" \t!, ~\t\tlogical and bitwise negation\n" +" \t**\t\texponentiation\n" +" \t*, /, %\t\tmultiplication, division, remainder\n" +" \t+, -\t\taddition, subtraction\n" +" \t<<, >>\t\tleft and right bitwise shifts\n" +" \t<=, >=, <, >\tcomparison\n" +" \t==, !=\t\tequality, inequality\n" +" \t&\t\tbitwise AND\n" +" \t^\t\tbitwise XOR\n" +" \t|\t\tbitwise OR\n" +" \t&&\t\tlogical AND\n" +" \t||\t\tlogical OR\n" +" \texpr ? expr : expr\n" +" \t\t\tconditional operator\n" +" \t=, *=, /=, %=,\n" +" \t+=, -=, <<=, >>=,\n" +" \t&=, ^=, |=\tassignment\n" +" \n" +" Shell variables are allowed as operands. The name of the variable\n" +" is replaced by its value (coerced to a fixed-width integer) within\n" +" an expression. The variable need not have its integer attribute\n" +" turned on to be used in an expression.\n" +" \n" +" Operators are evaluated in order of precedence. Sub-expressions in\n" +" parentheses are evaluated first and may override the precedence\n" +" rules above.\n" +" \n" +" If the last ARG evaluates to 0, let returns 1; 0 is returned\n" +" otherwise." +msgstr "" + +#: builtins.c:730 +msgid "" +" One line is read from the standard input, or from file descriptor FD if the\n" +" -u option is supplied, and the first word is assigned to the first NAME,\n" +" the second word to the second NAME, and so on, with leftover words assigned\n" +" to the last NAME. Only the characters found in $IFS are recognized as word\n" +" delimiters. If no NAMEs are supplied, the line read is stored in the REPLY\n" +" variable. If the -r option is given, this signifies `raw' input, and\n" +" backslash escaping is disabled. The -d option causes read to continue\n" +" until the first character of DELIM is read, rather than newline. If the -p\n" +" option is supplied, the string PROMPT is output without a trailing newline\n" +" before attempting to read. If -a is supplied, the words read are assigned\n" +" to sequential indices of ARRAY, starting at zero. If -e is supplied and\n" +" the shell is interactive, readline is used to obtain the line. If -n is\n" +" supplied with a non-zero NCHARS argument, read returns after NCHARS\n" +" characters have been read. The -s option causes input coming from a\n" +" terminal to not be echoed.\n" +" \n" +" The -t option causes read to time out and return failure if a complete line\n" +" of input is not read within TIMEOUT seconds. If the TMOUT variable is set,\n" +" its value is the default timeout. The return code is zero, unless end-of-file\n" +" is encountered, read times out, or an invalid file descriptor is supplied as\n" +" the argument to -u." +msgstr "" + +#: builtins.c:756 +msgid "" +" Causes a function to exit with the return value specified by N. If N\n" +" is omitted, the return status is that of the last command." +msgstr "" + +#: builtins.c:763 +msgid "" +" -a Mark variables which are modified or created for export.\n" +" -b Notify of job termination immediately.\n" +" -e Exit immediately if a command exits with a non-zero status.\n" +" -f Disable file name generation (globbing).\n" +" -h Remember the location of commands as they are looked up.\n" +" -k All assignment arguments are placed in the environment for a\n" +" command, not just those that precede the command name.\n" +" -m Job control is enabled.\n" +" -n Read commands but do not execute them.\n" +" -o option-name\n" +" Set the variable corresponding to option-name:\n" +" allexport same as -a\n" +" braceexpand same as -B\n" +" emacs use an emacs-style line editing interface\n" +" errexit same as -e\n" +" errtrace same as -E\n" +" functrace same as -T\n" +" hashall same as -h\n" +" histexpand same as -H\n" +" history enable command history\n" +" ignoreeof the shell will not exit upon reading EOF\n" +" interactive-comments\n" +" allow comments to appear in interactive commands\n" +" keyword same as -k\n" +" monitor same as -m\n" +" noclobber same as -C\n" +" noexec same as -n\n" +" noglob same as -f\n" +" nolog currently accepted but ignored\n" +" notify same as -b\n" +" nounset same as -u\n" +" onecmd same as -t\n" +" physical same as -P\n" +" pipefail the return value of a pipeline is the status of\n" +" the last command to exit with a non-zero status,\n" +" or zero if no command exited with a non-zero status\n" +" posix change the behavior of bash where the default\n" +" operation differs from the 1003.2 standard to\n" +" match the standard\n" +" privileged same as -p\n" +" verbose same as -v\n" +" vi use a vi-style line editing interface\n" +" xtrace same as -x\n" +" -p Turned on whenever the real and effective user ids do not match.\n" +" Disables processing of the $ENV file and importing of shell\n" +" functions. Turning this option off causes the effective uid and\n" +" gid to be set to the real uid and gid.\n" +" -t Exit after reading and executing one command.\n" +" -u Treat unset variables as an error when substituting.\n" +" -v Print shell input lines as they are read.\n" +" -x Print commands and their arguments as they are executed.\n" +" -B the shell will perform brace expansion\n" +" -C If set, disallow existing regular files to be overwritten\n" +" by redirection of output.\n" +" -E If set, the ERR trap is inherited by shell functions.\n" +" -H Enable ! style history substitution. This flag is on\n" +" by default when the shell is interactive.\n" +" -P If set, do not follow symbolic links when executing commands\n" +" such as cd which change the current directory.\n" +" -T If set, the DEBUG trap is inherited by shell functions.\n" +" - Assign any remaining arguments to the positional parameters.\n" +" The -x and -v options are turned off.\n" +" \n" +" Using + rather than - causes these flags to be turned off. The\n" +" flags can also be used upon invocation of the shell. The current\n" +" set of flags may be found in $-. The remaining n ARGs are positional\n" +" parameters and are assigned, in order, to $1, $2, .. $n. If no\n" +" ARGs are given, all shell variables are printed." +msgstr "" + +#: builtins.c:836 +msgid "" +" For each NAME, remove the corresponding variable or function. Given\n" +" the `-v', unset will only act on variables. Given the `-f' flag,\n" +" unset will only act on functions. With neither flag, unset first\n" +" tries to unset a variable, and if that fails, then tries to unset a\n" +" function. Some variables cannot be unset; also see readonly." +msgstr "" + +#: builtins.c:846 +msgid "" +" NAMEs are marked for automatic export to the environment of\n" +" subsequently executed commands. If the -f option is given,\n" +" the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n" +" is given, a list of all names that are exported in this shell is\n" +" printed. An argument of `-n' says to remove the export property\n" +" from subsequent NAMEs. An argument of `--' disables further option\n" +" processing." +msgstr "" + +#: builtins.c:858 +msgid "" +" The given NAMEs are marked readonly and the values of these NAMEs may\n" +" not be changed by subsequent assignment. If the -f option is given,\n" +" then functions corresponding to the NAMEs are so marked. If no\n" +" arguments are given, or if `-p' is given, a list of all readonly names\n" +" is printed. The `-a' option means to treat each NAME as\n" +" an array variable. An argument of `--' disables further option\n" +" processing." +msgstr "" + +#: builtins.c:870 +msgid "" +" The positional parameters from $N+1 ... are renamed to $1 ... If N is\n" +" not given, it is assumed to be 1." +msgstr "" + +#: builtins.c:877 +#: builtins.c:886 +msgid "" +" Read and execute commands from FILENAME and return. The pathnames\n" +" in $PATH are used to find the directory containing FILENAME. If any\n" +" ARGUMENTS are supplied, they become the positional parameters when\n" +" FILENAME is executed." +msgstr "" + +#: builtins.c:896 +msgid "" +" Suspend the execution of this shell until it receives a SIGCONT\n" +" signal. The `-f' if specified says not to complain about this\n" +" being a login shell if it is; just suspend anyway." +msgstr "" + +#: builtins.c:905 +msgid "" +" Exits with a status of 0 (true) or 1 (false) depending on\n" +" the evaluation of EXPR. Expressions may be unary or binary. Unary\n" +" expressions are often used to examine the status of a file. There\n" +" are string operators as well, and numeric comparison operators.\n" +" \n" +" File operators:\n" +" \n" +" -a FILE True if file exists.\n" +" -b FILE True if file is block special.\n" +" -c FILE True if file is character special.\n" +" -d FILE True if file is a directory.\n" +" -e FILE True if file exists.\n" +" -f FILE True if file exists and is a regular file.\n" +" -g FILE True if file is set-group-id.\n" +" -h FILE True if file is a symbolic link.\n" +" -L FILE True if file is a symbolic link.\n" +" -k FILE True if file has its `sticky' bit set.\n" +" -p FILE True if file is a named pipe.\n" +" -r FILE True if file is readable by you.\n" +" -s FILE True if file exists and is not empty.\n" +" -S FILE True if file is a socket.\n" +" -t FD True if FD is opened on a terminal.\n" +" -u FILE True if the file is set-user-id.\n" +" -w FILE True if the file is writable by you.\n" +" -x FILE True if the file is executable by you.\n" +" -O FILE True if the file is effectively owned by you.\n" +" -G FILE True if the file is effectively owned by your group.\n" +" -N FILE True if the file has been modified since it was last read.\n" +" \n" +" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n" +" modification date).\n" +" \n" +" FILE1 -ot FILE2 True if file1 is older than file2.\n" +" \n" +" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n" +" \n" +" String operators:\n" +" \n" +" -z STRING True if string is empty.\n" +" \n" +" -n STRING\n" +" STRING True if string is not empty.\n" +" \n" +" STRING1 = STRING2\n" +" True if the strings are equal.\n" +" STRING1 != STRING2\n" +" True if the strings are not equal.\n" +" STRING1 < STRING2\n" +" True if STRING1 sorts before STRING2 lexicographically.\n" +" STRING1 > STRING2\n" +" True if STRING1 sorts after STRING2 lexicographically.\n" +" \n" +" Other operators:\n" +" \n" +" -o OPTION True if the shell option OPTION is enabled.\n" +" ! EXPR True if expr is false.\n" +" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n" +" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n" +" \n" +" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n" +" -lt, -le, -gt, or -ge.\n" +" \n" +" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n" +" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n" +" than ARG2." +msgstr "" + +#: builtins.c:975 +msgid "" +" This is a synonym for the \"test\" builtin, but the last\n" +" argument must be a literal `]', to match the opening `['." +msgstr "" + +#: builtins.c:982 +msgid "" +" Print the accumulated user and system times for processes run from\n" +" the shell." +msgstr "" + +#: builtins.c:989 +msgid "" +" The command ARG is to be read and executed when the shell receives\n" +" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n" +" is supplied) or `-', each specified signal is reset to its original\n" +" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n" +" shell and by the commands it invokes. If a SIGNAL_SPEC is EXIT (0)\n" +" the command ARG is executed on exit from the shell. If a SIGNAL_SPEC\n" +" is DEBUG, ARG is executed after every simple command. If the`-p' option\n" +" is supplied then the trap commands associated with each SIGNAL_SPEC are\n" +" displayed. If no arguments are supplied or if only `-p' is given, trap\n" +" prints the list of commands associated with each signal. Each SIGNAL_SPEC\n" +" is either a signal name in <signal.h> or a signal number. Signal names\n" +" are case insensitive and the SIG prefix is optional. `trap -l' prints\n" +" a list of signal names and their corresponding numbers. Note that a\n" +" signal can be sent to the shell with \"kill -signal $$\"." +msgstr "" + +#: builtins.c:1008 +msgid "" +" For each NAME, indicate how it would be interpreted if used as a\n" +" command name.\n" +" \n" +" If the -t option is used, `type' outputs a single word which is one of\n" +" `alias', `keyword', `function', `builtin', `file' or `', if NAME is an\n" +" alias, shell reserved word, shell function, shell builtin, disk file,\n" +" or unfound, respectively.\n" +" \n" +" If the -p flag is used, `type' either returns the name of the disk\n" +" file that would be executed, or nothing if `type -t NAME' would not\n" +" return `file'.\n" +" \n" +" If the -a flag is used, `type' displays all of the places that contain\n" +" an executable named `file'. This includes aliases, builtins, and\n" +" functions, if and only if the -p flag is not also used.\n" +" \n" +" The -f flag suppresses shell function lookup.\n" +" \n" +" The -P flag forces a PATH search for each NAME, even if it is an alias,\n" +" builtin, or function, and returns the name of the disk file that would\n" +" be executed." +msgstr "" + +#: builtins.c:1035 +msgid "" +" Ulimit provides control over the resources available to processes\n" +" started by the shell, on systems that allow such control. If an\n" +" option is given, it is interpreted as follows:\n" +" \n" +" -S\tuse the `soft' resource limit\n" +" -H\tuse the `hard' resource limit\n" +" -a\tall current limits are reported\n" +" -c\tthe maximum size of core files created\n" +" -d\tthe maximum size of a process's data segment\n" +" -f\tthe maximum size of files created by the shell\n" +" -i the maximum number of pending signals\n" +" -l\tthe maximum size a process may lock into memory\n" +" -m\tthe maximum resident set size\n" +" -n\tthe maximum number of open file descriptors\n" +" -p\tthe pipe buffer size\n" +" -q the maximum number of bytes in POSIX message queues\n" +" -s\tthe maximum stack size\n" +" -t\tthe maximum amount of cpu time in seconds\n" +" -u\tthe maximum number of user processes\n" +" -v\tthe size of virtual memory\n" +" -x the maximum number of file locks\n" +" \n" +" If LIMIT is given, it is the new value of the specified resource;\n" +" the special LIMIT values `soft', `hard', and `unlimited' stand for\n" +" the current soft limit, the current hard limit, and no limit, respectively.\n" +" Otherwise, the current value of the specified resource is printed.\n" +" If no option is given, then -f is assumed. Values are in 1024-byte\n" +" increments, except for -t, which is in seconds, -p, which is in\n" +" increments of 512 bytes, and -u, which is an unscaled number of\n" +" processes." +msgstr "" + +#: builtins.c:1071 +msgid "" +" The user file-creation mask is set to MODE. If MODE is omitted, or if\n" +" `-S' is supplied, the current value of the mask is printed. The `-S'\n" +" option makes the output symbolic; otherwise an octal number is output.\n" +" If `-p' is supplied, and MODE is omitted, the output is in a form\n" +" that may be used as input. If MODE begins with a digit, it is\n" +" interpreted as an octal number, otherwise it is a symbolic mode string\n" +" like that accepted by chmod(1)." +msgstr "" + +#: builtins.c:1084 +msgid "" +" Wait for the specified process and report its termination status. If\n" +" N is not given, all currently active child processes are waited for,\n" +" and the return code is zero. N may be a process ID or a job\n" +" specification; if a job spec is given, all processes in the job's\n" +" pipeline are waited for." +msgstr "" + +#: builtins.c:1096 +msgid "" +" Wait for the specified process and report its termination status. If\n" +" N is not given, all currently active child processes are waited for,\n" +" and the return code is zero. N is a process ID; if it is not given,\n" +" all child processes of the shell are waited for." +msgstr "" + +#: builtins.c:1106 +msgid "" +" The `for' loop executes a sequence of commands for each member in a\n" +" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n" +" assumed. For each element in WORDS, NAME is set to that element, and\n" +" the COMMANDS are executed." +msgstr "" + +#: builtins.c:1115 +msgid "" +" Equivalent to\n" +" \t(( EXP1 ))\n" +" \twhile (( EXP2 )); do\n" +" \t\tCOMMANDS\n" +" \t\t(( EXP3 ))\n" +" \tdone\n" +" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n" +" omitted, it behaves as if it evaluates to 1." +msgstr "" + +#: builtins.c:1128 +msgid "" +" The WORDS are expanded, generating a list of words. The\n" +" set of expanded words is printed on the standard error, each\n" +" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n" +" is assumed. The PS3 prompt is then displayed and a line read\n" +" from the standard input. If the line consists of the number\n" +" corresponding to one of the displayed words, then NAME is set\n" +" to that word. If the line is empty, WORDS and the prompt are\n" +" redisplayed. If EOF is read, the command completes. Any other\n" +" value read causes NAME to be set to null. The line read is saved\n" +" in the variable REPLY. COMMANDS are executed after each selection\n" +" until a break command is executed." +msgstr "" + +#: builtins.c:1144 +msgid "" +" Execute PIPELINE and print a summary of the real time, user CPU time,\n" +" and system CPU time spent executing PIPELINE when it terminates.\n" +" The return status is the return status of PIPELINE. The `-p' option\n" +" prints the timing summary in a slightly different format. This uses\n" +" the value of the TIMEFORMAT variable as the output format." +msgstr "" + +#: builtins.c:1154 +msgid "" +" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n" +" `|' is used to separate multiple patterns." +msgstr "" + +#: builtins.c:1161 +msgid "" +" The `if COMMANDS' list is executed. If its exit status is zero, then the\n" +" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is\n" +" executed in turn, and if its exit status is zero, the corresponding\n" +" `then COMMANDS' list is executed and the if command completes. Otherwise,\n" +" the `else COMMANDS' list is executed, if present. The exit status of the\n" +" entire construct is the exit status of the last command executed, or zero\n" +" if no condition tested true." +msgstr "" + +#: builtins.c:1173 +msgid "" +" Expand and execute COMMANDS as long as the final command in the\n" +" `while' COMMANDS has an exit status of zero." +msgstr "" + +#: builtins.c:1180 +msgid "" +" Expand and execute COMMANDS as long as the final command in the\n" +" `until' COMMANDS has an exit status which is not zero." +msgstr "" + +#: builtins.c:1187 +msgid "" +" Create a simple command invoked by NAME which runs COMMANDS.\n" +" Arguments on the command line along with NAME are passed to the\n" +" function as $0 .. $n." +msgstr "" + +#: builtins.c:1195 +msgid "" +" Run a set of commands in a group. This is one way to redirect an\n" +" entire set of commands." +msgstr "" + +#: builtins.c:1202 +msgid "" +" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n" +" stopped or background job. JOB_SPEC can specify either a job name\n" +" or a job number. Following JOB_SPEC with a `&' places the job in\n" +" the background, as if the job specification had been supplied as an\n" +" argument to `bg'." +msgstr "" + +#: builtins.c:1212 +msgid "" +" The EXPRESSION is evaluated according to the rules for arithmetic\n" +" evaluation. Equivalent to \"let EXPRESSION\"." +msgstr "" + +#: builtins.c:1219 +msgid "" +" Returns a status of 0 or 1 depending on the evaluation of the conditional\n" +" expression EXPRESSION. Expressions are composed of the same primaries used\n" +" by the `test' builtin, and may be combined using the following operators\n" +" \n" +" \t( EXPRESSION )\tReturns the value of EXPRESSION\n" +" \t! EXPRESSION\tTrue if EXPRESSION is false; else false\n" +" \tEXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n" +" \tEXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n" +" \n" +" When the `==' and `!=' operators are used, the string to the right of the\n" +" operator is used as a pattern and pattern matching is performed. The\n" +" && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n" +" determine the expression's value." +msgstr "" + +#: builtins.c:1237 +msgid "" +" BASH_VERSION Version information for this Bash.\n" +" CDPATH A colon-separated list of directories to search\n" +" \t\tfor directries given as arguments to `cd'.\n" +" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n" +" \t\tbe ignored by pathname expansion.\n" +" HISTFILE The name of the file where your command history is stored.\n" +" HISTFILESIZE The maximum number of lines this file can contain.\n" +" HISTSIZE The maximum number of history lines that a running\n" +" \t\tshell can access.\n" +" HOME The complete pathname to your login directory.\n" +" HOSTNAME\tThe name of the current host.\n" +" HOSTTYPE The type of CPU this version of Bash is running under.\n" +" IGNOREEOF Controls the action of the shell on receipt of an EOF\n" +" \t\tcharacter as the sole input. If set, then the value\n" +" \t\tof it is the number of EOF characters that can be seen\n" +" \t\tin a row on an empty line before the shell will exit\n" +" \t\t(default 10). When unset, EOF signifies the end of input.\n" +" MACHTYPE\tA string describing the current system Bash is running on.\n" +" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n" +" MAILPATH\tA colon-separated list of filenames which Bash checks\n" +" \t\tfor new mail.\n" +" OSTYPE\t\tThe version of Unix this version of Bash is running on.\n" +" PATH A colon-separated list of directories to search when\n" +" \t\tlooking for commands.\n" +" PROMPT_COMMAND A command to be executed before the printing of each\n" +" \t\tprimary prompt.\n" +" PS1 The primary prompt string.\n" +" PS2 The secondary prompt string.\n" +" PWD\t\tThe full pathname of the current directory.\n" +" SHELLOPTS\tA colon-separated list of enabled shell options.\n" +" TERM The name of the current terminal type.\n" +" TIMEFORMAT\tThe output format for timing statistics displayed by the\n" +" \t\t`time' reserved word.\n" +" auto_resume Non-null means a command word appearing on a line by\n" +" \t\titself is first looked for in the list of currently\n" +" \t\tstopped jobs. If found there, that job is foregrounded.\n" +" \t\tA value of `exact' means that the command word must\n" +" \t\texactly match a command in the list of stopped jobs. A\n" +" \t\tvalue of `substring' means that the command word must\n" +" \t\tmatch a substring of the job. Any other value means that\n" +" \t\tthe command must be a prefix of a stopped job.\n" +" histchars Characters controlling history expansion and quick\n" +" \t\tsubstitution. The first character is the history\n" +" \t\tsubstitution character, usually `!'. The second is\n" +" \t\tthe `quick substitution' character, usually `^'. The\n" +" \t\tthird is the `history comment' character, usually `#'.\n" +" HISTIGNORE\tA colon-separated list of patterns used to decide which\n" +" \t\tcommands should be saved on the history list.\n" +msgstr "" + +#: builtins.c:1292 +msgid "" +" Adds a directory to the top of the directory stack, or rotates\n" +" the stack, making the new top of the stack the current working\n" +" directory. With no arguments, exchanges the top two directories.\n" +" \n" +" +N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the left of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -N\tRotates the stack so that the Nth directory (counting\n" +" \tfrom the right of the list shown by `dirs', starting with\n" +" \tzero) is at the top.\n" +" \n" +" -n\tsuppress the normal change of directory when adding directories\n" +" \tto the stack, so only the stack is manipulated.\n" +" \n" +" dir\tadds DIR to the directory stack at the top, making it the\n" +" \tnew current working directory.\n" +" \n" +" You can see the directory stack with the `dirs' command." +msgstr "" + +#: builtins.c:1318 +msgid "" +" Removes entries from the directory stack. With no arguments,\n" +" removes the top directory from the stack, and cd's to the new\n" +" top directory.\n" +" \n" +" +N\tremoves the Nth entry counting from the left of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd +0'\n" +" \tremoves the first directory, `popd +1' the second.\n" +" \n" +" -N\tremoves the Nth entry counting from the right of the list\n" +" \tshown by `dirs', starting with zero. For example: `popd -0'\n" +" \tremoves the last directory, `popd -1' the next to last.\n" +" \n" +" -n\tsuppress the normal change of directory when removing directories\n" +" \tfrom the stack, so only the stack is manipulated.\n" +" \n" +" You can see the directory stack with the `dirs' command." +msgstr "" + +#: builtins.c:1341 +msgid "" +" Display the list of currently remembered directories. Directories\n" +" find their way onto the list with the `pushd' command; you can get\n" +" back up through the list with the `popd' command.\n" +" \n" +" The -l flag specifies that `dirs' should not print shorthand versions\n" +" of directories which are relative to your home directory. This means\n" +" that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag\n" +" causes `dirs' to print the directory stack with one entry per line,\n" +" prepending the directory name with its position in the stack. The -p\n" +" flag does the same thing, but the stack position is not prepended.\n" +" The -c flag clears the directory stack by deleting all of the elements.\n" +" \n" +" +N\tdisplays the Nth entry counting from the left of the list shown by\n" +" \tdirs when invoked without options, starting with zero.\n" +" \n" +" -N\tdisplays the Nth entry counting from the right of the list shown by\n" +" \tdirs when invoked without options, starting with zero." +msgstr "" + +#: builtins.c:1364 +msgid "" +" Toggle the values of variables controlling optional behavior.\n" +" The -s flag means to enable (set) each OPTNAME; the -u flag\n" +" unsets each OPTNAME. The -q flag suppresses output; the exit\n" +" status indicates whether each OPTNAME is set or unset. The -o\n" +" option restricts the OPTNAMEs to those defined for use with\n" +" `set -o'. With no options, or with the -p option, a list of all\n" +" settable options is displayed, with an indication of whether or\n" +" not each is set." +msgstr "" + +#: builtins.c:1377 +msgid "" +" printf formats and prints ARGUMENTS under control of the FORMAT. FORMAT\n" +" is a character string which contains three types of objects: plain\n" +" characters, which are simply copied to standard output, character escape\n" +" sequences which are converted and copied to the standard output, and\n" +" format specifications, each of which causes printing of the next successive\n" +" argument. In addition to the standard printf(1) formats, %b means to\n" +" expand backslash escape sequences in the corresponding argument, and %q\n" +" means to quote the argument in a way that can be reused as shell input.\n" +" If the -v option is supplied, the output is placed into the value of the\n" +" shell variable VAR rather than being sent to the standard output." +msgstr "" + +#: builtins.c:1393 +msgid "" +" For each NAME, specify how arguments are to be completed.\n" +" If the -p option is supplied, or if no options are supplied, existing\n" +" completion specifications are printed in a way that allows them to be\n" +" reused as input. The -r option removes a completion specification for\n" +" each NAME, or, if no NAMEs are supplied, all completion specifications." +msgstr "" + +#: builtins.c:1405 +msgid "" +" Display the possible completions depending on the options. Intended\n" +" to be used from within a shell function generating possible completions.\n" +" If the optional WORD argument is supplied, matches against WORD are\n" +" generated." +msgstr "" +"ðÏËÁÚÙ×ÁÅÔ ×ÏÚÍÏÖÎÙÅ ÄÏÐÏÌÎÅÎÉÑ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÐÃÉÊ. ðÒÅÄÐÏÌÁÇÁÅÔÓÑ,\n" +" ÞÔÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ×ÎÕÔÒÉ ÆÕÎËÃÉÊ ËÏÍÁÎÄÎÏÇÏ ÉÎÔÅÒÐÒÅÔÁÔÏÒÁ, ÇÅÎÅÒÉÒÕÀÝÅÊ ×ÏÚÍÏÖÎÙÅ ÄÏÐÏÌÎÅÎÉÑ.\n" +" åÓÌÉ ÎÅÏÂÑÚÁÔÅÌØÎÙÊ ÁÒÇÕÍÅÎÔ óìï÷ï ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ, ÔÏ ÂÕÄÕÔ ÓÇÅÎÅÒÉÒÏ×ÁÎÙ ÔÏÌØËÏ ÓÏ×ÐÁÄÅÎÉÑ Ó óìï÷ï." + diff --git a/print_cmd.c b/print_cmd.c index 7524f3dd..d1dfd1a7 100644 --- a/print_cmd.c +++ b/print_cmd.c @@ -879,13 +879,13 @@ print_redirection (redirect) case r_output_direction: if (redirector != 1) cprintf ("%d", redirector); - cprintf (">%s", redirectee->word); + cprintf ("> %s", redirectee->word); break; case r_input_direction: if (redirector != 0) cprintf ("%d", redirector); - cprintf ("<%s", redirectee->word); + cprintf ("< %s", redirectee->word); break; case r_inputa_direction: /* Redirection created by the shell. */ @@ -895,7 +895,7 @@ print_redirection (redirect) case r_appending_to: if (redirector != 1) cprintf ("%d", redirector); - cprintf (">>%s", redirectee->word); + cprintf (">> %s", redirectee->word); break; case r_deblank_reading_until: @@ -975,7 +975,7 @@ print_redirection (redirect) case r_input_output: if (redirector != 1) cprintf ("%d", redirector); - cprintf ("<>%s", redirectee->word); + cprintf ("<> %s", redirectee->word); break; case r_output_force: @@ -22,11 +22,19 @@ #define _QUIT_H_ /* Non-zero means SIGINT has already ocurred. */ -extern int interrupt_state; - -/* Macro to call a great deal. SIGINT just sets above variable. When - it is safe, put QUIT in the code, and the "interrupt" will take place. */ -#define QUIT if (interrupt_state) throw_to_top_level () +extern volatile int interrupt_state; +extern volatile int terminating_signal; + +/* Macro to call a great deal. SIGINT just sets the interrupt_state variable. + When it is safe, put QUIT in the code, and the "interrupt" will take + place. The same scheme is used for terminating signals (e.g., SIGHUP) + and the terminating_signal variable. That calls a function which will + end up exiting the shell. */ +#define QUIT \ + do { \ + if (terminating_signal) termsig_handler (terminating_signal); \ + if (interrupt_state) throw_to_top_level (); \ + } while (0) #define SETINTERRUPT interrupt_state = 1 #define CLRINTERRUPT interrupt_state = 0 @@ -34,4 +42,12 @@ extern int interrupt_state; #define ADDINTERRUPT interrupt_state++ #define DELINTERRUPT interrupt_state-- +/* The same sort of thing, this time just for signals that would ordinarily + cause the shell to terminate. */ + +#define CHECK_TERMSIG \ + do { \ + if (terminating_signal) termsig_handler (terminating_signal); \ + } while (0) + #endif /* _QUIT_H_ */ @@ -63,7 +63,7 @@ extern REDIRECT *exec_redirection_undo_list; /* Static functions defined and used in this file. */ static void add_undo_close_redirect __P((int)); static void add_exec_redirect __P((REDIRECT *)); -static int add_undo_redirect __P((int)); +static int add_undo_redirect __P((int, enum r_instruction)); static int expandable_redirection_filename __P((REDIRECT *)); static int stdin_redirection __P((enum r_instruction, int)); static int do_redirection_internal __P((REDIRECT *, int)); @@ -630,8 +630,8 @@ do_redirection_internal (redirect, flags) redirector = redirect->redirector; ri = redirect->instruction; -if (redirect->flags & RX_INTERNAL) - flags |= RX_INTERNAL; + if (redirect->flags & RX_INTERNAL) + flags |= RX_INTERNAL; if (TRANSLATE_REDIRECT (ri)) { @@ -757,7 +757,7 @@ if (redirect->flags & RX_INTERNAL) { /* Only setup to undo it if the thing to undo is active. */ if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) - add_undo_redirect (redirector); + add_undo_redirect (redirector, ri); else add_undo_close_redirect (redirector); } @@ -808,7 +808,7 @@ if (redirect->flags & RX_INTERNAL) if (flags & RX_ACTIVE) { if (flags & RX_UNDOABLE) - add_undo_redirect (2); + add_undo_redirect (2, ri); if (dup2 (1, 2) < 0) return (errno); } @@ -836,7 +836,7 @@ if (redirect->flags & RX_INTERNAL) { /* Only setup to undo it if the thing to undo is active. */ if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1)) - add_undo_redirect (redirector); + add_undo_redirect (redirector, ri); else add_undo_close_redirect (redirector); } @@ -878,7 +878,7 @@ if (redirect->flags & RX_INTERNAL) { /* Only setup to undo it if the thing to undo is active. */ if (fcntl (redirector, F_GETFD, 0) != -1) - add_undo_redirect (redirector); + add_undo_redirect (redirector, ri); else add_undo_close_redirect (redirector); } @@ -925,7 +925,7 @@ if (redirect->flags & RX_INTERNAL) if (flags & RX_ACTIVE) { if ((flags & RX_UNDOABLE) && (fcntl (redirector, F_GETFD, 0) != -1)) - add_undo_redirect (redirector); + add_undo_redirect (redirector, ri); #if defined (BUFFERED_INPUT) check_bash_input (redirector); @@ -951,8 +951,9 @@ if (redirect->flags & RX_INTERNAL) even if REDIRECTION_UNDO_LIST is discarded by the exec builtin are also saved on EXEC_REDIRECTION_UNDO_LIST. */ static int -add_undo_redirect (fd) +add_undo_redirect (fd, ri) int fd; + enum r_instruction ri; { int new_fd, clexec_flag; REDIRECT *new_redirect, *closer, *dummy_redirect; @@ -990,7 +991,7 @@ add_undo_redirect (fd) /* experimental: if we're saving a redirection to undo for a file descriptor above SHELL_FD_BASE, add a redirection to be undone if the exec builtin causes redirections to be discarded. */ - if (fd >= SHELL_FD_BASE) + if (fd >= SHELL_FD_BASE && ri != r_close_this) { rd.dest = new_fd; new_redirect = make_redirection (fd, r_duplicating_output, rd); @@ -532,6 +532,7 @@ main (argc, argv, env) Variables from the environment are expected to be set, etc. */ shell_initialize (); + set_default_lang (); set_default_locale_vars (); if (interactive_shell) @@ -1208,7 +1209,7 @@ run_wordexp (words) wl = global_command->value.Simple->words; if (protected_mode) for (tl = wl; tl; tl = tl->next) - tl->word->flags |= W_NOCOMSUB; + tl->word->flags |= W_NOCOMSUB|W_NOPROCSUB; result = wl ? expand_words_no_vars (wl) : (WORD_LIST *)0; } else @@ -1533,9 +1534,10 @@ set_shell_name (argv0) any startup files; just try to be more like /bin/sh. */ shell_name = argv0 ? base_pathname (argv0) : PROGRAM; - if (*shell_name == '-') + if (argv0 && *argv0 == '-') { - shell_name++; + if (*shell_name == '-') + shell_name++; login_shell++; } @@ -1,6 +1,6 @@ /* sig.c - interface for shell signal handlers and signal initialization. */ -/* Copyright (C) 1994-2005 Free Software Foundation, Inc. +/* Copyright (C) 1994-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -59,11 +59,14 @@ extern int loop_level, continuing, breaking; extern int parse_and_execute_level, shell_initialized; /* Non-zero after SIGINT. */ -int interrupt_state; +volatile int interrupt_state = 0; /* Non-zero after SIGWINCH */ volatile int sigwinch_received = 0; +/* Set to the value of any terminating signal received. */ +volatile int terminating_signal = 0; + /* The environment at the top-level R-E loop. We use this in the case of error return. */ procenv_t top_level; @@ -76,6 +79,9 @@ sigset_t top_level_mask; /* When non-zero, we throw_to_top_level (). */ int interrupt_immediately = 0; +/* When non-zero, we call the terminating signal handler immediately. */ +int terminate_immediately = 0; + #if defined (SIGWINCH) static SigHandler *old_winch = (SigHandler *)SIG_DFL; #endif @@ -223,7 +229,7 @@ initialize_terminating_signals () this is possible in Posix. Unfortunately, we have to call signal () on non-Posix systems for each signal in terminating_signals. */ #if defined (HAVE_POSIX_SIGNALS) - act.sa_handler = termination_unwind_protect; + act.sa_handler = termsig_sighandler; act.sa_flags = 0; sigemptyset (&act.sa_mask); sigemptyset (&oact.sa_mask); @@ -259,7 +265,7 @@ initialize_terminating_signals () if (signal_is_trapped (XSIG (i))) continue; - XHANDLER(i) = signal (XSIG (i), termination_unwind_protect); + XHANDLER(i) = signal (XSIG (i), termsig_sighandler); XSAFLAGS(i) = 0; /* Don't do anything with signals that are ignored at shell entry if the shell is not interactive. */ @@ -418,17 +424,39 @@ jump_to_top_level (value) } sighandler -termination_unwind_protect (sig) +termsig_sighandler (sig) int sig; { + terminating_signal = sig; + + if (terminate_immediately) + { + terminate_immediately = 0; + termsig_handler (sig); + } + + SIGRETURN (0); +} + +void +termsig_handler (sig) + int sig; +{ + static int handling_termsig = 0; + + /* Simple semaphore to keep this function from being executed multiple + times. Since we no longer are running as a signal handler, we don't + block multiple occurrences of the terminating signals while running. */ + if (handling_termsig) + return; + handling_termsig = 1; + terminating_signal = 0; /* keep macro from re-testing true. */ + /* I don't believe this condition ever tests true. */ if (sig == SIGINT && signal_is_trapped (SIGINT)) run_interrupt_trap (); #if defined (HISTORY) - /* This might be unsafe, since it eventually calls functions POSIX says - not to call from signal handlers. If it's a problem, take this code - out. */ if (interactive_shell && sig != SIGABRT) maybe_save_shell_history (); #endif /* HISTORY */ @@ -446,8 +474,6 @@ termination_unwind_protect (sig) run_exit_trap (); set_signal_handler (sig, SIG_DFL); kill (getpid (), sig); - - SIGRETURN (0); } /* What we really do when SIGINT occurs. */ @@ -1,6 +1,6 @@ /* sig.h -- header file for signal handler definitions. */ -/* Copyright (C) 1994-2005 Free Software Foundation, Inc. +/* Copyright (C) 1994-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -111,8 +111,12 @@ do { \ /* Extern variables */ extern volatile int sigwinch_received; +extern int interrupt_immediately; +extern int terminate_immediately; + /* Functions from sig.c. */ -extern sighandler termination_unwind_protect __P((int)); +extern sighandler termsig_sighandler __P((int)); +extern void termsig_handler __P((int)); extern sighandler sigint_sighandler __P((int)); extern void initialize_signals __P((int)); extern void initialize_terminating_signals __P((void)); @@ -4,7 +4,7 @@ /* ``Have a little faith, there's magic in the night. You ain't a beauty, but, hey, you're alright.'' */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -82,6 +82,7 @@ extern int errno; #define EX_NOALLOC 0x01 /* just skip; don't return substring */ #define EX_VARNAME 0x02 /* variable name; for string_extract () */ #define EX_REQMATCH 0x04 /* closing/matching delimiter required */ +#define EX_COMMAND 0x08 /* extracting a shell script/command */ /* Flags for the `pflags' argument to param_expand() */ #define PF_NOCOMSUB 0x01 /* Do not perform command substitution */ @@ -147,6 +148,10 @@ extern int wordexp_only; extern int expanding_redir; extern int tempenv_assign_error; +#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE) +extern wchar_t *wcsdup __P((const wchar_t *)); +#endif + /* Non-zero means to allow unmatched globbed filenames to expand to a null file. */ int allow_null_glob_expansion; @@ -200,7 +205,6 @@ static WORD_LIST *list_quote_escapes __P((WORD_LIST *)); static char *dequote_escapes __P((char *)); static char *make_quoted_char __P((int)); static WORD_LIST *quote_list __P((WORD_LIST *)); -static WORD_LIST *dequote_list __P((WORD_LIST *)); static char *remove_quoted_escapes __P((char *)); static char *remove_quoted_nulls __P((char *)); @@ -216,7 +220,7 @@ static char *string_extract_verbatim __P((char *, size_t, int *, char *)); static char *string_extract __P((char *, int *, char *, int)); static char *string_extract_double_quoted __P((char *, int *, int)); static inline char *string_extract_single_quoted __P((char *, int *)); -static inline int skip_single_quoted __P((char *, size_t, int)); +static inline int skip_single_quoted __P((const char *, size_t, int)); static int skip_double_quoted __P((char *, size_t, int)); static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int)); static char *extract_dollar_brace_string __P((char *, int *, int, int)); @@ -226,10 +230,7 @@ static char *pos_params __P((char *, int, int, int)); static unsigned char *mb_getcharlens __P((char *, int)); static char *remove_upattern __P((char *, char *, int)); -#if defined (HANDLE_MULTIBYTE) -# if !defined (HAVE_WCSDUP) -static wchar_t *wcsdup __P((wchar_t *)); -# endif +#if defined (HANDLE_MULTIBYTE) static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int)); #endif static char *remove_pattern __P((char *, char *, int)); @@ -261,6 +262,7 @@ static arrayind_t array_length_reference __P((char *)); static int valid_brace_expansion_word __P((char *, int)); static int chk_atstar __P((char *, int, int *, int *)); +static int chk_arithsub __P((const char *, int)); static WORD_DESC *parameter_brace_expand_word __P((char *, int, int)); static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *)); @@ -710,7 +712,7 @@ add_one_character: si = i + 2; if (string[i + 1] == LPAREN) - ret = extract_delimited_string (string, &si, "$(", "(", ")", 0); /*)*/ + ret = extract_delimited_string (string, &si, "$(", "(", ")", EX_COMMAND); /*)*/ else ret = extract_dollar_brace_string (string, &si, 1, 0); @@ -812,7 +814,7 @@ skip_double_quoted (string, slen, sind) { si = i + 2; if (string[i + 1] == LPAREN) - ret = extract_delimited_string (string, &si, "$(", "(", ")", EX_NOALLOC); /* ) */ + ret = extract_delimited_string (string, &si, "$(", "(", ")", EX_NOALLOC|EX_COMMAND); /* ) */ else ret = extract_dollar_brace_string (string, &si, 0, EX_NOALLOC); @@ -865,7 +867,7 @@ string_extract_single_quoted (string, sindex) static inline int skip_single_quoted (string, slen, sind) - char *string; + const char *string; size_t slen; int sind; { @@ -946,8 +948,8 @@ string_extract_verbatim (string, slen, sindex, charlist) len = mbstowcs (wcharlist, charlist, 0); if (len == -1) len = 0; - wcharlist = xmalloc ((sizeof (wchar_t) * len) + 1); - mbstowcs (wcharlist, charlist, len); + wcharlist = (wchar_t *)xmalloc (sizeof (wchar_t) * (len + 1)); + mbstowcs (wcharlist, charlist, len + 1); } if (wcschr (wcharlist, wc)) @@ -980,7 +982,7 @@ extract_command_subst (string, sindex) char *string; int *sindex; { - return (extract_delimited_string (string, sindex, "$(", "(", ")", 0)); /*)*/ + return (extract_delimited_string (string, sindex, "$(", "(", ")", EX_COMMAND)); /*)*/ } /* Extract the $[ construct in STRING, and return a new string. (]) @@ -1049,7 +1051,7 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) int i, c, si; size_t slen; char *t, *result; - int pass_character, nesting_level; + int pass_character, nesting_level, in_comment; int len_closer, len_opener, len_alt_opener; DECLARE_MBSTATE; @@ -1058,7 +1060,7 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) len_alt_opener = STRLEN (alt_opener); len_closer = STRLEN (closer); - pass_character = 0; + pass_character = in_comment = 0; nesting_level = 1; i = *sindex; @@ -1070,6 +1072,14 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) if (c == 0) break; + if (in_comment) + { + if (c == '\n') + in_comment = 0; + ADVANCE_CHAR (string, slen, i); + continue; + } + if (pass_character) /* previous char was backslash */ { pass_character = 0; @@ -1077,6 +1087,15 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags) continue; } + /* Not exactly right yet; should handle shell metacharacters and + multibyte characters, too. */ + if ((flags & EX_COMMAND) && c == '#' && (i == 0 || string[i - 1] == '\n' || whitespace (string[i - 1]))) + { + in_comment = 1; + ADVANCE_CHAR (string, slen, i); + continue; + } + if (c == CTLESC || c == '\\') { pass_character++; @@ -1235,7 +1254,7 @@ extract_dollar_brace_string (string, sindex, quoted, flags) if (string[i] == '$' && string[i+1] == LPAREN) { si = i + 2; - t = extract_delimited_string (string, &si, "$(", "(", ")", flags|EX_NOALLOC); /*)*/ + t = extract_delimited_string (string, &si, "$(", "(", ")", flags|EX_NOALLOC|EX_COMMAND); /*)*/ i = si + 1; continue; } @@ -1498,7 +1517,7 @@ skip_to_delim (string, start, delims) CQ_RETURN(si); if (string[i+1] == LPAREN) - temp = extract_delimited_string (string, &si, "$(", "(", ")", EX_NOALLOC); /* ) */ + temp = extract_delimited_string (string, &si, "$(", "(", ")", EX_NOALLOC|EX_COMMAND); /* ) */ else temp = extract_dollar_brace_string (string, &si, 0, EX_NOALLOC); i = si; @@ -1563,7 +1582,8 @@ split_at_delims (string, slen, delims, sentinel, nwp, cwp) while (delims[i]) { #if defined (HANDLE_MULTIBYTE) - mbstate_t state_bak = state; + mbstate_t state_bak; + state_bak = state; mblength = MBRLEN (delims + i, slength, &state); if (MB_INVALIDCH (mblength)) state = state_bak; @@ -1774,14 +1794,21 @@ char * string_list_dollar_star (list) WORD_LIST *list; { + char *ret; #if defined (HANDLE_MULTIBYTE) +# if defined (__GNUC__) char sep[MB_CUR_MAX + 1]; +# else + char *sep = 0; +# endif #else char sep[2]; #endif - #if defined (HANDLE_MULTIBYTE) +# if !defined (__GNUC__) + sep = (char *)xmalloc (MB_CUR_MAX + 1); +# endif /* !__GNUC__ */ if (ifs_firstc_len == 1) { sep[0] = ifs_firstc[0]; @@ -1797,7 +1824,11 @@ string_list_dollar_star (list) sep[1] = '\0'; #endif - return (string_list_internal (list, sep)); + ret = string_list_internal (list, sep); +#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__) + free (sep); +#endif + return ret; } /* Turn $@ into a string. If (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) @@ -1816,7 +1847,11 @@ string_list_dollar_at (list, quoted) { char *ifs, *ret; #if defined (HANDLE_MULTIBYTE) +# if defined (__GNUC__) char sep[MB_CUR_MAX + 1]; +# else + char *sep = 0; +# endif /* !__GNUC__ */ #else char sep[2]; #endif @@ -1826,6 +1861,9 @@ string_list_dollar_at (list, quoted) ifs = ifs_var ? value_cell (ifs_var) : (char *)0; #if defined (HANDLE_MULTIBYTE) +# if !defined (__GNUC__) + sep = (char *)xmalloc (MB_CUR_MAX + 1); +# endif /* !__GNUC__ */ if (ifs && *ifs) { if (ifs_firstc_len == 1) @@ -1852,7 +1890,12 @@ string_list_dollar_at (list, quoted) tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0)) ? quote_list (list) : list_quote_escapes (list); - return (string_list_internal (tlist, sep)); + + ret = string_list_internal (tlist, sep); +#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__) + free (sep); +#endif + return ret; } /* Return the list of words present in STRING. Separate the string into @@ -1992,7 +2035,7 @@ list_string (string, separators, quoted) sindex++; /* An IFS character that is not IFS white space, along with any adjacent IFS white space, shall delimit a field. (SUSv3) */ - while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex])) + while (string[sindex] && spctabnl (string[sindex]) && isifs (string[sindex])) sindex++; } } @@ -2180,16 +2223,18 @@ do_compound_assignment (name, value, flags) int flags; { SHELL_VAR *v; - int off, mklocal; + int mklocal; + WORD_LIST *list; mklocal = flags & ASS_MKLOCAL; if (mklocal && variable_context) { + list = expand_compound_array_assignment (value, flags); v = find_variable (name); - if (v == 0 || array_p (v) == 0) + if (v == 0 || array_p (v) == 0 || v->context != variable_context) v = make_local_array_variable (name); - v = assign_array_var_from_string (v, value, flags); + assign_compound_array_list (v, list, flags); } else v = assign_array_from_string (name, value, flags); @@ -2209,7 +2254,7 @@ do_assignment_internal (word, expand) int expand; { int offset, tlen, appendop, assign_list, aflags; - char *name, *value, *ovalue, *nvalue; + char *name, *value; SHELL_VAR *entry; #if defined (ARRAY_VARS) char *t; @@ -2241,11 +2286,7 @@ do_assignment_internal (word, expand) tlen = STRLEN (temp); #if defined (ARRAY_VARS) -# if 0 - if (expand && temp[0] == LPAREN && temp[tlen-1] == RPAREN) -#else if (expand && (word->flags & W_COMPASSIGN)) -#endif { assign_list = ni = 1; value = extract_array_assignment_list (temp, &ni); @@ -2575,6 +2616,13 @@ expand_assignment_string_to_string (string, quoted) return (expand_string_to_string_internal (string, quoted, expand_string_assignment)); } +char * +expand_arith_string (string, quoted) + char *string; +{ + return (expand_string_if_necessary (string, quoted, expand_string)); +} + #if defined (COND_COMMAND) /* Just remove backslashes in STRING. Returns a new string. */ char * @@ -2956,7 +3004,9 @@ dequote_escapes (string) return result; } -/* Return a new string with the quoted representation of character C. */ +/* Return a new string with the quoted representation of character C. + This turns "" into QUOTED_NULL, so the W_HASQUOTEDNULL flag needs to be + set in any resultant WORD_DESC where this value is the word. */ static char * make_quoted_char (c) int c; @@ -2978,7 +3028,9 @@ make_quoted_char (c) return (temp); } -/* Quote STRING. Return a new string. */ +/* Quote STRING, returning a new string. This turns "" into QUOTED_NULL, so + the W_HASQUOTEDNULL flag needs to be set in any resultant WORD_DESC where + this value is the word. */ char * quote_string (string) char *string; @@ -3012,7 +3064,7 @@ quote_string (string) return (result); } -/* De-quoted quoted characters in STRING. */ +/* De-quote quoted characters in STRING. */ char * dequote_string (string) char *string; @@ -3068,11 +3120,13 @@ quote_list (list) w->word->word = quote_string (t); free (t); w->word->flags |= W_QUOTED; + /* XXX - turn on W_HAVEQUOTEDNULL here? */ } return list; } -static WORD_LIST * +/* De-quote quoted characters in each word in LIST. */ +WORD_LIST * dequote_list (list) WORD_LIST *list; { @@ -3084,6 +3138,7 @@ dequote_list (list) s = dequote_string (tlist->word->word); free (tlist->word->word); tlist->word->word = s; + /* XXX - turn off W_HAVEQUOTEDNULL here? */ } return list; } @@ -3287,23 +3342,6 @@ remove_upattern (param, pattern, op) } #if defined (HANDLE_MULTIBYTE) - -#if !defined (HAVE_WCSDUP) -static wchar_t * -wcsdup (ws) - wchar_t *ws; -{ - wchar_t *ret; - size_t len; - - len = wcslen (ws); - ret = xmalloc ((len + 1) * sizeof (wchar_t)); - if (ret == 0) - return ret; - return (wcscpy (ret, ws)); -} -#endif /* !HAVE_WCSDUP */ - static wchar_t * remove_wpattern (wparam, wstrlen, wpattern, op) wchar_t *wparam; @@ -3311,9 +3349,8 @@ remove_wpattern (wparam, wstrlen, wpattern, op) wchar_t *wpattern; int op; { - wchar_t wc; - int n, n1; - wchar_t *ret; + wchar_t wc, *ret; + int n; switch (op) { @@ -3408,7 +3445,7 @@ remove_pattern (param, pattern, op) free (wpattern); n = strlen (param); - xret = xmalloc (n + 1); + xret = (char *)xmalloc (n + 1); memset (&ps, '\0', sizeof (mbstate_t)); n = wcsrtombs (xret, (const wchar_t **)&ret, n, &ps); xret[n] = '\0'; /* just to make sure */ @@ -3477,7 +3514,7 @@ match_upattern (string, pat, mtype, sp, ep) len = STRLEN (pat); if (pat[0] != '*' || pat[len - 1] != '*') { - p = npat = xmalloc (len + 3); + p = npat = (char *)xmalloc (len + 3); p1 = pat; if (*p1 != '*') *p++ = '*'; @@ -3621,7 +3658,7 @@ match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep) len = wcslen (wpat); if (wpat[0] != L'*' || wpat[len - 1] != L'*') { - wp = nwpat = xmalloc ((len + 3) * sizeof (wchar_t)); + wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t)); wp1 = wpat; if (*wp1 != L'*') *wp++ = L'*'; @@ -3767,7 +3804,9 @@ getpattern (value, quoted, expandpat) { char *pat, *tword; WORD_LIST *l; +#if 0 int i; +#endif /* There is a problem here: how to handle single or double quotes in the pattern string when the whole expression is between double quotes? @@ -4978,9 +5017,7 @@ parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat) a $@ in TEMP. It does not matter if the $@ is quoted, as long as it does not expand to anything. In this case, we want to return a quoted empty string. */ - temp = (char *)xmalloc (2); - temp[0] = CTLNUL; - temp[1] = '\0'; + temp = make_quoted_char ('\0'); w->flags |= W_HASQUOTEDNULL; } else @@ -5248,7 +5285,7 @@ verify_substring_values (value, substr, vtype, e1p, e2p) else t = (char *)0; - temp1 = expand_string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string); + temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES); *e1p = evalexp (temp1, &expok); free (temp1); if (expok == 0) @@ -5293,7 +5330,7 @@ verify_substring_values (value, substr, vtype, e1p, e2p) { t++; temp2 = savestring (t); - temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string); + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); free (temp2); t[-1] = ':'; *e2p = evalexp (temp1, &expok); @@ -5450,22 +5487,27 @@ parameter_brace_substring (varname, value, substr, quoted) { intmax_t e1, e2; int vtype, r, starsub; - char *temp, *val, *tt; + char *temp, *val, *tt, *oname; SHELL_VAR *v; if (value == 0) return ((char *)NULL); + oname = this_command_name; this_command_name = varname; vtype = get_var_and_type (varname, value, quoted, &v, &val); if (vtype == -1) - return ((char *)NULL); + { + this_command_name = oname; + return ((char *)NULL); + } starsub = vtype & VT_STARSUB; vtype &= ~VT_STARSUB; r = verify_substring_values (val, substr, vtype, &e1, &e2); + this_command_name = oname; if (r <= 0) return ((r == 0) ? &expand_param_error : (char *)NULL); @@ -5615,7 +5657,7 @@ pos_params_pat_subst (string, pat, rep, mflags) { WORD_LIST *save, *params; WORD_DESC *w; - char *ret, *tt; + char *ret; save = params = list_rest_of_args (); if (save == 0) @@ -5665,11 +5707,6 @@ parameter_brace_patsub (varname, value, patsub, quoted) vtype &= ~VT_STARSUB; mflags = 0; - if (*patsub == '/') - { - mflags |= MATCH_GLOBREP; - patsub++; - } /* Malloc this because expand_string_if_necessary or one of the expansion functions in its call chain may free it on a substitution error. */ @@ -5681,7 +5718,9 @@ parameter_brace_patsub (varname, value, patsub, quoted) if (starsub) mflags |= MATCH_STARSUB; - if (rep = quoted_strchr (lpatsub, '/', ST_BACKSL)) + /* If the pattern starts with a `/', make sure we skip over it when looking + for the replacement delimiter. */ + if (rep = quoted_strchr ((*patsub == '/') ? lpatsub+1 : lpatsub, '/', ST_BACKSL)) *rep++ = '\0'; else rep = (char *)NULL; @@ -5701,8 +5740,15 @@ parameter_brace_patsub (varname, value, patsub, quoted) rep = expand_string_to_string_internal (rep, quoted, expand_string_unsplit); } + /* ksh93 doesn't allow the match specifier to be a part of the expanded + pattern. This is an extension. */ p = pat; - if (pat && pat[0] == '#') + if (pat && pat[0] == '/') + { + mflags |= MATCH_GLOBREP|MATCH_ANY; + p++; + } + else if (pat && pat[0] == '#') { mflags |= MATCH_BEG; p++; @@ -5769,6 +5815,57 @@ parameter_brace_patsub (varname, value, patsub, quoted) return temp; } +/* Check for unbalanced parens in S, which is the contents of $(( ... )). If + any occur, this must be a nested command substitution, so return 0. + Otherwise, return 1. A valid arithmetic expression must always have a + ( before a matching ), so any cases where there are more right parens + means that this must not be an arithmetic expression, though the parser + will not accept it without a balanced total number of parens. */ +static int +chk_arithsub (s, len) + const char *s; + int len; +{ + int i, count; + DECLARE_MBSTATE; + + i = count = 0; + while (i < len) + { + if (s[i] == '(') + count++; + else if (s[i] == ')') + { + count--; + if (count < 0) + return 0; + } + + switch (s[i]) + { + default: + ADVANCE_CHAR (s, len, i); + break; + + case '\\': + i++; + if (s[i]) + ADVANCE_CHAR (s, len, i); + break; + + case '\'': + i = skip_single_quoted (s, len, ++i); + break; + + case '"': + i = skip_double_quoted ((char *)s, len, ++i); + break; + } + } + + return (count == 0); +} + /****************************************************************/ /* */ /* Functions to perform parameter expansion on a string */ @@ -5794,7 +5891,11 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll sindex = *indexp; t_index = ++sindex; - name = string_extract (string, &t_index, "#%:-=?+/}", EX_VARNAME); + /* ${#var} doesn't have any of the other parameter expansions on it. */ + if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */ + name = string_extract (string, &t_index, "}", EX_VARNAME); + else + name = string_extract (string, &t_index, "#%:-=?+/}", EX_VARNAME); ret = 0; tflag = 0; @@ -6048,6 +6149,8 @@ parameter_brace_expand (string, indexp, quoted, quoted_dollar_atp, contains_doll ret = alloc_word_desc (); ret->word = temp1; + if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) + ret->flags |= W_QUOTED|W_HASQUOTEDNULL; return ret; } else if (want_patsub) @@ -6376,7 +6479,6 @@ param_expand (string, sindex, quoted, expanded_something, quoted_dollar_at_p, contains_dollar_at); - /* Fix this later when parameter_brace_expand returns a WORD_DESC * */ if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal) return (tdesc); temp = tdesc ? tdesc->word : (char *)0; @@ -6389,12 +6491,7 @@ param_expand (string, sindex, quoted, expanded_something, in the string, discard TEMP, and go on. The exception to this is when we have "${@}" and $1 is '', since $@ needs special handling. */ - /* XXX - fix this once parameter_brace_expand returns a WORD_DESC * */ -#if 0 - if (temp && QUOTED_NULL (temp)) -#else if (tdesc && tdesc->word && (tdesc->flags & W_HASQUOTEDNULL) && QUOTED_NULL (temp)) -#endif { if (had_quoted_null_p) *had_quoted_null_p = 1; @@ -6434,8 +6531,14 @@ param_expand (string, sindex, quoted, expanded_something, /* Cut off ending `)' */ temp2[t_index] = '\0'; + if (chk_arithsub (temp2, t_index) == 0) + { + free (temp2); + goto comsub; + } + /* Expand variables found inside the expression. */ - temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string); + temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES); free (temp2); arithsub: @@ -6477,7 +6580,7 @@ comsub: zindex = t_index; /* Do initial variable expansion. */ - temp1 = expand_string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string); + temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES); goto arithsub; @@ -6707,7 +6810,7 @@ add_string: case '<': case '>': { - if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & W_DQUOTE) || posixly_correct) + if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & (W_DQUOTE|W_NOPROCSUB)) || posixly_correct) { sindex--; /* add_character: label increments sindex */ goto add_character; @@ -6795,6 +6898,12 @@ add_string: if (temp && *temp && t_index > 0) { temp1 = bash_tilde_expand (temp, tflag); + if (temp1 && *temp1 == '~' && STREQ (temp, temp1)) + { + FREE (temp); + FREE (temp1); + goto add_character; /* tilde expansion failed */ + } free (temp); temp = temp1; sindex += t_index; @@ -7471,9 +7580,6 @@ word_list_split (list) for (t = list, result = (WORD_LIST *)NULL; t; t = t->next) { tresult = word_split (t->word, ifs_value); -#if 0 - result = (WORD_LIST *) list_append (result, tresult); -#else if (result == 0) result = e = tresult; else @@ -7482,7 +7588,6 @@ word_list_split (list) while (e->next) e = e->next; } -#endif } return (result); } @@ -151,9 +151,15 @@ extern char *expand_string_to_string __P((char *, int)); extern char *expand_string_unsplit_to_string __P((char *, int)); extern char *expand_assignment_string_to_string __P((char *, int)); -/* De-quoted quoted characters in STRING. */ +/* Expand an arithmetic expression string */ +extern char *expand_arith_string __P((char *, int)); + +/* De-quote quoted characters in STRING. */ extern char *dequote_string __P((char *)); +/* De-quote quoted characters in each word in LIST. */ +extern WORD_LIST *dequote_list __P((WORD_LIST *)); + /* Expand WORD, performing word splitting on the result. This does parameter expansion, command substitution, arithmetic expansion, word splitting, and quote removal. */ diff --git a/support/Makefile.in b/support/Makefile.in index b49bd45d..b94e445d 100644 --- a/support/Makefile.in +++ b/support/Makefile.in @@ -53,8 +53,10 @@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ DEFS = @DEFS@ LOCAL_DEFS = @LOCAL_DEFS@ -LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ LIBS = @LIBS@ +LIBS_FOR_BUILD = ${LIBS} # XXX + +LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) LDFLAGS_FOR_BUILD = $(LDFLAGS) @@ -76,7 +78,7 @@ OBJ1 = man2html.o all: man2html$(EXEEXT) man2html$(EXEEXT): $(OBJ1) - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS} + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD} clean: $(RM) man2html$(EXEEXT) diff --git a/support/bash.xbm b/support/bash.xbm index 5c32613e..14bbe6aa 100644 --- a/support/bash.xbm +++ b/support/bash.xbm @@ -21,6 +21,7 @@ Icons { Simon. +Copyright (C) 1992 Simon Marshall ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #define bash_width 64 #define bash_height 48 diff --git a/support/mksignames.c b/support/mksignames.c index e6a15189..adfbb9b4 100644 --- a/support/mksignames.c +++ b/support/mksignames.c @@ -1,7 +1,7 @@ -/* signames.c -- Create and write `signames.h', which contains an array of +/* mksignames.c -- Create and write `signames.h', which contains an array of signal names. */ -/* Copyright (C) 1992-2003 Free Software Foundation, Inc. +/* Copyright (C) 1992-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -21,372 +21,29 @@ #include <config.h> -#include <stdio.h> #include <sys/types.h> #include <signal.h> + +#include <stdio.h> #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ +/* Duplicated from signames.c */ #if !defined (NSIG) # define NSIG 64 #endif -/* - * Special traps: - * EXIT == 0 - * DEBUG == NSIG - * ERR == NSIG+1 - * RETURN == NSIG+2 - */ #define LASTSIG NSIG+2 -char *signal_names[2 * (LASTSIG)]; - -#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) +/* Imported from signames.c */ +extern void initialize_signames (); +extern char *signal_names[]; char *progname; -/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively. - I don't want to allocate so much unused space for the intervening signal - numbers, so we just punt if SIGRTMAX is past the bounds of the - signal_names array (handled in configure). */ -#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS) -# undef SIGRTMAX -# undef SIGRTMIN -#endif - -#if defined (SIGRTMAX) || defined (SIGRTMIN) -# define RTLEN 14 -# define RTLIM 256 -#endif - -void -initialize_signames () -{ - register int i; -#if defined (SIGRTMAX) || defined (SIGRTMIN) - int rtmin, rtmax, rtcnt; -#endif - - for (i = 1; i < signal_names_size; i++) - signal_names[i] = (char *)NULL; - - /* `signal' 0 is what we do on exit. */ - signal_names[0] = "EXIT"; - - /* Place signal names which can be aliases for more common signal - names first. This allows (for example) SIGABRT to overwrite SIGLOST. */ - - /* POSIX 1003.1b-1993 real time signals, but take care of incomplete - implementations. Acoording to the standard, both, SIGRTMIN and - SIGRTMAX must be defined, SIGRTMIN must be stricly less than - SIGRTMAX, and the difference must be at least 7, that is, there - must be at least eight distinct real time signals. */ - - /* The generated signal names are SIGRTMIN, SIGRTMIN+1, ..., - SIGRTMIN+x, SIGRTMAX-x, ..., SIGRTMAX-1, SIGRTMAX. If the number - of RT signals is odd, there is an extra SIGRTMIN+(x+1). - These names are the ones used by ksh and /usr/xpg4/bin/sh on SunOS5. */ - -#if defined (SIGRTMIN) - rtmin = SIGRTMIN; - signal_names[rtmin] = "SIGRTMIN"; -#endif - -#if defined (SIGRTMAX) - rtmax = SIGRTMAX; - signal_names[rtmax] = "SIGRTMAX"; -#endif - -#if defined (SIGRTMAX) && defined (SIGRTMIN) - if (rtmax > rtmin) - { - rtcnt = (rtmax - rtmin - 1) / 2; - /* croak if there are too many RT signals */ - if (rtcnt >= RTLIM/2) - { - rtcnt = RTLIM/2-1; - fprintf(stderr, "%s: error: more than %i real time signals, fix `%s'\n", - progname, RTLIM, progname); - } - - for (i = 1; i <= rtcnt; i++) - { - signal_names[rtmin+i] = (char *)malloc(RTLEN); - if (signal_names[rtmin+i]) - sprintf (signal_names[rtmin+i], "SIGRTMIN+%d", i); - signal_names[rtmax-i] = (char *)malloc(RTLEN); - if (signal_names[rtmax-i]) - sprintf (signal_names[rtmax-i], "SIGRTMAX-%d", i); - } - - if (rtcnt < RTLIM/2-1 && rtcnt != (rtmax-rtmin)/2) - { - /* Need an extra RTMIN signal */ - signal_names[rtmin+rtcnt+1] = (char *)malloc(RTLEN); - if (signal_names[rtmin+rtcnt+1]) - sprintf (signal_names[rtmin+rtcnt+1], "SIGRTMIN+%d", rtcnt+1); - } - } -#endif /* SIGRTMIN && SIGRTMAX */ - -#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ - signal_names[SIGLOST] = "SIGLOST"; -#endif - -/* AIX */ -#if defined (SIGMSG) /* HFT input data pending */ - signal_names[SIGMSG] = "SIGMSG"; -#endif - -#if defined (SIGDANGER) /* system crash imminent */ - signal_names[SIGDANGER] = "SIGDANGER"; -#endif - -#if defined (SIGMIGRATE) /* migrate process to another CPU */ - signal_names[SIGMIGRATE] = "SIGMIGRATE"; -#endif - -#if defined (SIGPRE) /* programming error */ - signal_names[SIGPRE] = "SIGPRE"; -#endif - -#if defined (SIGVIRT) /* AIX virtual time alarm */ - signal_names[SIGVIRT] = "SIGVIRT"; -#endif - -#if defined (SIGALRM1) /* m:n condition variables */ - signal_names[SIGALRM1] = "SIGALRM1"; -#endif - -#if defined (SIGWAITING) /* m:n scheduling */ - signal_names[SIGWAITING] = "SIGWAITING"; -#endif - -#if defined (SIGGRANT) /* HFT monitor mode granted */ - signal_names[SIGGRANT] = "SIGGRANT"; -#endif - -#if defined (SIGKAP) /* keep alive poll from native keyboard */ - signal_names[SIGKAP] = "SIGKAP"; -#endif - -#if defined (SIGRETRACT) /* HFT monitor mode retracted */ - signal_names[SIGRETRACT] = "SIGRETRACT"; -#endif - -#if defined (SIGSOUND) /* HFT sound sequence has completed */ - signal_names[SIGSOUND] = "SIGSOUND"; -#endif - -#if defined (SIGSAK) /* Secure Attention Key */ - signal_names[SIGSAK] = "SIGSAK"; -#endif - -/* SunOS5 */ -#if defined (SIGLWP) /* special signal used by thread library */ - signal_names[SIGLWP] = "SIGLWP"; -#endif - -#if defined (SIGFREEZE) /* special signal used by CPR */ - signal_names[SIGFREEZE] = "SIGFREEZE"; -#endif - -#if defined (SIGTHAW) /* special signal used by CPR */ - signal_names[SIGTHAW] = "SIGTHAW"; -#endif - -#if defined (SIGCANCEL) /* thread cancellation signal used by libthread */ - signal_names[SIGCANCEL] = "SIGCANCEL"; -#endif - -#if defined (SIGXRES) /* resource control exceeded */ - signal_names[SIGXRES] = "SIGXRES"; -#endif - -/* HP-UX */ -#if defined (SIGDIL) /* DIL signal (?) */ - signal_names[SIGDIL] = "SIGDIL"; -#endif - -/* System V */ -#if defined (SIGCLD) /* Like SIGCHLD. */ - signal_names[SIGCLD] = "SIGCLD"; -#endif - -#if defined (SIGPWR) /* power state indication */ - signal_names[SIGPWR] = "SIGPWR"; -#endif - -#if defined (SIGPOLL) /* Pollable event (for streams) */ - signal_names[SIGPOLL] = "SIGPOLL"; -#endif - -/* Unknown */ -#if defined (SIGWINDOW) - signal_names[SIGWINDOW] = "SIGWINDOW"; -#endif - -/* Linux */ -#if defined (SIGSTKFLT) - signal_names[SIGSTKFLT] = "SIGSTKFLT"; -#endif - -/* FreeBSD */ -#if defined (SIGTHR) /* thread interrupt */ - signal_names[SIGTHR] = "SIGTHR"; -#endif - -/* Common */ -#if defined (SIGHUP) /* hangup */ - signal_names[SIGHUP] = "SIGHUP"; -#endif - -#if defined (SIGINT) /* interrupt */ - signal_names[SIGINT] = "SIGINT"; -#endif - -#if defined (SIGQUIT) /* quit */ - signal_names[SIGQUIT] = "SIGQUIT"; -#endif - -#if defined (SIGILL) /* illegal instruction (not reset when caught) */ - signal_names[SIGILL] = "SIGILL"; -#endif - -#if defined (SIGTRAP) /* trace trap (not reset when caught) */ - signal_names[SIGTRAP] = "SIGTRAP"; -#endif - -#if defined (SIGIOT) /* IOT instruction */ - signal_names[SIGIOT] = "SIGIOT"; -#endif - -#if defined (SIGABRT) /* Cause current process to dump core. */ - signal_names[SIGABRT] = "SIGABRT"; -#endif - -#if defined (SIGEMT) /* EMT instruction */ - signal_names[SIGEMT] = "SIGEMT"; -#endif - -#if defined (SIGFPE) /* floating point exception */ - signal_names[SIGFPE] = "SIGFPE"; -#endif - -#if defined (SIGKILL) /* kill (cannot be caught or ignored) */ - signal_names[SIGKILL] = "SIGKILL"; -#endif - -#if defined (SIGBUS) /* bus error */ - signal_names[SIGBUS] = "SIGBUS"; -#endif - -#if defined (SIGSEGV) /* segmentation violation */ - signal_names[SIGSEGV] = "SIGSEGV"; -#endif - -#if defined (SIGSYS) /* bad argument to system call */ - signal_names[SIGSYS] = "SIGSYS"; -#endif - -#if defined (SIGPIPE) /* write on a pipe with no one to read it */ - signal_names[SIGPIPE] = "SIGPIPE"; -#endif - -#if defined (SIGALRM) /* alarm clock */ - signal_names[SIGALRM] = "SIGALRM"; -#endif - -#if defined (SIGTERM) /* software termination signal from kill */ - signal_names[SIGTERM] = "SIGTERM"; -#endif - -#if defined (SIGURG) /* urgent condition on IO channel */ - signal_names[SIGURG] = "SIGURG"; -#endif - -#if defined (SIGSTOP) /* sendable stop signal not from tty */ - signal_names[SIGSTOP] = "SIGSTOP"; -#endif - -#if defined (SIGTSTP) /* stop signal from tty */ - signal_names[SIGTSTP] = "SIGTSTP"; -#endif - -#if defined (SIGCONT) /* continue a stopped process */ - signal_names[SIGCONT] = "SIGCONT"; -#endif - -#if defined (SIGCHLD) /* to parent on child stop or exit */ - signal_names[SIGCHLD] = "SIGCHLD"; -#endif - -#if defined (SIGTTIN) /* to readers pgrp upon background tty read */ - signal_names[SIGTTIN] = "SIGTTIN"; -#endif - -#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */ - signal_names[SIGTTOU] = "SIGTTOU"; -#endif - -#if defined (SIGIO) /* input/output possible signal */ - signal_names[SIGIO] = "SIGIO"; -#endif - -#if defined (SIGXCPU) /* exceeded CPU time limit */ - signal_names[SIGXCPU] = "SIGXCPU"; -#endif - -#if defined (SIGXFSZ) /* exceeded file size limit */ - signal_names[SIGXFSZ] = "SIGXFSZ"; -#endif - -#if defined (SIGVTALRM) /* virtual time alarm */ - signal_names[SIGVTALRM] = "SIGVTALRM"; -#endif - -#if defined (SIGPROF) /* profiling time alarm */ - signal_names[SIGPROF] = "SIGPROF"; -#endif - -#if defined (SIGWINCH) /* window changed */ - signal_names[SIGWINCH] = "SIGWINCH"; -#endif - -/* 4.4 BSD */ -#if defined (SIGINFO) && !defined (_SEQUENT_) /* information request */ - signal_names[SIGINFO] = "SIGINFO"; -#endif - -#if defined (SIGUSR1) /* user defined signal 1 */ - signal_names[SIGUSR1] = "SIGUSR1"; -#endif - -#if defined (SIGUSR2) /* user defined signal 2 */ - signal_names[SIGUSR2] = "SIGUSR2"; -#endif - -#if defined (SIGKILLTHR) /* BeOS: Kill Thread */ - signal_names[SIGKILLTHR] = "SIGKILLTHR"; -#endif - - for (i = 0; i < NSIG; i++) - if (signal_names[i] == (char *)NULL) - { - signal_names[i] = (char *)malloc (18); - if (signal_names[i]) - sprintf (signal_names[i], "SIGJUNK(%d)", i); - } - - signal_names[NSIG] = "DEBUG"; - signal_names[NSIG+1] = "ERR"; - signal_names[NSIG+2] = "RETURN"; -} - void write_signames (stream) FILE *stream; @@ -395,16 +52,22 @@ write_signames (stream) fprintf (stream, "/* This file was automatically created by %s.\n", progname); - fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n"); + fprintf (stream, " Do not edit. Edit support/signames.c instead. */\n\n"); fprintf (stream, "/* A translation list so we can be polite to our users. */\n"); +#if defined (CROSS_COMPILING) + fprintf (stream, "extern char *signal_names[];\n\n"); + fprintf (stream, "extern void initialize_signames __P((void));\n\n"); +#else fprintf (stream, "char *signal_names[NSIG + 4] = {\n"); for (i = 0; i <= LASTSIG; i++) fprintf (stream, " \"%s\",\n", signal_names[i]); fprintf (stream, " (char *)0x0\n"); - fprintf (stream, "};\n"); + fprintf (stream, "};\n\n"); + fprintf (stream, "#define initialize_signames()\n\n"); +#endif } int @@ -440,7 +103,9 @@ main (argc, argv) exit (2); } +#if !defined (CROSS_COMPILING) initialize_signames (); +#endif write_signames (stream); exit (0); } diff --git a/support/mkversion.sh b/support/mkversion.sh index 6aca944f..92fa77c7 100755 --- a/support/mkversion.sh +++ b/support/mkversion.sh @@ -67,7 +67,7 @@ fi # increment the build version if that's what's required if [ -n "$inc_build" ]; then - build_ver=`expr $build_ver + 1` + build_ver=`expr 1 + $build_ver` fi # what's the patch level? diff --git a/support/shobj-conf b/support/shobj-conf index 0e306bc1..ef7863a3 100755 --- a/support/shobj-conf +++ b/support/shobj-conf @@ -142,6 +142,23 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) ;; # Darwin/MacOS X +darwin8*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported + + SHOBJ_CFLAGS='-fno-common' + + SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' + + SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' + SHLIB_LIBSUFF='dylib' + + SHOBJ_LDFLAGS='-undefined dynamic_lookup' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + + SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 + ;; + darwin*|macosx*) SHOBJ_STATUS=unsupported SHLIB_STATUS=supported diff --git a/support/signames.c b/support/signames.c new file mode 100644 index 00000000..46b07e37 --- /dev/null +++ b/support/signames.c @@ -0,0 +1,393 @@ +/* signames.c -- Create an array of signal names. */ + +/* Copyright (C) 2006 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + Bash is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with Bash; see the file COPYING. If not, write to the Free Software + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#include <config.h> + +#include <stdio.h> + +#include <sys/types.h> +#include <signal.h> + +#if defined (HAVE_STDLIB_H) +# include <stdlib.h> +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if !defined (NSIG) +# define NSIG 64 +#endif + +/* + * Special traps: + * EXIT == 0 + * DEBUG == NSIG + * ERR == NSIG+1 + * RETURN == NSIG+2 + */ +#define LASTSIG NSIG+2 + +char *signal_names[2 * (LASTSIG)]; + +#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0])) + +/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively. + I don't want to allocate so much unused space for the intervening signal + numbers, so we just punt if SIGRTMAX is past the bounds of the + signal_names array (handled in configure). */ +#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS) +# undef SIGRTMAX +# undef SIGRTMIN +#endif + +#if defined (SIGRTMAX) || defined (SIGRTMIN) +# define RTLEN 14 +# define RTLIM 256 +#endif + +#if defined (BUILDTOOL) +extern char *progname; +#endif + +void +initialize_signames () +{ + register int i; +#if defined (SIGRTMAX) || defined (SIGRTMIN) + int rtmin, rtmax, rtcnt; +#endif + + for (i = 1; i < signal_names_size; i++) + signal_names[i] = (char *)NULL; + + /* `signal' 0 is what we do on exit. */ + signal_names[0] = "EXIT"; + + /* Place signal names which can be aliases for more common signal + names first. This allows (for example) SIGABRT to overwrite SIGLOST. */ + + /* POSIX 1003.1b-1993 real time signals, but take care of incomplete + implementations. Acoording to the standard, both, SIGRTMIN and + SIGRTMAX must be defined, SIGRTMIN must be stricly less than + SIGRTMAX, and the difference must be at least 7, that is, there + must be at least eight distinct real time signals. */ + + /* The generated signal names are SIGRTMIN, SIGRTMIN+1, ..., + SIGRTMIN+x, SIGRTMAX-x, ..., SIGRTMAX-1, SIGRTMAX. If the number + of RT signals is odd, there is an extra SIGRTMIN+(x+1). + These names are the ones used by ksh and /usr/xpg4/bin/sh on SunOS5. */ + +#if defined (SIGRTMIN) + rtmin = SIGRTMIN; + signal_names[rtmin] = "SIGRTMIN"; +#endif + +#if defined (SIGRTMAX) + rtmax = SIGRTMAX; + signal_names[rtmax] = "SIGRTMAX"; +#endif + +#if defined (SIGRTMAX) && defined (SIGRTMIN) + if (rtmax > rtmin) + { + rtcnt = (rtmax - rtmin - 1) / 2; + /* croak if there are too many RT signals */ + if (rtcnt >= RTLIM/2) + { + rtcnt = RTLIM/2-1; +#ifdef BUILDTOOL + fprintf(stderr, "%s: error: more than %d real time signals, fix `%s'\n", + progname, RTLIM, progname); +#endif + } + + for (i = 1; i <= rtcnt; i++) + { + signal_names[rtmin+i] = (char *)malloc(RTLEN); + if (signal_names[rtmin+i]) + sprintf (signal_names[rtmin+i], "SIGRTMIN+%d", i); + signal_names[rtmax-i] = (char *)malloc(RTLEN); + if (signal_names[rtmax-i]) + sprintf (signal_names[rtmax-i], "SIGRTMAX-%d", i); + } + + if (rtcnt < RTLIM/2-1 && rtcnt != (rtmax-rtmin)/2) + { + /* Need an extra RTMIN signal */ + signal_names[rtmin+rtcnt+1] = (char *)malloc(RTLEN); + if (signal_names[rtmin+rtcnt+1]) + sprintf (signal_names[rtmin+rtcnt+1], "SIGRTMIN+%d", rtcnt+1); + } + } +#endif /* SIGRTMIN && SIGRTMAX */ + +#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */ + signal_names[SIGLOST] = "SIGLOST"; +#endif + +/* AIX */ +#if defined (SIGMSG) /* HFT input data pending */ + signal_names[SIGMSG] = "SIGMSG"; +#endif + +#if defined (SIGDANGER) /* system crash imminent */ + signal_names[SIGDANGER] = "SIGDANGER"; +#endif + +#if defined (SIGMIGRATE) /* migrate process to another CPU */ + signal_names[SIGMIGRATE] = "SIGMIGRATE"; +#endif + +#if defined (SIGPRE) /* programming error */ + signal_names[SIGPRE] = "SIGPRE"; +#endif + +#if defined (SIGVIRT) /* AIX virtual time alarm */ + signal_names[SIGVIRT] = "SIGVIRT"; +#endif + +#if defined (SIGALRM1) /* m:n condition variables */ + signal_names[SIGALRM1] = "SIGALRM1"; +#endif + +#if defined (SIGWAITING) /* m:n scheduling */ + signal_names[SIGWAITING] = "SIGWAITING"; +#endif + +#if defined (SIGGRANT) /* HFT monitor mode granted */ + signal_names[SIGGRANT] = "SIGGRANT"; +#endif + +#if defined (SIGKAP) /* keep alive poll from native keyboard */ + signal_names[SIGKAP] = "SIGKAP"; +#endif + +#if defined (SIGRETRACT) /* HFT monitor mode retracted */ + signal_names[SIGRETRACT] = "SIGRETRACT"; +#endif + +#if defined (SIGSOUND) /* HFT sound sequence has completed */ + signal_names[SIGSOUND] = "SIGSOUND"; +#endif + +#if defined (SIGSAK) /* Secure Attention Key */ + signal_names[SIGSAK] = "SIGSAK"; +#endif + +/* SunOS5 */ +#if defined (SIGLWP) /* special signal used by thread library */ + signal_names[SIGLWP] = "SIGLWP"; +#endif + +#if defined (SIGFREEZE) /* special signal used by CPR */ + signal_names[SIGFREEZE] = "SIGFREEZE"; +#endif + +#if defined (SIGTHAW) /* special signal used by CPR */ + signal_names[SIGTHAW] = "SIGTHAW"; +#endif + +#if defined (SIGCANCEL) /* thread cancellation signal used by libthread */ + signal_names[SIGCANCEL] = "SIGCANCEL"; +#endif + +#if defined (SIGXRES) /* resource control exceeded */ + signal_names[SIGXRES] = "SIGXRES"; +#endif + +/* HP-UX */ +#if defined (SIGDIL) /* DIL signal (?) */ + signal_names[SIGDIL] = "SIGDIL"; +#endif + +/* System V */ +#if defined (SIGCLD) /* Like SIGCHLD. */ + signal_names[SIGCLD] = "SIGCLD"; +#endif + +#if defined (SIGPWR) /* power state indication */ + signal_names[SIGPWR] = "SIGPWR"; +#endif + +#if defined (SIGPOLL) /* Pollable event (for streams) */ + signal_names[SIGPOLL] = "SIGPOLL"; +#endif + +/* Unknown */ +#if defined (SIGWINDOW) + signal_names[SIGWINDOW] = "SIGWINDOW"; +#endif + +/* Linux */ +#if defined (SIGSTKFLT) + signal_names[SIGSTKFLT] = "SIGSTKFLT"; +#endif + +/* FreeBSD */ +#if defined (SIGTHR) /* thread interrupt */ + signal_names[SIGTHR] = "SIGTHR"; +#endif + +/* Common */ +#if defined (SIGHUP) /* hangup */ + signal_names[SIGHUP] = "SIGHUP"; +#endif + +#if defined (SIGINT) /* interrupt */ + signal_names[SIGINT] = "SIGINT"; +#endif + +#if defined (SIGQUIT) /* quit */ + signal_names[SIGQUIT] = "SIGQUIT"; +#endif + +#if defined (SIGILL) /* illegal instruction (not reset when caught) */ + signal_names[SIGILL] = "SIGILL"; +#endif + +#if defined (SIGTRAP) /* trace trap (not reset when caught) */ + signal_names[SIGTRAP] = "SIGTRAP"; +#endif + +#if defined (SIGIOT) /* IOT instruction */ + signal_names[SIGIOT] = "SIGIOT"; +#endif + +#if defined (SIGABRT) /* Cause current process to dump core. */ + signal_names[SIGABRT] = "SIGABRT"; +#endif + +#if defined (SIGEMT) /* EMT instruction */ + signal_names[SIGEMT] = "SIGEMT"; +#endif + +#if defined (SIGFPE) /* floating point exception */ + signal_names[SIGFPE] = "SIGFPE"; +#endif + +#if defined (SIGKILL) /* kill (cannot be caught or ignored) */ + signal_names[SIGKILL] = "SIGKILL"; +#endif + +#if defined (SIGBUS) /* bus error */ + signal_names[SIGBUS] = "SIGBUS"; +#endif + +#if defined (SIGSEGV) /* segmentation violation */ + signal_names[SIGSEGV] = "SIGSEGV"; +#endif + +#if defined (SIGSYS) /* bad argument to system call */ + signal_names[SIGSYS] = "SIGSYS"; +#endif + +#if defined (SIGPIPE) /* write on a pipe with no one to read it */ + signal_names[SIGPIPE] = "SIGPIPE"; +#endif + +#if defined (SIGALRM) /* alarm clock */ + signal_names[SIGALRM] = "SIGALRM"; +#endif + +#if defined (SIGTERM) /* software termination signal from kill */ + signal_names[SIGTERM] = "SIGTERM"; +#endif + +#if defined (SIGURG) /* urgent condition on IO channel */ + signal_names[SIGURG] = "SIGURG"; +#endif + +#if defined (SIGSTOP) /* sendable stop signal not from tty */ + signal_names[SIGSTOP] = "SIGSTOP"; +#endif + +#if defined (SIGTSTP) /* stop signal from tty */ + signal_names[SIGTSTP] = "SIGTSTP"; +#endif + +#if defined (SIGCONT) /* continue a stopped process */ + signal_names[SIGCONT] = "SIGCONT"; +#endif + +#if defined (SIGCHLD) /* to parent on child stop or exit */ + signal_names[SIGCHLD] = "SIGCHLD"; +#endif + +#if defined (SIGTTIN) /* to readers pgrp upon background tty read */ + signal_names[SIGTTIN] = "SIGTTIN"; +#endif + +#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */ + signal_names[SIGTTOU] = "SIGTTOU"; +#endif + +#if defined (SIGIO) /* input/output possible signal */ + signal_names[SIGIO] = "SIGIO"; +#endif + +#if defined (SIGXCPU) /* exceeded CPU time limit */ + signal_names[SIGXCPU] = "SIGXCPU"; +#endif + +#if defined (SIGXFSZ) /* exceeded file size limit */ + signal_names[SIGXFSZ] = "SIGXFSZ"; +#endif + +#if defined (SIGVTALRM) /* virtual time alarm */ + signal_names[SIGVTALRM] = "SIGVTALRM"; +#endif + +#if defined (SIGPROF) /* profiling time alarm */ + signal_names[SIGPROF] = "SIGPROF"; +#endif + +#if defined (SIGWINCH) /* window changed */ + signal_names[SIGWINCH] = "SIGWINCH"; +#endif + +/* 4.4 BSD */ +#if defined (SIGINFO) && !defined (_SEQUENT_) /* information request */ + signal_names[SIGINFO] = "SIGINFO"; +#endif + +#if defined (SIGUSR1) /* user defined signal 1 */ + signal_names[SIGUSR1] = "SIGUSR1"; +#endif + +#if defined (SIGUSR2) /* user defined signal 2 */ + signal_names[SIGUSR2] = "SIGUSR2"; +#endif + +#if defined (SIGKILLTHR) /* BeOS: Kill Thread */ + signal_names[SIGKILLTHR] = "SIGKILLTHR"; +#endif + + for (i = 0; i < NSIG; i++) + if (signal_names[i] == (char *)NULL) + { + signal_names[i] = (char *)malloc (18); + if (signal_names[i]) + sprintf (signal_names[i], "SIGJUNK(%d)", i); + } + + signal_names[NSIG] = "DEBUG"; + signal_names[NSIG+1] = "ERR"; + signal_names[NSIG+2] = "RETURN"; +} @@ -62,6 +62,7 @@ #define CXQUOTE 0x0400 /* cquote + backslash */ #define CSPECVAR 0x0800 /* single-character shell variable name */ #define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */ +#define CBLANK 0x2000 /* whitespace (blank) character */ /* Defines for use by the rest of the shell. */ extern int sh_syntaxtab[]; @@ -70,9 +71,10 @@ extern int sh_syntabsiz; #define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA) #define shellbreak(c) (sh_syntaxtab[(unsigned char)(c)] & CSHBRK) #define shellquote(c) (sh_syntaxtab[(unsigned char)(c)] & CQUOTE) - #define shellxquote(c) (sh_syntaxtab[(unsigned char)(c)] & CXQUOTE) +#define shellblank(c) (sh_syntaxtab[(unsigned char)(c)] & CBLANK) + #define issyntype(c, t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0) #define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0) @@ -101,14 +101,7 @@ static int test_error_return; #define test_exit(val) \ do { test_error_return = val; longjmp (test_exit_buf, 1); } while (0) -/* We have to use access(2) for machines running AFS, because it's - not a Unix file system. This may produce incorrect answers for - non-AFS files. I hate AFS. */ -#if defined (AFS) -# define EACCESS(path, mode) access(path, mode) -#else -# define EACCESS(path, mode) test_eaccess(path, mode) -#endif /* AFS */ +extern int sh_stat __P((const char *, struct stat *)); static int pos; /* The offset of the current argument in ARGV. */ static int argc; /* The number of arguments present in ARGV. */ @@ -119,8 +112,6 @@ static void test_syntax_error __P((char *, char *)) __attribute__((__noreturn__) static void beyond __P((void)) __attribute__((__noreturn__)); static void integer_expected_error __P((char *)) __attribute__((__noreturn__)); -static int test_stat __P((char *, struct stat *)); - static int unary_operator __P((void)); static int binary_operator __P((void)); static int two_arguments __P((void)); @@ -163,96 +154,6 @@ integer_expected_error (pch) test_syntax_error (_("%s: integer expression expected"), pch); } -/* A wrapper for stat () which disallows pathnames that are empty strings - and handles /dev/fd emulation on systems that don't have it. */ -static int -test_stat (path, finfo) - char *path; - struct stat *finfo; -{ - if (*path == '\0') - { - errno = ENOENT; - return (-1); - } - if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0) - { -#if !defined (HAVE_DEV_FD) - intmax_t fd; - int r; - - if (legal_number (path + 8, &fd) && fd == (int)fd) - { - r = fstat ((int)fd, finfo); - if (r == 0 || errno != EBADF) - return (r); - } - errno = ENOENT; - return (-1); -#else - /* If HAVE_DEV_FD is defined, DEV_FD_PREFIX is defined also, and has a - trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx. - On most systems, with the notable exception of linux, this is - effectively a no-op. */ - char pbuf[32]; - strcpy (pbuf, DEV_FD_PREFIX); - strcat (pbuf, path + 8); - return (stat (pbuf, finfo)); -#endif /* !HAVE_DEV_FD */ - } -#if !defined (HAVE_DEV_STDIN) - else if (STREQN (path, "/dev/std", 8)) - { - if (STREQ (path+8, "in")) - return (fstat (0, finfo)); - else if (STREQ (path+8, "out")) - return (fstat (1, finfo)); - else if (STREQ (path+8, "err")) - return (fstat (2, finfo)); - else - return (stat (path, finfo)); - } -#endif /* !HAVE_DEV_STDIN */ - return (stat (path, finfo)); -} - -/* Do the same thing access(2) does, but use the effective uid and gid, - and don't make the mistake of telling root that any file is - executable. */ -int -test_eaccess (path, mode) - char *path; - int mode; -{ - struct stat st; - - if (test_stat (path, &st) < 0) - return (-1); - - if (current_user.euid == 0) - { - /* Root can read or write any file. */ - if (mode != X_OK) - return (0); - - /* Root can execute any file that has any one of the execute - bits set. */ - if (st.st_mode & S_IXUGO) - return (0); - } - - if (st.st_uid == current_user.euid) /* owner */ - mode <<= 6; - else if (group_member (st.st_gid)) - mode <<= 3; - - if (st.st_mode & mode) - return (0); - - errno = EACCES; - return (-1); -} - /* Increment our position in the argument list. Check that we're not past the end of the argument list. This check is supressed if the argument is FALSE. Made a macro for efficiency. */ @@ -394,12 +295,12 @@ filecomp (s, t, op) struct stat st1, st2; int r1, r2; - if ((r1 = test_stat (s, &st1)) < 0) + if ((r1 = sh_stat (s, &st1)) < 0) { if (op == EF) return (FALSE); } - if ((r2 = test_stat (t, &st2)) < 0) + if ((r2 = sh_stat (t, &st2)) < 0) { if (op == EF) return (FALSE); @@ -597,31 +498,31 @@ unary_test (op, arg) { case 'a': /* file exists in the file system? */ case 'e': - return (test_stat (arg, &stat_buf) == 0); + return (sh_stat (arg, &stat_buf) == 0); case 'r': /* file is readable? */ - return (EACCESS (arg, R_OK) == 0); + return (sh_eaccess (arg, R_OK) == 0); case 'w': /* File is writeable? */ - return (EACCESS (arg, W_OK) == 0); + return (sh_eaccess (arg, W_OK) == 0); case 'x': /* File is executable? */ - return (EACCESS (arg, X_OK) == 0); + return (sh_eaccess (arg, X_OK) == 0); case 'O': /* File is owned by you? */ - return (test_stat (arg, &stat_buf) == 0 && + return (sh_stat (arg, &stat_buf) == 0 && (uid_t) current_user.euid == (uid_t) stat_buf.st_uid); case 'G': /* File is owned by your group? */ - return (test_stat (arg, &stat_buf) == 0 && + return (sh_stat (arg, &stat_buf) == 0 && (gid_t) current_user.egid == (gid_t) stat_buf.st_gid); case 'N': - return (test_stat (arg, &stat_buf) == 0 && + return (sh_stat (arg, &stat_buf) == 0 && stat_buf.st_atime <= stat_buf.st_mtime); case 'f': /* File is a file? */ - if (test_stat (arg, &stat_buf) < 0) + if (sh_stat (arg, &stat_buf) < 0) return (FALSE); /* -f is true if the given file exists and is a regular file. */ @@ -632,29 +533,29 @@ unary_test (op, arg) #endif /* !S_IFMT */ case 'd': /* File is a directory? */ - return (test_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode))); + return (sh_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode))); case 's': /* File has something in it? */ - return (test_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0); + return (sh_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0); case 'S': /* File is a socket? */ #if !defined (S_ISSOCK) return (FALSE); #else - return (test_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode)); + return (sh_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode)); #endif /* S_ISSOCK */ case 'c': /* File is character special? */ - return (test_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode)); + return (sh_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode)); case 'b': /* File is block special? */ - return (test_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode)); + return (sh_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode)); case 'p': /* File is a named pipe? */ #ifndef S_ISFIFO return (FALSE); #else - return (test_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode)); + return (sh_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode)); #endif /* S_ISFIFO */ case 'L': /* Same as -h */ @@ -667,17 +568,17 @@ unary_test (op, arg) #endif /* S_IFLNK && HAVE_LSTAT */ case 'u': /* File is setuid? */ - return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0); + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0); case 'g': /* File is setgid? */ - return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0); + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0); case 'k': /* File has sticky bit set? */ #if !defined (S_ISVTX) /* This is not Posix, and is not defined on some Posix systems. */ return (FALSE); #else - return (test_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0); + return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0); #endif case 't': /* File fd is a terminal? */ @@ -27,8 +27,6 @@ #define TEST_PATMATCH 0x01 #define TEST_ARITHEXP 0x02 -extern int test_eaccess __P((char *, int)); - extern int test_unop __P((char *)); extern int test_binop __P((char *)); diff --git a/tests/COPYRIGHT b/tests/COPYRIGHT new file mode 100644 index 00000000..414d9104 --- /dev/null +++ b/tests/COPYRIGHT @@ -0,0 +1,5 @@ +Unless otherwise stated, all files in this directory are Copyright (C) +1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006 +Free Software Foundation, Inc. + +The file ifs-posix.tests is Copyright (C) 2005 Glen Fowler. diff --git a/tests/README b/tests/README index a1a081be..b023ef60 100644 --- a/tests/README +++ b/tests/README @@ -1 +1,3 @@ Type `sh run-all'. + +Read COPYRIGHT for copyright information. diff --git a/tests/array.right b/tests/array.right index 488b4e46..53a7a006 100644 --- a/tests/array.right +++ b/tests/array.right @@ -137,6 +137,14 @@ value = new1 new2 new3 7 8 9 +8 11 +8 11 +6 +6 +nordholz +8 +8 +8 a b c d e f g for case if then else @@ -144,10 +152,10 @@ for case if then else 12 14 16 18 20 4414758999202 aaa bbb -./array.tests: line 282: syntax error near unexpected token `<>' -./array.tests: line 282: `metas=( <> < > ! )' -./array.tests: line 283: syntax error near unexpected token `<>' -./array.tests: line 283: `metas=( [1]=<> [2]=< [3]=> [4]=! )' +./array.tests: line 285: syntax error near unexpected token `<>' +./array.tests: line 285: `metas=( <> < > ! )' +./array.tests: line 286: syntax error near unexpected token `<>' +./array.tests: line 286: `metas=( [1]=<> [2]=< [3]=> [4]=! )' abc 3 case 4 abc case if then else 5 @@ -197,3 +205,4 @@ t [3]=abcde r s t u v e 9 +2 diff --git a/tests/array.tests b/tests/array.tests index 4a735d8c..ce461797 100644 --- a/tests/array.tests +++ b/tests/array.tests @@ -242,6 +242,9 @@ ${THIS_SH} ./array2.sub # some old bugs and ksh93 compatibility tests ${THIS_SH} ./array3.sub +# some compound assingment parsing problems that showed up in bash-3.1-release +${THIS_SH} ./array4.sub + set +u cd /tmp @@ -396,3 +399,7 @@ unset x[2] x[9]='9' echo ${x[*]: -1} + +TOOLKIT=(1 2 3 4 5 6 7 8 9 10) +ARRAY="1" +echo ${TOOLKIT["$ARRAY"]} diff --git a/tests/array4.sub b/tests/array4.sub new file mode 100644 index 00000000..97c766db --- /dev/null +++ b/tests/array4.sub @@ -0,0 +1,32 @@ +# compound assignment parsing problems in bash-3.1-release +func() +{ + local -a x=() y=() +} + +a=() b=() +eval foo=() +eval foo=() bar=() qux=( "bash" ) + +foo=( "bash" ) +eval foo=( "bash" ) +eval bar=( "bash" ) bax=( "bash" ) + +let a=(5 + 3) b=(4 + 7) +echo $a $b + +typeset -i a b +a=(5+3) b=(4+7) +echo $a $b + +let a=(4*3)/2 +echo $a +a=(4*3)/2 +echo $a + +LNAME=nordholz +echo ${LNAME} +echo ${#LNAME} + +echo ${#LNAME[$(( 0 ))]} +echo ${#LNAME[$(( 0+0 ))]} diff --git a/tests/braces.right b/tests/braces.right index 3d7ef8e7..f00d39a7 100644 --- a/tests/braces.right +++ b/tests/braces.right @@ -41,3 +41,5 @@ f 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 +a-{bd}-c a-{be}-c +a-{bdef-g-c a-{bdef-i-c diff --git a/tests/braces.tests b/tests/braces.tests index 3f57829f..5a57f284 100644 --- a/tests/braces.tests +++ b/tests/braces.tests @@ -68,3 +68,8 @@ echo 0{1..9} {10..20} # do negative numbers work? echo {-1..-10} echo {-20..0} + +# weirdly-formed brace expansions -- fixed in post-bash-3.1 +echo a-{b{d,e}}-c + +echo a-{bdef-{g,i}-c diff --git a/tests/cprint.right b/tests/cprint.right index 5dd629d1..20000724 100644 --- a/tests/cprint.right +++ b/tests/cprint.right @@ -1,14 +1,14 @@ tf is a function tf () { - echo this is ${0##*/} >/dev/null; - echo a | cat - >/dev/null; + echo this is ${0##*/} > /dev/null; + echo a | cat - > /dev/null; test -f ${0##*/} && echo ${0##*/} is a regular file; test -d ${0##*/} || echo ${0##*/} is not a directory; echo a; echo b; echo c; - echo background >/dev/null & ( exit 1 ); + echo background > /dev/null & ( exit 1 ); echo $?; { echo a @@ -18,20 +18,20 @@ tf () test -r /dev/fd/$i; i=$(( i + 1 )); done; - [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops >/dev/null; + [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null; for name in $( echo 1 2 3 ); do test -r /dev/fd/$name; done; if [[ -r /dev/fd/0 && -w /dev/fd/1 ]]; then - echo ok >/dev/null; + echo ok > /dev/null; else if (( 7 > 40 )); then echo oops; else echo done; fi; - fi >/dev/null; + fi > /dev/null; case $PATH in *$PWD*) echo \$PWD in \$PATH @@ -39,13 +39,13 @@ tf () *) echo \$PWD not in \$PATH ;; - esac >/dev/null; + esac > /dev/null; while false; do echo z; - done >/dev/null; + done > /dev/null; until true; do echo z; - done >/dev/null; + done > /dev/null; echo \&\|'()' \{ echo abcde \; \}; eval fu\%nc'()' \{ echo abcde \; \}; type fu\%nc @@ -54,7 +54,7 @@ tf2 is a function tf2 () { ( { - time -p echo a | cat - >/dev/null + time -p echo a | cat - > /dev/null } ) 2>&1 } cprint.tests is a regular file diff --git a/tests/extglob.right b/tests/extglob.right index f063b261..301e97b2 100644 --- a/tests/extglob.right +++ b/tests/extglob.right @@ -78,3 +78,12 @@ a b a,b a-b a.b a:b a;b a_b a b a,b a-b a.b a:b a;b a_b a b a,b a-b a.b a:b a;b a_b argv[1] = <ef> +a.c +a.c +a.c +a.c +a.c +a.c +ok 1 +ok 2 +ok 3 diff --git a/tests/extglob.tests b/tests/extglob.tests index 2d938500..51e33ee7 100644 --- a/tests/extglob.tests +++ b/tests/extglob.tests @@ -193,7 +193,7 @@ esac MYDIR=$PWD # save where we are -TESTDIR=/tmp/eglob-test +TESTDIR=/tmp/eglob-test-$$ mkdir $TESTDIR builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; } rm -rf * @@ -360,4 +360,6 @@ recho "${x#*(a|b)cd}" # in the right place builtin cd $MYDIR +${THIS_SH} ./extglob1.sub + exit 0 diff --git a/tests/extglob1.sub b/tests/extglob1.sub new file mode 100644 index 00000000..3beec9e8 --- /dev/null +++ b/tests/extglob1.sub @@ -0,0 +1,37 @@ +MYDIR=$PWD + +: ${TMPDIR:=/tmp} +GDIR=$TMPDIR/gtest-$$ + +shopt -s extglob + +mkdir $GDIR || exit 1 +cd $GDIR || exit 1 + +touch a.c + +echo +([[:alpha:].]) +echo +([[:alpha:].])+([[:alpha:].]) +echo *([[:alpha:].]) +echo *([[:alpha:].])*([[:alpha:].]) + +echo ?([[:alpha:].])?([[:alpha:].])?([[:alpha:].]) +echo @([[:alpha:].])@([[:alpha:].])@([[:alpha:].]) + +case . in +!([[:alpha:].]) ) echo bad 1;; +*) echo ok 1;; +esac + +case . in +?([[:alpha:].]) ) echo ok 2;; +*) echo bad 2;; +esac + +case . in +@([[:alpha:].]) ) echo ok 3;; +*) echo bad 3;; +esac + +cd $MYDIR +rm -rf $GDIR diff --git a/tests/func.right b/tests/func.right index e51d92b1..e97a4865 100644 --- a/tests/func.right +++ b/tests/func.right @@ -27,7 +27,7 @@ f1 () return $status } before: try to assign to FUNCNAME -outside: FUNCNAME = +outside: FUNCNAME = main before: FUNCNAME = func FUNCNAME = func2 after: FUNCNAME = func @@ -148,3 +148,4 @@ expect 2 40 2 40 expect 5 20 5 20 +5 diff --git a/tests/func.tests b/tests/func.tests index 063f4e0b..23dff44b 100644 --- a/tests/func.tests +++ b/tests/func.tests @@ -132,7 +132,7 @@ func() } echo before: try to assign to FUNCNAME -FUCNAME=7 +FUNCNAME=7 echo outside: FUNCNAME = $FUNCNAME func @@ -165,4 +165,12 @@ myfunction() { myfunction myfunction | cat +segv() +{ + echo foo | return 5 +} + +segv +echo $? + exit 0 diff --git a/tests/heredoc.right b/tests/heredoc.right index d71781e8..c3f6a7fd 100644 --- a/tests/heredoc.right +++ b/tests/heredoc.right @@ -20,7 +20,7 @@ jkl mno fff is a function fff () { - ed /tmp/foo >/dev/null <<ENDOFINPUT + ed /tmp/foo > /dev/null <<ENDOFINPUT /^name/d w q @@ -31,7 +31,7 @@ ENDOFINPUT fff is a function fff () { - ed /tmp/foo >/dev/null <<ENDOFINPUT + ed /tmp/foo > /dev/null <<ENDOFINPUT /^name/d w q diff --git a/tests/new-exp.right b/tests/new-exp.right index 8866835d..f2dfbc13 100644 --- a/tests/new-exp.right +++ b/tests/new-exp.right @@ -430,7 +430,7 @@ Case05---3---A:B:C--- Case06---1---A B C::--- Case07---3---A:B:C--- Case08---3---A:B:C--- -./new-exp.tests: line 506: ${$(($#-1))}: bad substitution +./new-exp.tests: line 506: /${$(($#-1))}: bad substitution argv[1] = <a> argv[2] = <b> argv[3] = <c> @@ -502,4 +502,17 @@ h --blah lah lah -./new-exp.tests: line 558: ABXD: parameter unset +argv[1] = <> +argv[1] = <+> +argv[1] = <+^?> +argv[1] = <+> +argv[1] = <^?2> +argv[1] = <^?2> +argv[1] = <^?> +argv[1] = <^?> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <> +argv[1] = <12> +./new-exp.tests: line 560: ABXD: parameter unset diff --git a/tests/new-exp.tests b/tests/new-exp.tests index e0c2702a..78a0e7fb 100644 --- a/tests/new-exp.tests +++ b/tests/new-exp.tests @@ -212,9 +212,9 @@ recho ${av[1]/??/za} expect '<zaza>' recho ${av[1]//??/za} expect '<zagh>' -recho ${av[1]//#??/za} +recho ${av[1]/#??/za} expect '<efza>' -recho ${av[1]//%??/za} +recho ${av[1]/%??/za} expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>' recho ${av[@]/*/yyy} @@ -238,17 +238,17 @@ recho ${@/%??/xx} expect '<zaza>' recho ${3//??/za} expect '<efza>' -recho ${3//%??/za} +recho ${3/%??/za} expect '<zaza> <zaza> <zaza> <zaza> <zaza> <zaza>' recho ${@//??/za} expect '<zacd> <zagh> <zakl> <zaop> <zast> <zawx>' -recho ${@//#??/za} +recho ${@/#??/za} expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>' recho ${@//*/yyy} expect '<yyy> <efgh> <ijkl> <mnop> <qrst> <uvwx>' recho ${@//a*/yyy} expect '<abcd> <efgh> <ijkl> <mnop> <qrst> <uvwyyy>' -recho ${@//%x*/yyy} +recho ${@/%x*/yyy} expect a newline echo $abmcde @@ -548,11 +548,13 @@ var=blah # these had better agree echo ${var[@]:3} echo ${var:3} -echo ${var[@]//#/--} -echo ${var//#/--} +echo ${var[@]/#/--} +echo ${var/#/--} echo ${var[@]##?} echo ${var##?} +${THIS_SH} ./new-exp6.sub + # this must be last! expect $0: 'ABXD: parameter unset' recho ${ABXD:?"parameter unset"} diff --git a/tests/new-exp6.sub b/tests/new-exp6.sub new file mode 100644 index 00000000..c2fbd73c --- /dev/null +++ b/tests/new-exp6.sub @@ -0,0 +1,22 @@ +# quoted null problems in versions of bash prior to 3.2 + +str='12' +snul=$'\177' + +recho "${str:2}" +recho "+${str:2}" +recho "+${snul:0:1}" +recho "+""${str:2}" + +recho "${str/?/$snul}" +recho ${str/?/$snul} + +recho "${snul/x/y}" +recho ${snul/x/y} + +recho "${snul/$snul/}" +recho "${str/$str/}" + +recho "${snul##$snul}" +recho "${str##$str}" +recho "${str##$nul}" diff --git a/tests/nquote.right b/tests/nquote.right index 904467b5..6d936d5e 100644 --- a/tests/nquote.right +++ b/tests/nquote.right @@ -30,3 +30,8 @@ argv[1] = <hello, $"world"> argv[1] = <hello, \$"world"> argv[1] = <hello, $"world"> argv[1] = <hello, $world> +1 +1 +;foo +argv[1] = <^I> +argv[1] = <'A^IB'> diff --git a/tests/nquote.tests b/tests/nquote.tests index b25fbe31..62d90b99 100644 --- a/tests/nquote.tests +++ b/tests/nquote.tests @@ -100,3 +100,17 @@ recho $'hello, \$"world"' recho $'hello, $\"world"' recho "hello, $"world"" + +# ansi quoting inside double-quoted command subst - bash-3.1 bug +echo $(set -- $'a b'; echo $#) +echo "$(set -- $'a b'; echo $#)" + +echo "$(echo $';foo')" + +args () +{ + for a in "$@";do echo "'$a'";done +} +unset mytab +recho "${mytab:-$'\t'}" +recho "$( args $'A\tB' )" diff --git a/tests/printf.right b/tests/printf.right Binary files differindex 656b1985..cea11ce9 100644 --- a/tests/printf.right +++ b/tests/printf.right diff --git a/tests/printf.tests b/tests/printf.tests index 9cd73026..60928d6b 100644 --- a/tests/printf.tests +++ b/tests/printf.tests @@ -67,7 +67,7 @@ printf -- "--%b--\n" '\t\0101' printf -- "--%b--\n" '\t\101' # these should all display `A7' -echo -e "\1017" +echo -e "\01017" echo -e "\x417" printf "%b\n" '\01017' @@ -246,3 +246,10 @@ printf '\x07e\n' # additional backslash escapes printf '\"\?\n' + +# failures with decimal precisions until after bash-3.1 +printf '%0.5d\n' 1 + +printf '%05d\n' 1 +printf '%5d\n' 1 +printf '%0d\n' 1 diff --git a/tests/quote.right b/tests/quote.right index 8d71f5dd..424d1a04 100644 --- a/tests/quote.right +++ b/tests/quote.right @@ -40,3 +40,29 @@ foo bar foo\ bar +argv[1] = <foo \\^Jbar> +argv[1] = <foo \^Jbar> +argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]/\^J/g> +argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]//g> +argv[1] = <foo\^Jbar> +argv[1] = <foobar> +argv[1] = <foo\^Jbar> +b +a +b +c +argv[1] = <a\> +argv[2] = <b> +argv[1] = <$> +argv[2] = <bab> +argv[1] = <$foo> +argv[2] = <bab> +argv[1] = <$foo> +argv[2] = <bab> +argv[1] = <`> +argv[2] = <ab> +argv[1] = <\> +argv[2] = <ab> +${ +argv[1] = <(")> +argv[1] = <(")> diff --git a/tests/quote.tests b/tests/quote.tests index 152ea5a3..46edea75 100644 --- a/tests/quote.tests +++ b/tests/quote.tests @@ -61,3 +61,51 @@ echo "$(echo 'foo bar')" echo "$(echo 'foo\ bar')" + +# old-style command substitution parsing compatibility tests -- post bash-3.1 +recho 'foo \\ +bar' + +recho 'foo \ +bar' + +echo `recho sed -e 's/[ :]/\\ +/g'` + +echo `recho sed -e 's/[ :]/\ +/g'` + +echo `recho 'foo\\ +bar'` + +echo `recho 'foo\ +bar'` + +echo $(recho 'foo\ +bar') + +a=`echo 'a b c' | sed 's/ /\\ +/g' | grep 'b'` +echo $a +a=`echo 'a b c' | sed 's/ /\\ +/g'` +echo "$a" + +recho `echo 'a\' b` + +recho `echo '\$' bab` +recho `echo '\$foo' bab` +recho `echo '$foo' bab` + +recho `echo '\`' ab` + +recho `echo '\\' ab` + +echo `echo '${'` + +recho `echo "(\\")"` +# produces no output +: `: "\\""` +# ultimate workaround +recho `echo "(\")"` + diff --git a/tests/redir.right b/tests/redir.right index 68bea526..e56b9804 100644 --- a/tests/redir.right +++ b/tests/redir.right @@ -78,7 +78,7 @@ read line echo $line f () { - exec 5<$0; + exec 5< $0; exec 0<&5-; while read line; do echo "$line"; diff --git a/tests/tilde.right b/tests/tilde.right index b22dabf1..fe58ae34 100644 --- a/tests/tilde.right +++ b/tests/tilde.right @@ -22,3 +22,4 @@ abcd:~chet ok 1 ok 2 ok 3 +~root diff --git a/tests/tilde.tests b/tests/tilde.tests index f5f53090..8b2bdb8b 100644 --- a/tests/tilde.tests +++ b/tests/tilde.tests @@ -64,3 +64,6 @@ case $unset in "") echo ok 3 ;; *) echo bad 3 ;; esac + +USER=root # should exist just about everywhere +echo ~$USER @@ -1,7 +1,7 @@ /* trap.c -- Not the trap command, but useful functions for manipulating those objects. The trap command is in builtins/trap.def. */ -/* Copyright (C) 1987-2005 Free Software Foundation, Inc. +/* Copyright (C) 1987-2006 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -76,7 +76,6 @@ static void restore_signal __P((int)); static void reset_or_restore_signal_handlers __P((sh_resetsig_func_t *)); /* Variables used here but defined in other files. */ -extern int interrupt_immediately; extern int last_command_exit_value; extern int line_number; @@ -114,11 +113,25 @@ int wait_signal_received; /* A value which can never be the target of a trap handler. */ #define IMPOSSIBLE_TRAP_HANDLER (SigHandler *)initialize_traps +#define GETORIGSIG(sig) \ + do { \ + original_signals[sig] = (SigHandler *)set_signal_handler (sig, SIG_DFL); \ + set_signal_handler (sig, original_signals[sig]); \ + if (original_signals[sig] == SIG_IGN) \ + sigmodes[sig] |= SIG_HARD_IGNORE; \ + } while (0) + +#define GET_ORIGINAL_SIGNAL(sig) \ + if (sig && sig < NSIG && original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) \ + GETORIGSIG(sig) + void initialize_traps () { register int i; + initialize_signames(); + trap_list[EXIT_TRAP] = trap_list[DEBUG_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL; sigmodes[EXIT_TRAP] = sigmodes[DEBUG_TRAP] = sigmodes[ERROR_TRAP] = sigmodes[RETURN_TRAP] = SIG_INHERITED; original_signals[EXIT_TRAP] = IMPOSSIBLE_TRAP_HANDLER; @@ -133,32 +146,25 @@ initialize_traps () /* Show which signals are treated specially by the shell. */ #if defined (SIGCHLD) - original_signals[SIGCHLD] = - (SigHandler *) set_signal_handler (SIGCHLD, SIG_DFL); - set_signal_handler (SIGCHLD, original_signals[SIGCHLD]); + GETORIGSIG (SIGCHLD); sigmodes[SIGCHLD] |= (SIG_SPECIAL | SIG_NO_TRAP); #endif /* SIGCHLD */ - original_signals[SIGINT] = - (SigHandler *) set_signal_handler (SIGINT, SIG_DFL); - set_signal_handler (SIGINT, original_signals[SIGINT]); + GETORIGSIG (SIGINT); sigmodes[SIGINT] |= SIG_SPECIAL; #if defined (__BEOS__) /* BeOS sets SIGINT to SIG_IGN! */ original_signals[SIGINT] = SIG_DFL; + sigmodes[SIGINT] &= ~SIG_HARD_IGNORE; #endif - original_signals[SIGQUIT] = - (SigHandler *) set_signal_handler (SIGQUIT, SIG_DFL); - set_signal_handler (SIGQUIT, original_signals[SIGQUIT]); + GETORIGSIG (SIGQUIT); sigmodes[SIGQUIT] |= SIG_SPECIAL; if (interactive) { - original_signals[SIGTERM] = - (SigHandler *)set_signal_handler (SIGTERM, SIG_DFL); - set_signal_handler (SIGTERM, original_signals[SIGTERM]); + GETORIGSIG (SIGTERM); sigmodes[SIGTERM] |= SIG_SPECIAL; } } @@ -445,7 +451,7 @@ set_sigint_handler () else if (interactive) /* XXX - was interactive_shell */ return (set_signal_handler (SIGINT, sigint_sighandler)); else - return (set_signal_handler (SIGINT, termination_unwind_protect)); + return (set_signal_handler (SIGINT, termsig_sighandler)); } /* Return the correct handler for signal SIG according to the values in @@ -487,17 +493,9 @@ set_signal (sig, string) { /* If we aren't sure of the original value, check it. */ if (original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) - { - original_signals[sig] = (SigHandler *)set_signal_handler (sig, SIG_DFL); - set_signal_handler (sig, original_signals[sig]); - } - - /* Signals ignored on entry to the shell cannot be trapped or reset. */ + GETORIGSIG (sig); if (original_signals[sig] == SIG_IGN) - { - sigmodes[sig] |= SIG_HARD_IGNORE; - return; - } + return; } /* Only change the system signal handler if SIG_NO_TRAP is not set. @@ -545,25 +543,13 @@ change_signal (sig, value) sigmodes[sig] |= SIG_CHANGED; } -#define GET_ORIGINAL_SIGNAL(sig) \ - if (sig && sig < NSIG && original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) \ - get_original_signal (sig) - static void get_original_signal (sig) int sig; { /* If we aren't sure the of the original value, then get it. */ if (original_signals[sig] == (SigHandler *)IMPOSSIBLE_TRAP_HANDLER) - { - original_signals[sig] = - (SigHandler *) set_signal_handler (sig, SIG_DFL); - set_signal_handler (sig, original_signals[sig]); - - /* Signals ignored on entry to the shell cannot be trapped. */ - if (original_signals[sig] == SIG_IGN) - sigmodes[sig] |= SIG_HARD_IGNORE; - } + GETORIGSIG (sig); } /* Restore the default action for SIG; i.e., the action the shell @@ -901,18 +887,13 @@ reset_or_restore_signal_handlers (reset) `functrace' or `errtrace' options have been set, then let command substitutions inherit them. Let command substitution inherit the RETURN trap if we're in the debugger and tracing functions. */ -#if defined (DEBUGGER) - if (debugging_mode == 0 || function_trace_mode == 0) -#endif - sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED; -#if defined (DEBUGGER) - if (debugging_mode == 0 || error_trace_mode == 0) -#endif + if (function_trace_mode == 0) + { + sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED; + sigmodes[RETURN_TRAP] &= ~SIG_TRAPPED; + } + if (error_trace_mode == 0) sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED; -#if defined (DEBUGGER) - if (debugging_mode == 0 || function_trace_mode == 0) -#endif - sigmodes[RETURN_TRAP] &= ~SIG_TRAPPED; } /* Reset trapped signals to their original values, but don't free the diff --git a/unwind_prot.c b/unwind_prot.c index 4bb7a78f..4fd194e8 100644 --- a/unwind_prot.c +++ b/unwind_prot.c @@ -73,8 +73,6 @@ typedef union uwp { } UNWIND_ELT; -extern int interrupt_immediately; - static void without_interrupts __P((VFunction *, char *, char *)); static void unwind_frame_discard_internal __P((char *, char *)); static void unwind_frame_run_internal __P((char *, char *)); diff --git a/variables.c b/variables.c index 62e2604a..5fd9d0e9 100644 --- a/variables.c +++ b/variables.c @@ -155,6 +155,8 @@ int array_needs_making = 1; int shell_level = 0; /* Some forward declarations. */ +static void create_variable_tables __P((void)); + static void set_machine_vars __P((void)); static void set_home_var __P((void)); static void set_shell_var __P((void)); @@ -252,19 +254,10 @@ static void push_func_var __P((PTR_T)); static void push_exported_var __P((PTR_T)); static inline int find_special_var __P((const char *)); - -/* Initialize the shell variables from the current environment. - If PRIVMODE is nonzero, don't import functions from ENV or - parse $SHELLOPTS. */ -void -initialize_shell_variables (env, privmode) - char **env; - int privmode; -{ - char *name, *string, *temp_string; - int c, char_index, string_index, string_length; - SHELL_VAR *temp_var; +static void +create_variable_tables () +{ if (shell_variables == 0) { shell_variables = global_variables = new_var_context ((char *)NULL, 0); @@ -279,6 +272,21 @@ initialize_shell_variables (env, privmode) if (shell_function_defs == 0) shell_function_defs = hash_create (0); #endif +} + +/* Initialize the shell variables from the current environment. + If PRIVMODE is nonzero, don't import functions from ENV or + parse $SHELLOPTS. */ +void +initialize_shell_variables (env, privmode) + char **env; + int privmode; +{ + char *name, *string, *temp_string; + int c, char_index, string_index, string_length; + SHELL_VAR *temp_var; + + create_variable_tables (); for (string_index = 0; string = env[string_index++]; ) { @@ -362,11 +370,7 @@ initialize_shell_variables (env, privmode) set_pwd (); /* Set up initial value of $_ */ -#if 0 - temp_var = bind_variable ("_", dollar_vars[0], 0); -#else temp_var = set_if_not ("_", dollar_vars[0]); -#endif /* Remember this pid. */ dollar_dollar_pid = getpid (); @@ -440,7 +444,7 @@ initialize_shell_variables (env, privmode) bind_variable ("OPTERR", "1", 0); sh_opterr = 1; - if (login_shell == 1) + if (login_shell == 1 && posixly_correct == 0) set_home_var (); /* Get the full pathname to THIS shell, and set the BASH variable @@ -483,8 +487,10 @@ initialize_shell_variables (env, privmode) set_if_not ("HISTFILE", name); free (name); +#if 0 set_if_not ("HISTSIZE", "500"); sv_histsize ("HISTSIZE"); +#endif } #endif /* HISTORY */ @@ -860,9 +866,11 @@ sh_set_lines_and_columns (lines, cols) { char val[INT_STRLEN_BOUND(int) + 1], *v; +#if defined (READLINE) /* If we are currently assigning to LINES or COLUMNS, don't do anything. */ if (winsize_assignment) return; +#endif v = inttostr (lines, val, sizeof (val)); bind_variable ("LINES", v, 0); @@ -1302,20 +1310,11 @@ static SHELL_VAR * get_comp_wordbreaks (var) SHELL_VAR *var; { - char *p; - /* If we don't have anything yet, assign a default value. */ if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0) enable_hostname_completion (perform_hostname_completion); -#if 0 - FREE (value_cell (var)); - p = savestring (rl_completer_word_break_characters); - - var_setvalue (var, p); -#else var_setvalue (var, rl_completer_word_break_characters); -#endif return (var); } @@ -1355,7 +1354,7 @@ get_dirstack (self) ARRAY *a; WORD_LIST *l; - l = get_directory_stack (); + l = get_directory_stack (0); a = array_from_word_list (l); array_dispose (array_cell (self)); dispose_words (l); @@ -1631,6 +1630,9 @@ set_if_not (name, value) { SHELL_VAR *v; + if (shell_variables == 0) + create_variable_tables (); + v = find_variable (name); if (v == 0) v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0); @@ -1773,11 +1775,7 @@ make_new_variable (name, table) /* Make sure we have a shell_variables hash table to add to. */ if (shell_variables == 0) - { - shell_variables = global_variables = new_var_context ((char *)NULL, 0); - shell_variables->scope = 0; - shell_variables->table = hash_create (0); - } + create_variable_tables (); elt = hash_insert (savestring (name), table, HASH_NOSRCH); elt->data = (PTR_T)entry; @@ -1945,11 +1943,7 @@ bind_variable (name, value, flags) VAR_CONTEXT *vc; if (shell_variables == 0) - { - shell_variables = global_variables = new_var_context ((char *)NULL, 0); - shell_variables->scope = 0; - shell_variables->table = hash_create (0); - } + create_variable_tables (); /* If we have a temporary environment, look there first for the variable, and, if found, modify the value there before modifying it in the @@ -2029,16 +2023,11 @@ bind_int_variable (lhs, rhs) char *lhs, *rhs; { register SHELL_VAR *v; - char *t; int isint, isarr; isint = isarr = 0; #if defined (ARRAY_VARS) -# if 0 - if (t = xstrchr (lhs, '[')) /*]*/ -# else if (valid_array_reference (lhs)) -# endif { isarr = 1; v = array_variable_part (lhs, (char **)0, (int *)0); @@ -2987,7 +2976,10 @@ void dispose_used_env_vars () { if (temporary_env) - dispose_temporary_env (propagate_temp_var); + { + dispose_temporary_env (propagate_temp_var); + maybe_make_export_env (); + } } /* Take all of the shell variables in the temporary environment HASH_TABLE @@ -4014,19 +4006,19 @@ sv_histsize (name) { if (legal_number (temp, &num)) { + hmax = num; if (name[4] == 'S') { - hmax = num; stifle_history (hmax); - num = where_history (); - if (history_lines_this_session > num) - history_lines_this_session = num; + hmax = where_history (); + if (history_lines_this_session > hmax) + history_lines_this_session = hmax; } else { - history_truncate_file (get_string_value ("HISTFILE"), (int)num); - if (num <= history_lines_in_file) - history_lines_in_file = num; + history_truncate_file (get_string_value ("HISTFILE"), hmax); + if (hmax <= history_lines_in_file) + history_lines_in_file = hmax; } } } diff --git a/variables.h b/variables.h index eec26c31..00e6ca27 100644 --- a/variables.h +++ b/variables.h @@ -330,7 +330,6 @@ extern int get_random_number __P((void)); extern void sv_ifs __P((char *)); extern void sv_path __P((char *)); extern void sv_mail __P((char *)); -extern void sv_comp_wordbreaks __P((char *)); extern void sv_globignore __P((char *)); extern void sv_ignoreeof __P((char *)); extern void sv_strict_posix __P((char *)); @@ -1,5 +1,5 @@ -/* A Bison parser, made from /usr/src/local/chet/src/bash/src/parse.y +/* A Bison parser, made from /Users/chet/src/bash/src/parse.y by GNU Bison version 1.28 */ #define YYBISON 1 /* Identify Bison output. */ @@ -45,7 +45,7 @@ #define GREATER_BAR 295 #define yacc_EOF 296 -#line 21 "/usr/src/local/chet/src/bash/src/parse.y" +#line 21 "/Users/chet/src/bash/src/parse.y" #include "config.h" @@ -146,7 +146,6 @@ extern int current_command_number; extern int sourcelevel; extern int posixly_correct; extern int last_command_exit_value; -extern int interrupt_immediately; extern char *shell_name, *current_host_name; extern char *dist_version; extern int patch_level; @@ -234,10 +233,6 @@ static void reset_readline_prompt __P((void)); #endif static void print_prompt __P((void)); -#if defined (HISTORY) -char *history_delimiting_chars __P((void)); -#endif - #if defined (HANDLE_MULTIBYTE) static void set_line_mbstate __P((void)); static char *shell_input_line_property = NULL; @@ -324,7 +319,7 @@ static WORD_DESC *word_desc_to_read; static REDIRECTEE redir; -#line 300 "/usr/src/local/chet/src/bash/src/parse.y" +#line 295 "/Users/chet/src/bash/src/parse.y" typedef union { WORD_DESC *word; /* the word that we read. */ int number; /* the number that we read. */ @@ -466,20 +461,20 @@ static const short yyrhs[] = { 85, #if YYDEBUG != 0 static const short yyrline[] = { 0, - 351, 360, 367, 382, 392, 394, 398, 403, 408, 413, - 418, 423, 428, 434, 440, 445, 450, 455, 460, 465, - 470, 475, 480, 485, 490, 497, 504, 509, 514, 519, - 524, 529, 534, 539, 544, 551, 553, 555, 559, 563, - 574, 576, 580, 582, 584, 600, 604, 606, 608, 610, - 612, 614, 616, 618, 620, 622, 624, 628, 633, 638, - 643, 648, 653, 658, 663, 670, 675, 680, 685, 692, - 697, 702, 707, 712, 717, 724, 729, 734, 741, 744, - 747, 752, 754, 785, 792, 794, 796, 801, 805, 809, - 813, 815, 817, 821, 822, 826, 828, 830, 832, 836, - 837, 841, 843, 852, 860, 861, 867, 868, 875, 879, - 881, 883, 890, 892, 894, 898, 899, 902, 904, 906, - 910, 911, 920, 926, 935, 943, 945, 947, 954, 957, - 961, 963, 969, 975, 981, 987, 1007, 1010, 1014, 1016 + 346, 355, 362, 377, 387, 389, 393, 398, 403, 408, + 413, 418, 423, 429, 435, 440, 445, 450, 455, 460, + 465, 470, 475, 480, 485, 492, 499, 504, 509, 514, + 519, 524, 529, 534, 539, 546, 548, 550, 554, 558, + 569, 571, 575, 577, 579, 595, 599, 601, 603, 605, + 607, 609, 611, 613, 615, 617, 619, 623, 628, 633, + 638, 643, 648, 653, 658, 665, 670, 675, 680, 687, + 692, 697, 702, 707, 712, 719, 724, 729, 736, 739, + 742, 747, 749, 780, 787, 789, 791, 796, 800, 804, + 808, 810, 812, 816, 817, 821, 823, 825, 827, 831, + 832, 836, 838, 847, 855, 856, 862, 863, 870, 874, + 876, 878, 885, 887, 889, 893, 894, 897, 899, 901, + 905, 906, 915, 921, 930, 938, 940, 942, 949, 952, + 956, 958, 964, 970, 976, 982, 1002, 1005, 1009, 1011 }; #endif @@ -1293,7 +1288,7 @@ yyreduce: switch (yyn) { case 1: -#line 352 "/usr/src/local/chet/src/bash/src/parse.y" +#line 347 "/Users/chet/src/bash/src/parse.y" { /* Case of regular command. Discard the error safety net,and return the command just parsed. */ @@ -1304,7 +1299,7 @@ case 1: ; break;} case 2: -#line 361 "/usr/src/local/chet/src/bash/src/parse.y" +#line 356 "/Users/chet/src/bash/src/parse.y" { /* Case of regular command, but not a very interesting one. Return a NULL command. */ @@ -1313,7 +1308,7 @@ case 2: ; break;} case 3: -#line 368 "/usr/src/local/chet/src/bash/src/parse.y" +#line 363 "/Users/chet/src/bash/src/parse.y" { /* Error during parsing. Return NULL command. */ global_command = (COMMAND *)NULL; @@ -1330,7 +1325,7 @@ case 3: ; break;} case 4: -#line 383 "/usr/src/local/chet/src/bash/src/parse.y" +#line 378 "/Users/chet/src/bash/src/parse.y" { /* Case of EOF seen by itself. Do ignoreeof or not. */ @@ -1340,57 +1335,57 @@ case 4: ; break;} case 5: -#line 393 "/usr/src/local/chet/src/bash/src/parse.y" +#line 388 "/Users/chet/src/bash/src/parse.y" { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); ; break;} case 6: -#line 395 "/usr/src/local/chet/src/bash/src/parse.y" +#line 390 "/Users/chet/src/bash/src/parse.y" { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-1].word_list); ; break;} case 7: -#line 399 "/usr/src/local/chet/src/bash/src/parse.y" +#line 394 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_direction, redir); ; break;} case 8: -#line 404 "/usr/src/local/chet/src/bash/src/parse.y" +#line 399 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_direction, redir); ; break;} case 9: -#line 409 "/usr/src/local/chet/src/bash/src/parse.y" +#line 404 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_direction, redir); ; break;} case 10: -#line 414 "/usr/src/local/chet/src/bash/src/parse.y" +#line 409 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_direction, redir); ; break;} case 11: -#line 419 "/usr/src/local/chet/src/bash/src/parse.y" +#line 414 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_appending_to, redir); ; break;} case 12: -#line 424 "/usr/src/local/chet/src/bash/src/parse.y" +#line 419 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_appending_to, redir); ; break;} case 13: -#line 429 "/usr/src/local/chet/src/bash/src/parse.y" +#line 424 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_until, redir); @@ -1398,7 +1393,7 @@ case 13: ; break;} case 14: -#line 435 "/usr/src/local/chet/src/bash/src/parse.y" +#line 430 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_until, redir); @@ -1406,77 +1401,77 @@ case 14: ; break;} case 15: -#line 441 "/usr/src/local/chet/src/bash/src/parse.y" +#line 436 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_reading_string, redir); ; break;} case 16: -#line 446 "/usr/src/local/chet/src/bash/src/parse.y" +#line 441 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_reading_string, redir); ; break;} case 17: -#line 451 "/usr/src/local/chet/src/bash/src/parse.y" +#line 446 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (0, r_duplicating_input, redir); ; break;} case 18: -#line 456 "/usr/src/local/chet/src/bash/src/parse.y" +#line 451 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input, redir); ; break;} case 19: -#line 461 "/usr/src/local/chet/src/bash/src/parse.y" +#line 456 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (1, r_duplicating_output, redir); ; break;} case 20: -#line 466 "/usr/src/local/chet/src/bash/src/parse.y" +#line 461 "/Users/chet/src/bash/src/parse.y" { redir.dest = yyvsp[0].number; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output, redir); ; break;} case 21: -#line 471 "/usr/src/local/chet/src/bash/src/parse.y" +#line 466 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_duplicating_input_word, redir); ; break;} case 22: -#line 476 "/usr/src/local/chet/src/bash/src/parse.y" +#line 471 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_input_word, redir); ; break;} case 23: -#line 481 "/usr/src/local/chet/src/bash/src/parse.y" +#line 476 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_duplicating_output_word, redir); ; break;} case 24: -#line 486 "/usr/src/local/chet/src/bash/src/parse.y" +#line 481 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_duplicating_output_word, redir); ; break;} case 25: -#line 491 "/usr/src/local/chet/src/bash/src/parse.y" +#line 486 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection @@ -1485,7 +1480,7 @@ case 25: ; break;} case 26: -#line 498 "/usr/src/local/chet/src/bash/src/parse.y" +#line 493 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection @@ -1494,88 +1489,88 @@ case 26: ; break;} case 27: -#line 505 "/usr/src/local/chet/src/bash/src/parse.y" +#line 500 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (1, r_close_this, redir); ; break;} case 28: -#line 510 "/usr/src/local/chet/src/bash/src/parse.y" +#line 505 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ; break;} case 29: -#line 515 "/usr/src/local/chet/src/bash/src/parse.y" +#line 510 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (0, r_close_this, redir); ; break;} case 30: -#line 520 "/usr/src/local/chet/src/bash/src/parse.y" +#line 515 "/Users/chet/src/bash/src/parse.y" { redir.dest = 0; yyval.redirect = make_redirection (yyvsp[-2].number, r_close_this, redir); ; break;} case 31: -#line 525 "/usr/src/local/chet/src/bash/src/parse.y" +#line 520 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_err_and_out, redir); ; break;} case 32: -#line 530 "/usr/src/local/chet/src/bash/src/parse.y" +#line 525 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_input_output, redir); ; break;} case 33: -#line 535 "/usr/src/local/chet/src/bash/src/parse.y" +#line 530 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (0, r_input_output, redir); ; break;} case 34: -#line 540 "/usr/src/local/chet/src/bash/src/parse.y" +#line 535 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (1, r_output_force, redir); ; break;} case 35: -#line 545 "/usr/src/local/chet/src/bash/src/parse.y" +#line 540 "/Users/chet/src/bash/src/parse.y" { redir.filename = yyvsp[0].word; yyval.redirect = make_redirection (yyvsp[-2].number, r_output_force, redir); ; break;} case 36: -#line 552 "/usr/src/local/chet/src/bash/src/parse.y" +#line 547 "/Users/chet/src/bash/src/parse.y" { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; ; break;} case 37: -#line 554 "/usr/src/local/chet/src/bash/src/parse.y" +#line 549 "/Users/chet/src/bash/src/parse.y" { yyval.element.word = yyvsp[0].word; yyval.element.redirect = 0; ; break;} case 38: -#line 556 "/usr/src/local/chet/src/bash/src/parse.y" +#line 551 "/Users/chet/src/bash/src/parse.y" { yyval.element.redirect = yyvsp[0].redirect; yyval.element.word = 0; ; break;} case 39: -#line 560 "/usr/src/local/chet/src/bash/src/parse.y" +#line 555 "/Users/chet/src/bash/src/parse.y" { yyval.redirect = yyvsp[0].redirect; ; break;} case 40: -#line 564 "/usr/src/local/chet/src/bash/src/parse.y" +#line 559 "/Users/chet/src/bash/src/parse.y" { register REDIRECT *t; @@ -1586,23 +1581,23 @@ case 40: ; break;} case 41: -#line 575 "/usr/src/local/chet/src/bash/src/parse.y" +#line 570 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_simple_command (yyvsp[0].element, (COMMAND *)NULL); ; break;} case 42: -#line 577 "/usr/src/local/chet/src/bash/src/parse.y" +#line 572 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_simple_command (yyvsp[0].element, yyvsp[-1].command); ; break;} case 43: -#line 581 "/usr/src/local/chet/src/bash/src/parse.y" +#line 576 "/Users/chet/src/bash/src/parse.y" { yyval.command = clean_simple_command (yyvsp[0].command); ; break;} case 44: -#line 583 "/usr/src/local/chet/src/bash/src/parse.y" +#line 578 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 45: -#line 585 "/usr/src/local/chet/src/bash/src/parse.y" +#line 580 "/Users/chet/src/bash/src/parse.y" { COMMAND *tc; @@ -1620,218 +1615,218 @@ case 45: ; break;} case 46: -#line 601 "/usr/src/local/chet/src/bash/src/parse.y" +#line 596 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 47: -#line 605 "/usr/src/local/chet/src/bash/src/parse.y" +#line 600 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 48: -#line 607 "/usr/src/local/chet/src/bash/src/parse.y" +#line 602 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 49: -#line 609 "/usr/src/local/chet/src/bash/src/parse.y" +#line 604 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_while_command (yyvsp[-3].command, yyvsp[-1].command); ; break;} case 50: -#line 611 "/usr/src/local/chet/src/bash/src/parse.y" +#line 606 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_until_command (yyvsp[-3].command, yyvsp[-1].command); ; break;} case 51: -#line 613 "/usr/src/local/chet/src/bash/src/parse.y" +#line 608 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 52: -#line 615 "/usr/src/local/chet/src/bash/src/parse.y" +#line 610 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 53: -#line 617 "/usr/src/local/chet/src/bash/src/parse.y" +#line 612 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 54: -#line 619 "/usr/src/local/chet/src/bash/src/parse.y" +#line 614 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 55: -#line 621 "/usr/src/local/chet/src/bash/src/parse.y" +#line 616 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 56: -#line 623 "/usr/src/local/chet/src/bash/src/parse.y" +#line 618 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 57: -#line 625 "/usr/src/local/chet/src/bash/src/parse.y" +#line 620 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 58: -#line 629 "/usr/src/local/chet/src/bash/src/parse.y" +#line 624 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 59: -#line 634 "/usr/src/local/chet/src/bash/src/parse.y" +#line 629 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 60: -#line 639 "/usr/src/local/chet/src/bash/src/parse.y" +#line 634 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 61: -#line 644 "/usr/src/local/chet/src/bash/src/parse.y" +#line 639 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 62: -#line 649 "/usr/src/local/chet/src/bash/src/parse.y" +#line 644 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 63: -#line 654 "/usr/src/local/chet/src/bash/src/parse.y" +#line 649 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 64: -#line 659 "/usr/src/local/chet/src/bash/src/parse.y" +#line 654 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 65: -#line 664 "/usr/src/local/chet/src/bash/src/parse.y" +#line 659 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_for_command (yyvsp[-7].word, (WORD_LIST *)NULL, yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 66: -#line 671 "/usr/src/local/chet/src/bash/src/parse.y" +#line 666 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); if (word_top > 0) word_top--; ; break;} case 67: -#line 676 "/usr/src/local/chet/src/bash/src/parse.y" +#line 671 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_arith_for_command (yyvsp[-5].word_list, yyvsp[-1].command, arith_for_lineno); if (word_top > 0) word_top--; ; break;} case 68: -#line 681 "/usr/src/local/chet/src/bash/src/parse.y" +#line 676 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); if (word_top > 0) word_top--; ; break;} case 69: -#line 686 "/usr/src/local/chet/src/bash/src/parse.y" +#line 681 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_arith_for_command (yyvsp[-3].word_list, yyvsp[-1].command, arith_for_lineno); if (word_top > 0) word_top--; ; break;} case 70: -#line 693 "/usr/src/local/chet/src/bash/src/parse.y" +#line 688 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 71: -#line 698 "/usr/src/local/chet/src/bash/src/parse.y" +#line 693 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-4].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 72: -#line 703 "/usr/src/local/chet/src/bash/src/parse.y" +#line 698 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 73: -#line 708 "/usr/src/local/chet/src/bash/src/parse.y" +#line 703 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-5].word, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 74: -#line 713 "/usr/src/local/chet/src/bash/src/parse.y" +#line 708 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 75: -#line 718 "/usr/src/local/chet/src/bash/src/parse.y" +#line 713 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_select_command (yyvsp[-8].word, REVERSE_LIST (yyvsp[-5].word_list, WORD_LIST *), yyvsp[-1].command, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 76: -#line 725 "/usr/src/local/chet/src/bash/src/parse.y" +#line 720 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_case_command (yyvsp[-4].word, (PATTERN_LIST *)NULL, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 77: -#line 730 "/usr/src/local/chet/src/bash/src/parse.y" +#line 725 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_case_command (yyvsp[-5].word, yyvsp[-2].pattern, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 78: -#line 735 "/usr/src/local/chet/src/bash/src/parse.y" +#line 730 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_case_command (yyvsp[-4].word, yyvsp[-1].pattern, word_lineno[word_top]); if (word_top > 0) word_top--; ; break;} case 79: -#line 742 "/usr/src/local/chet/src/bash/src/parse.y" +#line 737 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); ; break;} case 80: -#line 745 "/usr/src/local/chet/src/bash/src/parse.y" +#line 740 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_function_def (yyvsp[-4].word, yyvsp[0].command, function_dstart, function_bstart); ; break;} case 81: -#line 748 "/usr/src/local/chet/src/bash/src/parse.y" +#line 743 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_function_def (yyvsp[-2].word, yyvsp[0].command, function_dstart, function_bstart); ; break;} case 82: -#line 753 "/usr/src/local/chet/src/bash/src/parse.y" +#line 748 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 83: -#line 755 "/usr/src/local/chet/src/bash/src/parse.y" +#line 750 "/Users/chet/src/bash/src/parse.y" { COMMAND *tc; @@ -1862,82 +1857,82 @@ case 83: ; break;} case 84: -#line 786 "/usr/src/local/chet/src/bash/src/parse.y" +#line 781 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_subshell_command (yyvsp[-1].command); yyval.command->flags |= CMD_WANT_SUBSHELL; ; break;} case 85: -#line 793 "/usr/src/local/chet/src/bash/src/parse.y" +#line 788 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, (COMMAND *)NULL); ; break;} case 86: -#line 795 "/usr/src/local/chet/src/bash/src/parse.y" +#line 790 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-5].command, yyvsp[-3].command, yyvsp[-1].command); ; break;} case 87: -#line 797 "/usr/src/local/chet/src/bash/src/parse.y" +#line 792 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[-1].command); ; break;} case 88: -#line 802 "/usr/src/local/chet/src/bash/src/parse.y" +#line 797 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_group_command (yyvsp[-1].command); ; break;} case 89: -#line 806 "/usr/src/local/chet/src/bash/src/parse.y" +#line 801 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_arith_command (yyvsp[0].word_list); ; break;} case 90: -#line 810 "/usr/src/local/chet/src/bash/src/parse.y" +#line 805 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[-1].command; ; break;} case 91: -#line 814 "/usr/src/local/chet/src/bash/src/parse.y" +#line 809 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-2].command, yyvsp[0].command, (COMMAND *)NULL); ; break;} case 92: -#line 816 "/usr/src/local/chet/src/bash/src/parse.y" +#line 811 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-4].command, yyvsp[-2].command, yyvsp[0].command); ; break;} case 93: -#line 818 "/usr/src/local/chet/src/bash/src/parse.y" +#line 813 "/Users/chet/src/bash/src/parse.y" { yyval.command = make_if_command (yyvsp[-3].command, yyvsp[-1].command, yyvsp[0].command); ; break;} case 95: -#line 823 "/usr/src/local/chet/src/bash/src/parse.y" +#line 818 "/Users/chet/src/bash/src/parse.y" { yyvsp[0].pattern->next = yyvsp[-1].pattern; yyval.pattern = yyvsp[0].pattern; ; break;} case 96: -#line 827 "/usr/src/local/chet/src/bash/src/parse.y" +#line 822 "/Users/chet/src/bash/src/parse.y" { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); ; break;} case 97: -#line 829 "/usr/src/local/chet/src/bash/src/parse.y" +#line 824 "/Users/chet/src/bash/src/parse.y" { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); ; break;} case 98: -#line 831 "/usr/src/local/chet/src/bash/src/parse.y" +#line 826 "/Users/chet/src/bash/src/parse.y" { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, yyvsp[0].command); ; break;} case 99: -#line 833 "/usr/src/local/chet/src/bash/src/parse.y" +#line 828 "/Users/chet/src/bash/src/parse.y" { yyval.pattern = make_pattern_list (yyvsp[-2].word_list, (COMMAND *)NULL); ; break;} case 101: -#line 838 "/usr/src/local/chet/src/bash/src/parse.y" +#line 833 "/Users/chet/src/bash/src/parse.y" { yyvsp[-1].pattern->next = yyvsp[-2].pattern; yyval.pattern = yyvsp[-1].pattern; ; break;} case 102: -#line 842 "/usr/src/local/chet/src/bash/src/parse.y" +#line 837 "/Users/chet/src/bash/src/parse.y" { yyval.word_list = make_word_list (yyvsp[0].word, (WORD_LIST *)NULL); ; break;} case 103: -#line 844 "/usr/src/local/chet/src/bash/src/parse.y" +#line 839 "/Users/chet/src/bash/src/parse.y" { yyval.word_list = make_word_list (yyvsp[0].word, yyvsp[-2].word_list); ; break;} case 104: -#line 853 "/usr/src/local/chet/src/bash/src/parse.y" +#line 848 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) @@ -1945,13 +1940,13 @@ case 104: ; break;} case 106: -#line 862 "/usr/src/local/chet/src/bash/src/parse.y" +#line 857 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 108: -#line 869 "/usr/src/local/chet/src/bash/src/parse.y" +#line 864 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) yyval.command = connect_async_list (yyvsp[-2].command, (COMMAND *)NULL, '&'); @@ -1960,15 +1955,15 @@ case 108: ; break;} case 110: -#line 880 "/usr/src/local/chet/src/bash/src/parse.y" +#line 875 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); ; break;} case 111: -#line 882 "/usr/src/local/chet/src/bash/src/parse.y" +#line 877 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); ; break;} case 112: -#line 884 "/usr/src/local/chet/src/bash/src/parse.y" +#line 879 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-3].command->type == cm_connection) yyval.command = connect_async_list (yyvsp[-3].command, yyvsp[0].command, '&'); @@ -1977,31 +1972,31 @@ case 112: ; break;} case 113: -#line 891 "/usr/src/local/chet/src/bash/src/parse.y" +#line 886 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); ; break;} case 114: -#line 893 "/usr/src/local/chet/src/bash/src/parse.y" +#line 888 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, ';'); ; break;} case 115: -#line 895 "/usr/src/local/chet/src/bash/src/parse.y" +#line 890 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 118: -#line 903 "/usr/src/local/chet/src/bash/src/parse.y" +#line 898 "/Users/chet/src/bash/src/parse.y" { yyval.number = '\n'; ; break;} case 119: -#line 905 "/usr/src/local/chet/src/bash/src/parse.y" +#line 900 "/Users/chet/src/bash/src/parse.y" { yyval.number = ';'; ; break;} case 120: -#line 907 "/usr/src/local/chet/src/bash/src/parse.y" +#line 902 "/Users/chet/src/bash/src/parse.y" { yyval.number = yacc_EOF; ; break;} case 123: -#line 921 "/usr/src/local/chet/src/bash/src/parse.y" +#line 916 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; if (need_here_doc) @@ -2009,7 +2004,7 @@ case 123: ; break;} case 124: -#line 927 "/usr/src/local/chet/src/bash/src/parse.y" +#line 922 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-1].command->type == cm_connection) yyval.command = connect_async_list (yyvsp[-1].command, (COMMAND *)NULL, '&'); @@ -2020,7 +2015,7 @@ case 124: ; break;} case 125: -#line 936 "/usr/src/local/chet/src/bash/src/parse.y" +#line 931 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[-1].command; if (need_here_doc) @@ -2028,15 +2023,15 @@ case 125: ; break;} case 126: -#line 944 "/usr/src/local/chet/src/bash/src/parse.y" +#line 939 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, AND_AND); ; break;} case 127: -#line 946 "/usr/src/local/chet/src/bash/src/parse.y" +#line 941 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, OR_OR); ; break;} case 128: -#line 948 "/usr/src/local/chet/src/bash/src/parse.y" +#line 943 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[-2].command->type == cm_connection) yyval.command = connect_async_list (yyvsp[-2].command, yyvsp[0].command, '&'); @@ -2045,19 +2040,19 @@ case 128: ; break;} case 129: -#line 955 "/usr/src/local/chet/src/bash/src/parse.y" +#line 950 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-2].command, yyvsp[0].command, ';'); ; break;} case 130: -#line 958 "/usr/src/local/chet/src/bash/src/parse.y" +#line 953 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 131: -#line 962 "/usr/src/local/chet/src/bash/src/parse.y" +#line 957 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 132: -#line 964 "/usr/src/local/chet/src/bash/src/parse.y" +#line 959 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[0].command) yyvsp[0].command->flags |= CMD_INVERT_RETURN; @@ -2065,7 +2060,7 @@ case 132: ; break;} case 133: -#line 970 "/usr/src/local/chet/src/bash/src/parse.y" +#line 965 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[0].command) yyvsp[0].command->flags |= yyvsp[-1].number; @@ -2073,7 +2068,7 @@ case 133: ; break;} case 134: -#line 976 "/usr/src/local/chet/src/bash/src/parse.y" +#line 971 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[0].command) yyvsp[0].command->flags |= yyvsp[-2].number|CMD_INVERT_RETURN; @@ -2081,7 +2076,7 @@ case 134: ; break;} case 135: -#line 982 "/usr/src/local/chet/src/bash/src/parse.y" +#line 977 "/Users/chet/src/bash/src/parse.y" { if (yyvsp[0].command) yyvsp[0].command->flags |= yyvsp[-1].number|CMD_INVERT_RETURN; @@ -2089,7 +2084,7 @@ case 135: ; break;} case 136: -#line 988 "/usr/src/local/chet/src/bash/src/parse.y" +#line 983 "/Users/chet/src/bash/src/parse.y" { ELEMENT x; @@ -2108,19 +2103,19 @@ case 136: ; break;} case 137: -#line 1009 "/usr/src/local/chet/src/bash/src/parse.y" +#line 1004 "/Users/chet/src/bash/src/parse.y" { yyval.command = command_connect (yyvsp[-3].command, yyvsp[0].command, '|'); ; break;} case 138: -#line 1011 "/usr/src/local/chet/src/bash/src/parse.y" +#line 1006 "/Users/chet/src/bash/src/parse.y" { yyval.command = yyvsp[0].command; ; break;} case 139: -#line 1015 "/usr/src/local/chet/src/bash/src/parse.y" +#line 1010 "/Users/chet/src/bash/src/parse.y" { yyval.number = CMD_TIME_PIPELINE; ; break;} case 140: -#line 1017 "/usr/src/local/chet/src/bash/src/parse.y" +#line 1012 "/Users/chet/src/bash/src/parse.y" { yyval.number = CMD_TIME_PIPELINE|CMD_TIME_POSIX; ; break;} } @@ -2345,7 +2340,7 @@ yyerrhandle: } return 1; } -#line 1019 "/usr/src/local/chet/src/bash/src/parse.y" +#line 1014 "/Users/chet/src/bash/src/parse.y" /* Possible states for the parser that require it to do special things. */ @@ -2542,10 +2537,12 @@ yy_readline_get () old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler); interrupt_immediately++; } + terminate_immediately = 1; current_readline_line = readline (current_readline_prompt ? current_readline_prompt : ""); + terminate_immediately = 0; if (signal_is_ignored (SIGINT) == 0 && old_sigint) { interrupt_immediately--; @@ -2677,10 +2674,16 @@ yy_stream_get () if (bash_input.location.file) { if (interactive) - interrupt_immediately++; + { + interrupt_immediately++; + terminate_immediately++; + } result = getc_with_restart (bash_input.location.file); if (interactive) - interrupt_immediately--; + { + interrupt_immediately--; + terminate_immediately--; + } } return (result); } @@ -3199,7 +3202,6 @@ shell_getc (remove_quoted_newline) register int i; int c; unsigned char uc; - static int mustpop = 0; QUIT; @@ -3472,8 +3474,8 @@ discard_until (character) } void -execute_prompt_command (command) - char *command; +execute_variable_command (command, vname) + char *command, *vname; { char *last_lastarg; sh_parser_state_t ps; @@ -3483,7 +3485,7 @@ execute_prompt_command (command) if (last_lastarg) last_lastarg = savestring (last_lastarg); - parse_and_execute (savestring (command), "PROMPT_COMMAND", SEVAL_NONINT|SEVAL_NOHIST); + parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST); restore_parser_state (&ps); bind_variable ("_", last_lastarg, 0); @@ -3886,7 +3888,7 @@ read_token (command) #endif /* ALIAS */ /* Read a single word from input. Start by skipping blanks. */ - while ((character = shell_getc (1)) != EOF && whitespace (character)) + while ((character = shell_getc (1)) != EOF && shellblank (character)) ; if (character == EOF) @@ -4046,6 +4048,7 @@ read_token (command) #define P_ALLOWESC 0x02 #define P_DQUOTE 0x04 #define P_COMMAND 0x08 /* parsing a command, so look for comments */ +#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */ static char matched_pair_error; static char * @@ -4055,12 +4058,13 @@ parse_matched_pair (qc, open, close, lenp, flags) int *lenp, flags; { int count, ch, was_dollar, in_comment, check_comment; - int pass_next_character, nestlen, ttranslen, start_lineno; + int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno; char *ret, *nestret, *ttrans; int retind, retsize, rflags; +/* itrace("parse_matched_pair: open = %c close = %c", open, close); */ count = 1; - pass_next_character = was_dollar = in_comment = 0; + pass_next_character = backq_backslash = was_dollar = in_comment = 0; check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; /* RFLAGS is the set of flags we want to pass to recursive calls. */ @@ -4072,11 +4076,8 @@ parse_matched_pair (qc, open, close, lenp, flags) start_lineno = line_number; while (count) { -#if 0 - ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0); -#else - ch = shell_getc (qc != '\'' && pass_next_character == 0); -#endif + ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0); + if (ch == EOF) { free (ret); @@ -4100,10 +4101,19 @@ parse_matched_pair (qc, open, close, lenp, flags) continue; } - /* Not exactly right yet */ - else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1]))) + /* Not exactly right yet, should handle shell metacharacters, too. If + any changes are made to this test, make analogous changes to subst.c: + extract_delimited_string(). */ + else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1]))) in_comment = 1; + /* last char was backslash inside backquoted command substitution */ + if (backq_backslash) + { + backq_backslash = 0; + /* Placeholder for adding special characters */ + } + if (pass_next_character) /* last char was backslash */ { pass_next_character = 0; @@ -4128,11 +4138,9 @@ parse_matched_pair (qc, open, close, lenp, flags) } else if MBTEST(ch == close) /* ending delimiter */ count--; -#if 1 /* handle nested ${...} specially. */ else if MBTEST(open != close && was_dollar && open == '{' && ch == open) /* } */ count++; -#endif else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */ count++; @@ -4144,6 +4152,10 @@ parse_matched_pair (qc, open, close, lenp, flags) { if MBTEST((flags & P_ALLOWESC) && ch == '\\') pass_next_character++; +#if 0 + else if MBTEST((flags & P_BACKQUOTE) && ch == '\\') + backq_backslash++; +#endif continue; } @@ -4226,18 +4238,24 @@ add_nestret: } FREE (nestret); } +#if 0 else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0) { - nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags); + /* Add P_BACKQUOTE so backslash quotes the next character and + shell_getc does the right thing with \<newline>. We do this for + a measure of backwards compatibility -- it's not strictly the + right POSIX thing. */ + nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE); goto add_nestret; } - else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ +#endif + else if MBTEST(open != '`' && was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */ /* check for $(), $[], or ${} inside quoted string. */ { if (open == ch) /* undo previous increment */ count--; if (ch == '(') /* ) */ - nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags); + nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE); else if (ch == '{') /* } */ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags); else if (ch == '[') /* ] */ @@ -4263,8 +4281,8 @@ static int parse_dparen (c) int c; { - int cmdtyp, len, sline; - char *wval, *wv2; + int cmdtyp, sline; + char *wval; WORD_DESC *wd; #if defined (ARITH_FOR_COMMAND) @@ -4276,7 +4294,6 @@ parse_dparen (c) { wd = alloc_word_desc (); wd->word = wval; - wd = make_word (wval); yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL); return (ARITH_FOR_EXPRS); } @@ -4826,7 +4843,7 @@ read_token_word (character) } else { - /* Try to locale)-expand the converted string. */ + /* Try to locale-expand the converted string. */ ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen); free (ttok); @@ -4908,7 +4925,7 @@ read_token_word (character) FREE (ttok); all_digit_token = 0; compound_assignment = 1; -#if 0 +#if 1 goto next_character; #else goto got_token; /* ksh93 seems to do this */ @@ -5006,8 +5023,8 @@ got_token: if (dollar_present) the_word->flags |= W_HASDOLLAR; if (quoted) - the_word->flags |= W_QUOTED; - if (compound_assignment) + the_word->flags |= W_QUOTED; /*(*/ + if (compound_assignment && token[token_index-1] == ')') the_word->flags |= W_COMPASSIGN; /* A word is an assignment if it appears at the beginning of a simple command, or after another assignment word. This is @@ -5025,7 +5042,9 @@ got_token: struct builtin *b; b = builtin_address_internal (token, 0); if (b && (b->flags & ASSIGNMENT_BUILTIN)) - parser_state |= PST_ASSIGNOK; + parser_state |= PST_ASSIGNOK; + else if (STREQ (token, "eval") || STREQ (token, "let")) + parser_state |= PST_ASSIGNOK; } yylval.word = the_word; @@ -5304,7 +5323,7 @@ decode_prompt_string (string) int last_exit_value; #if defined (PROMPT_STRING_DECODE) int result_size, result_index; - int c, n; + int c, n, i; char *temp, octal_string[4]; struct tm *tm; time_t the_time; @@ -5466,7 +5485,7 @@ decode_prompt_string (string) case 'W': { /* Use the value of PWD because it is much more efficient. */ - char t_string[PATH_MAX], *t; + char t_string[PATH_MAX]; int tlen; temp = get_string_value ("PWD"); @@ -5576,9 +5595,12 @@ decode_prompt_string (string) break; } temp = (char *)xmalloc (3); - temp[0] = '\001'; - temp[1] = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; - temp[2] = '\0'; + n = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE; + i = 0; + if (n == CTLESC || n == CTLNUL) + temp[i++] = CTLESC; + temp[i++] = n; + temp[i] = '\0'; goto add_string; #endif /* READLINE */ @@ -5674,15 +5696,15 @@ yyerror (msg) } static char * -error_token_from_token (token) - int token; +error_token_from_token (tok) + int tok; { char *t; - if (t = find_token_in_alist (token, word_token_alist, 0)) + if (t = find_token_in_alist (tok, word_token_alist, 0)) return t; - if (t = find_token_in_alist (token, other_token_alist, 0)) + if (t = find_token_in_alist (tok, other_token_alist, 0)) return t; t = (char *)NULL; @@ -6016,18 +6038,21 @@ parse_compound_assignment (retlenp) int *retlenp; { WORD_LIST *wl, *rl; - int tok, orig_line_number, orig_token_size; + int tok, orig_line_number, orig_token_size, orig_last_token, assignok; char *saved_token, *ret; saved_token = token; orig_token_size = token_buffer_size; orig_line_number = line_number; + orig_last_token = last_read_token; last_read_token = WORD; /* WORD to allow reserved words here */ token = (char *)NULL; token_buffer_size = 0; + assignok = parser_state&PST_ASSIGNOK; /* XXX */ + wl = (WORD_LIST *)NULL; /* ( */ parser_state |= PST_COMPASSIGN; @@ -6070,7 +6095,8 @@ parse_compound_assignment (retlenp) jump_to_top_level (DISCARD); } - last_read_token = WORD; + last_read_token = orig_last_token; /* XXX - was WORD? */ + if (wl) { rl = REVERSE_LIST (wl, WORD_LIST *); @@ -6082,6 +6108,10 @@ parse_compound_assignment (retlenp) if (retlenp) *retlenp = (ret && *ret) ? strlen (ret) : 0; + + if (assignok) + parser_state |= PST_ASSIGNOK; + return ret; } |