git: 2c31ae65cd92 - stable/12 - Merge tcsh 6.22.03-ceccc7f

Dmitry Chagin dchagin at FreeBSD.org
Sun Mar 21 06:08:09 UTC 2021


The branch stable/12 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=2c31ae65cd9271eaf24da4fbd8f508af75e62a13

commit 2c31ae65cd9271eaf24da4fbd8f508af75e62a13
Author:     Dmitry Chagin <dchagin at FreeBSD.org>
AuthorDate: 2021-03-14 16:33:13 +0000
Commit:     Dmitry Chagin <dchagin at FreeBSD.org>
CommitDate: 2021-03-21 06:07:18 +0000

    Merge tcsh 6.22.03-ceccc7f
    
    PR:             252663
    
    (cherry picked from commit 5224c2a3bc95b431f729f3692f264395248d8acc)
---
 contrib/tcsh/FAQ            |  339 ++--
 contrib/tcsh/Fixes          |   23 +
 contrib/tcsh/Imakefile      |   14 +-
 contrib/tcsh/Makefile.ADMIN |   24 +
 contrib/tcsh/Makefile.in    |   11 +-
 contrib/tcsh/Makefile.std   |    2 +-
 contrib/tcsh/Makefile.vms   |    2 +-
 contrib/tcsh/README.md      |    9 +-
 contrib/tcsh/configure      | 3803 +++++++++++++++++++++++++------------------
 contrib/tcsh/dot.login      |   12 +
 contrib/tcsh/dot.tcshrc     |  110 ++
 contrib/tcsh/ed.chared.c    |   18 +-
 contrib/tcsh/ed.inputl.c    |    2 +-
 contrib/tcsh/ed.screen.c    |    2 +-
 contrib/tcsh/ed.xmap.c      |    2 +-
 contrib/tcsh/host.defs      |    2 +-
 contrib/tcsh/patchlevel.h   |    6 +-
 contrib/tcsh/sh.c           |   17 +-
 contrib/tcsh/sh.dir.c       |   41 +-
 contrib/tcsh/sh.dol.c       |  132 +-
 contrib/tcsh/sh.exp.c       |    2 +-
 contrib/tcsh/sh.func.c      |    5 +-
 contrib/tcsh/sh.glob.c      |   11 +-
 contrib/tcsh/sh.h           |    6 +-
 contrib/tcsh/sh.hist.c      |   10 +-
 contrib/tcsh/sh.lex.c       |   47 +-
 contrib/tcsh/sh.misc.c      |   21 +-
 contrib/tcsh/sh.set.c       |   14 +-
 contrib/tcsh/tc.alloc.c     |   10 +
 contrib/tcsh/tc.disc.c      |    4 +
 contrib/tcsh/tc.os.c        |    2 +-
 contrib/tcsh/tc.prompt.c    |    2 +-
 contrib/tcsh/tcsh.man       |   21 +-
 contrib/tcsh/tcsh.man.new   |   64 +-
 contrib/tcsh/tw.parse.c     |    4 +-
 35 files changed, 2855 insertions(+), 1939 deletions(-)

diff --git a/contrib/tcsh/FAQ b/contrib/tcsh/FAQ
index 92aadc726683..93773c52433a 100644
--- a/contrib/tcsh/FAQ
+++ b/contrib/tcsh/FAQ
@@ -1,237 +1,190 @@
+     * Home
+     * FAQ
+     * Y2K
+     __________________________________________________________________
 
-                                  [Home] FAQ
+FAQ
 
-   Home | RecentChanges | Preferences
-     _________________________________________________________________
+   For the people who do not read the manual!
 
-   This is for people who do not read the manual!
+  Why is the meta key broken in tcsh-5.20 and up?
 
-   So  far  people who don't read manuals don't read this either... I may
-   call  it README.*PLEASE* in the future, but then the same people won't
-   be able to get ftp it... :-)
-     _________________________________________________________________
-
-   1. Where can I find tcsh sources?
-
-   See http://www.tcsh.org/MostRecentRelease for download locations.
-     _________________________________________________________________
-
-   2. Why is the meta key broken in tcsh-5.20 and up?
-
-   On  some  machines  the  tty is not set up to pass 8 bit characters by
-   default.  Tcsh 5.19 used to try to determine if pass8 should be set by
+   On some machines the tty is not set up to pass 8 bit characters by
+   default. Tcsh 5.19 used to try to determine if pass8 should be set by
    looking at the terminal's meta key. Unfortunately there is no good way
-   of  determining  if  the terminal can really pass 8 characters or not.
-   Consider  if  you  are  logged in through a modem line with 7 bits and
-   parity  and  your  terminal  has  a meta key. Then tcsh 5.19 would set
+   of determining if the terminal can really pass 8 characters or not.
+   Consider if you are logged in through a modem line with 7 bits and
+   parity and your terminal has a meta key. Then tcsh 5.19 would set
    wrongly set pass8.
 
-   If  you  did like the previous behavior you can add in /etc/csh.login,
-   or in .login:
-
+   If you did like the previous behavior you can add in /etc/csh.login, or
+   in .login:
     if ( $?tcsh && $?prompt ) then
         if ( "`echotc meta`" == "yes" ) then
              stty pass8
         endif
     endif
 
-   If you don't have pass8, maybe one of these would work..
-
+   If you don't have pass8, maybe one of these would work:
     stty -parity -evenp -oddp cs8 -istrip   (rs6000)
     stty -parenb -istrip cs8
 
-   Finally,  tcsh  will  bind  all  printable meta characters to the self
-   insert  command.  If  you  don't  want  that  to  happen (i.e. use the
+   Finally, tcsh will bind all printable meta characters to the self
+   insert command. If you don't want that to happen (i.e. use the
    printable meta characters for commands) setenv NOREBIND.
-     _________________________________________________________________
 
-   3.  I  ran 'dbxtool &' and 'shelltool &' from tcsh, and they end up in
-   cbreak and no echo mode?
-
-   These  programs  are broken. Background jobs should not try to look at
-   the  tty.  What happens is that dbxtool looks in stderr to inherit the
-   tty  setups,  but  tcsh  sets up the tty in cbreak and -echo modes, so
-   that  it can do line editing. This cannot be fixed because tcsh cannot
-   give away the tty. Pick one of the following as a workaround:
+  I ran dbxtool & and shelltool & from tcsh, and they end up in cbreak and no
+  echo mode?
 
+   These programs are broken. Background jobs should not try to look at
+   the tty. What happens is that dbxtool looks in stderr to inherit the
+   tty setups, but tcsh sets up the tty in cbreak and -echo modes, so that
+   it can do line editing. This cannot be fixed because tcsh cannot give
+   away the tty. Pick one of the following as a workaround:
     dbxtool < /dev/null >& /dev/null &
     /usr/etc/setsid dbxtool &
 
-   If that does not work, for dbxtool at least you can add "sh stty sane"
-   in your .dbxinit
-     _________________________________________________________________
+   If that does not work, for dbxtool at least you can add sh stty sane in
+   your .dbxinit file.
 
-   4. I tried to compile tcsh and it cannot find <locale.h>?
+  I tried to compile tcsh and it cannot find <locale.h>?
 
-   Your  system  does  not support NLS. Undefine NLS in config_f.h and it
+   Your system does not support NLS. Undefine NLS in config_f.h and it
    should work fine.
-     _________________________________________________________________
-
-   5. Where can I get csh sources?
-
-   Csh   sources   are   now   available   with   the  4.4BSD  networking
-   distributions. You don't need csh sources to compile tcsh-6.0x.
-     _________________________________________________________________
-
-   6. I just made tcsh my login shell, and I cannot ftp any more?
-
-   Newer  versions of the ftp daemon check for the validity of the user's
-   shell  before  they  allow  logins.  The list of valid login shells is
-   either  hardcoded or it is usually in a file called /etc/shells. If it
-   is  hard-coded, then you are out of luck and your best bet is to get a
-   newer  version of ftpd. Otherwise add tcsh to the list of shells. [For
-   AIX  this  file  is called /etc/security/login.cfg.] Remember that the
-   full  path  is  required.  If  there  is  no  /etc/shells, and you are
-   creating  one,  remember to add /bin/csh, /bin/sh, and any other valid
-   shells for your system, so that other people can ftp too :-)
-     _________________________________________________________________
-
-   7.  I  am  using  SunView or OpenWindows and editing is screwed up. In
-   particular  my  arrow  keys  and backspace don't work right. What am I
-   doing wrong?
-
-   Well,  cmdtool tries to do its own command line editing and the effect
-   you  get  is  one  of  using  an  editor inside an editor. Both try to
-   interpret  the arrow key sequences and cmdtool wins since it gets them
-   first. The solutions are in my order of preference:
 
-    1. Don't use suntools
-    2. Use shelltool instead of cmdtool.
-    3. Unset edit in tcsh.
-     _________________________________________________________________
+  Where can I get csh sources?
+
+   Csh sources are now available with the 4.4BSD networking distributions.
+   You don't need csh sources to compile tcsh-6.0x.
+
+  I just made tcsh my login shell, and I cannot ftp any more?
+
+   Newer versions of the ftp daemon check for the validity of the user's
+   shell before they allow logins. The list of valid login shells is
+   either hardcoded or it is usually in a file called /etc/shells. If it
+   is hard-coded, then you are out of luck and your best bet is to get a
+   newer version of ftpd. Otherwise add tcsh to the list of shells. (For
+   AIX this file is called /etc/security/login.cfg.) Remember that the
+   full path is required. If there is no /etc/shells, and you are creating
+   one, remember to add /bin/csh, /bin/sh, and any other valid shells for
+   your system, so that other people can ftp too.
 
-   8. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, inside a
-   cmdtool,  the  short-cut  key  sequence  to  clear log (i.e. Meta-e or
-   Diamond-e) doesn't work: it just echos 'e'; or 
+  I am using SunView or OpenWindows and editing is screwed up. In particular my
+  arrow keys and backspace don't work right. What am I doing wrong?
+
+   Well, cmdtool tries to do its own command line editing and the effect
+   you get is one of using an editor inside an editor. Both try to
+   interpret the arrow key sequences and cmdtool wins since it gets them
+   first. The solutions are in my order of preference:
+     * Don't use suntools
+     * Use shelltool instead of cmdtool.
+     * Unset edit in tcsh.
+
+  On a SPARCstation running Solaris 2.x and OpenWindows 3.1, inside a cmdtool,
+  the short-cut key sequence to clear log (i.e. Meta-e or Diamond-e) doesn't
+  work: it just echos ‘e’; or
 
    Unset edit in tcsh.
-     _________________________________________________________________
 
-   9. On a SPARCstation running Solaris 2.x and OpenWindows 3.1, maketool
-   (within  SPARCworks)  doesn't work: it just does a `cd' to the working
-   directory then stops.
+  On a SPARCstation running Solaris 2.x and OpenWindows 3.1, maketool (within
+  SPARCworks) doesn't work: it just does a `cd’ to the working directory then
+  stops.
 
-   Unset  edit  in  tcsh. Using shelltool instead of cmdtool does not fix
+   Unset edit in tcsh. Using shelltool instead of cmdtool does not fix
    this.
-     _________________________________________________________________
 
-   10. I rlogin to another machine, and then no matter what I tell 'stty'
-   I cannot get it to pass 8 bit characters?
+  I rlogin to another machine, and then no matter what I tell stty I cannot get
+  it to pass 8 bit characters?
 
-   Maybe  you  need  to  use  'rlogin  -8'  to  tell rlogin to pass 8 bit
+   Maybe you need to use rlogin -8 to tell rlogin to pass 8 bit
    characters.
-     _________________________________________________________________
 
-   11. Where do I get the public domain directory library?
+  Where do I get the public domain directory library?
 
-   Anonymous ftp to prep.ai.mit.edu:/pub/gnu/dirent.tar.Z
-     _________________________________________________________________
+   Anonymous ftp to ftp://prep.ai.mit.edu/pub/gnu/dirent.tar.Z
 
-   12.  I  compiled  tcsh  using  gcc, and when I start up it says: tcsh:
-   Warning  no  access  to tty (Invalid Argument). Thus no job control in
-   this shell
+  I compiled tcsh using gcc, and when I start up it says: tcsh: Warning no
+  access to tty (Invalid Argument). Thus no job control in this shell
 
-   Your  <sys/ioctl.h>  file  is  not  ansi  compliant. You have one of 3
+   Your <sys/ioctl.h> file is not ansi compliant. You have one of 3
    choices:
+     * Run fixincludes from the gcc distribution.
+     * Add -traditional to the gcc flags.
+     * Compile with cc.
 
-    1. Run fixincludes from the gcc distribution.
-    2. Add -traditional to the gcc flags.
-    3. Compile with cc.
-     _________________________________________________________________
-
-   13.  I  compiled tcsh with the SunOS unbundled compiler and now things
-   get echo'ed twice.
+  I compiled tcsh with the SunOS unbundled compiler and now things get echoed
+  twice.
 
    It is a bug in the unbundled optimizer. Lower the optimization level.
-     _________________________________________________________________
 
-   14. How can I use the arrow keys with hpterm?
+  How can I use the arrow keys with hpterm?
 
    Hp terminals use the arrow keys internally. You can tell hpterm not to
    do that, by sending it the termcap sequence smkx. Since this has to be
-   done  all  the  time,  the  easiest thing is to put it as an alias for
+   done all the time, the easiest thing is to put it as an alias for
    precmd, or inside the prompt:
-
     if ($term == "hp") then
         set prompt="%{`echotc smkx`%}$prompt"
     endif
 
-   Note that by doing that you cannot use pgup and pgdn to scroll... Also
-   if you are using termcap, replace "smkx" with "ks"...
-     _________________________________________________________________
+   Note that by doing that you cannot use pgup and pgdn to scroll… Also if
+   you are using termcap, replace smkx with ks.
 
-   15.  On POSIX machines ^C and ^Z will do not work when tcsh is a login
-   shell?
+  On POSIX machines ^C and ^Z do not work when tcsh is a login shell?
 
    Make sure that the interrupt character is set to ^C and suspend is set
-   to  ^Z;  'stty -a' will show you the current stty settings; 'stty intr
-   ^C susp ^Z' will set them to ^C and ^Z respectively.
-     _________________________________________________________________
+   to ^Z; stty -a will show you the current stty settings; stty intr ^C
+   susp ^Z will set them to ^C and ^Z respectively.
 
-   16.  I  am trying to compile tcsh and I am getting compile errors that
-   look like:
+  I am trying to compile tcsh and I am getting compile errors that look like:
 
-    >sh.c:???: `STR???' undeclared, outside of functions [gcc]
-    >"sh.c", line ???: STR??? undefined [cc]
+    sh.c:???: `STR???' undeclared, outside of functions [gcc]
+    "sh.c", line ???: STR??? undefined [cc]
 
-   You  interrupted make, while it was making the automatically generated
-   headers. Type 'make clean; make'
-     _________________________________________________________________
+   You interrupted make, while it was making the automatically generated
+   headers. Type make clean; make
 
-   17. On the cray, sometimes the CR/LF mapping gets screwed up.
+  On the cray, sometimes the CR/LF mapping gets screwed up.
 
-   You  are  probably  logged  in  to the cray via telnet. Cray's telnetd
-   implements  line  mode  selection the telnet client you are using does
-   not  implement  telnet line mode. This cause the Cray's telnetd to try
-   to use KLUDGELINEMODE. You can turn off telnet line mode from the cray
-   side  by doing a "stty -extproc", or you can get the Cray AIC to build
-   a  telnetd  without  KLUDGELINEMODE,  or  you can compile a new telnet
-   client  (from  the  BSD net2 tape), or at least on the suns use: 'mode
-   character'.
-     _________________________________________________________________
+   You are probably logged in to the cray via telnet. Cray's telnetd
+   implements line mode selection the telnet client you are using does not
+   implement telnet line mode. This cause the Cray's telnetd to try to use
+   KLUDGELINEMODE. You can turn off telnet line mode from the cray side by
+   doing a stty -extproc, or you can get the Cray AIC to build a telnetd
+   without KLUDGELINEMODE, or you can compile a new telnet client (from
+   the BSD net2 tape), or at least on the suns use: mode character.
 
-   18.  On AU/X, I made tcsh my startup shell, but the mac desktop is not
-   starting up (no X11 or Finder), and I only get console emulation.
+  On AU/X, I made tcsh my startup shell, but the mac desktop is not starting up
+  (no X11 or Finder), and I only get console emulation.
 
-   This is another manifestation of item 5. Just add the pathname to tcsh
-   in /etc/shells and everything should work fine.
-     _________________________________________________________________
+   Add the pathname to tcsh in /etc/shells and everything should work
+   fine.
 
-   19.  On  machines  that  use  YP (NIS) tilde expansion might end up in
-   /dev/null
+  On machines that use YP (NIS) tilde expansion might end up in /dev/null
 
-   If  this happens complain to your vendor, to get a new version of NIS.
+   If this happens complain to your vendor, to get a new version of NIS.
    You can fix that in tcsh by defining YPBUGS in config.h
-     _________________________________________________________________
 
-   20.  Script on SGI 4.0.5 does not give us a tty, so we cannot have job
-   control.
+  Script on SGI 4.0.5 does not give us a tty, so we cannot have job control.
 
    Their csh does not have job control either. Try:
-
         % script
         % cat > /dev/tty
-     _________________________________________________________________
 
-   21. I start tcsh and it takes a couple of minutes to get the prompt.
+  I start tcsh and it takes a couple of minutes to get the prompt.
 
-   You  have  defined  REMOTEHOST  and your DNS is not responding. Either
+   You have defined REMOTEHOST and your DNS is not responding. Either
    undefine REMOTEHOST and recompile or fix your DNS.
-     _________________________________________________________________
-
-   22. If you need help generating your .cshrc file, check out:
 
-        http://www.imada.sdu.dk/~blackie/dotfile/
+  If you need help generating your .cshrc file, check out:
 
-   or
-        http://www.dotfiles.com
-     _________________________________________________________________
+     * https://github.com/tcsh-org/tcsh/blob/master/dot.tcshrc
+     * https://github.com/tcsh-org/tcsh/blob/master/dot.login
 
-   23.  On  POSIX  systems  the  kernel  will send hup signals to all the
-   processes in the foreground process group if 'stty hupcl' is set.
+  On POSIX systems the kernel will send hup signals to all the processes in the
+  foreground process group if ‘stty hupcl’ is set.
 
    For example
-
     ./tcsh
     echo $$
     591
@@ -240,65 +193,51 @@
 
    Will kill everything, since hup will be sent to all tcsh processes. To
    avoid that you can set stty -hupcl, but it is not recommended.
-     _________________________________________________________________
 
-   24. When I rsh the meta key stops working on the remote machine.
+  When I rsh the meta key stops working on the remote machine.
 
-   Try  using rsh -8; this option is undocumented on some systems, but it
-   works.  If  that does not work, get and use ssh/sshd. You'll be better
+   Try using rsh -8; this option is undocumented on some systems, but it
+   works. If that does not work, get and use ssh/sshd. You'll be better
    off from a security point of view anyway.
-     _________________________________________________________________
 
-   25.  Tcsh  compiled  under  hp/ux-10.x  does  not pass resource limits
-   correctly when ran on hp/ux-11.x systems.
+  Tcsh compiled under hp/ux-10.x does not pass resource limits correctly when
+  ran on hp/ux-11.x systems.
 
-   This  is  a  problem  with  lack  of ABI compatibility between the two
+   This is a problem with lack of ABI compatibility between the two
    systems. The only solution is to recompile.
-     _________________________________________________________________
 
-   26. Refreshing in command line editing can appear broken on some OS's
+  Refreshing in command line editing can appear broken on some OS's
 
-   This  is  because  the  termcap/terminfo  description  lies  about the
-   ability  of  the  terminal  to  use tabs. At least on Compaq/DEC Alpha
-   OSF/1 3.x and 4.x systems, stty -tabs will cause problems.
-     _________________________________________________________________
+   This is because the termcap/terminfo description lies about the ability
+   of the terminal to use tabs. At least on Compaq/DEC Alpha OSF/1 3.x and
+   4.x systems, stty -tabs will cause problems.
 
-   27. Where can I learn the merits of tcsh vs. bash vs. csh vs. sh etc?
+  Where can I learn the merits of tcsh vs. bash vs. csh vs. sh etc?
 
-   You  can  read  the  manual page section titled [NEW FEATURES] listing
+   You can read the manual page section titled [NEW FEATURES] listing
    features that tcsh adds to csh.
 
-   You  can read Tom Christiansen's [Csh Programming Considered Harmful],
-   a  document advocating that csh (and by extension, tcsh) should not be
+   You can read Tom Christiansen's Csh Programming Considered Harmful, a
+   document advocating that csh (and by extension, tcsh) should not be
    used for writing shell scripts.
 
-   XXX:  Need  to  find something about [bash], but bash is sh-compatible
-   and  has  many  of  the  same  interactive  features  of tcsh (command
-   completion does not appear to be as flexible, though).
-
-   [Curtains  up:  introducing  the Z shell] has a pretty good rundown on
-   zsh.  Aside  from  the arguments about csh being evil, tcsh appears to
-   compare  well  with zsh [zsh]. Zsh is sh and ksh compatible, with many
-   of the interactive features of tcsh.
-     _________________________________________________________________
-
-   28.  Why  does  FreeBSD's  tcsh do history browsing differently than I
-   expect?
+   XXX: Need to find something about bash, but bash is sh-compatible and
+   has many of the same interactive features of tcsh (command completion
+   does not appear to be as flexible, though).
 
-   On    FreeBSD,    by    default,    the    up    arrow   is   set   to
-   "history-search-backward",  rather than the default "up-history". As a
-   result,  if  you  type (part of) a word and press up arrow, you'll see
-   previous  commands  that  match  the  prefix. Pretty useful, actually,
-   although  it  takes  some  getting used to. You can use bindkey to see
-   your settings, and to rebind up & down differently if desired.
-     _________________________________________________________________
+   Curtains up: introducing the Z shell has a pretty good rundown on zsh.
+   Aside from the arguments about csh being evil, tcsh appears to compare
+   well with zsh. Zsh is sh and ksh compatible, with many of the
+   interactive features of tcsh.
 
-   Everything else is a bug :-(
+  Why does FreeBSD's tcsh do history browsing differently than I expect?
 
-   Christos
-     _________________________________________________________________
+   On FreeBSD, by default, the up arrow is set to history-search-backward,
+   rather than the default up-history. As a result, if you type (part of)
+   a word and press up arrow, you'll see previous commands that match the
+   prefix. Pretty useful, actually, although it takes some getting used
+   to. You can use bindkey to see your settings, and to rebind up & down
+   differently if desired.
+     __________________________________________________________________
 
-   Home | RecentChanges | Preferences
-   Edit text of this page | View other revisions
-   Last edited April 29, 2004 15:02 (diff)
-   Search: ____________________
+   Page content last updated on 2019-12-31
diff --git a/contrib/tcsh/Fixes b/contrib/tcsh/Fixes
index db401f23fad0..e539c8241a86 100644
--- a/contrib/tcsh/Fixes
+++ b/contrib/tcsh/Fixes
@@ -1,3 +1,25 @@
+ 14. Don't crash with 'bindkey "^0" clear-screen' (Karl Jeacle)
+ 13. Fix $x:q:h and $x:q:t return the whole string for strings not containing /
+ 12. V6.22.03 - 20201118
+ 11. Fix $x:q:h and $x:q:t to not crash (alzwded) with strings containing /
+ 10. Block SIGHUP while writing history/directory stack (Brett Frankenberger)
+  9. Fixed reversed test that broke history merging (Brett Frankenberger)
+  8. Prevent recursive entry for writing history (Brett Frankenberger)
+  7. alxwded at github, keep track of the :g and :a modifiers per modifier they
+     affect.
+  6. alzwded at github, fix infinite loop with :gas variable modifier
+  5. PR/88: Add a Q: modifier that preserves empty arguments leaving :q
+     alone.
+  4. V6.22.02 - 20191204
+  3. Fix version in configure.ac
+  2. V6.22.01 - 20191201
+  1. undo PR/88: Preserve empty arguments in :q, since it breaks
+	$ set x=""
+	$ alias test "echo "\""$x:q"\"" is working."
+	$ alias test
+	echo "
+
+  6. V6.22.00 - 20191128
   5. PR/113: Sobomax: avoid infinite loops for -c commands when stdout is
      not a tty.
   4. Avoid infinite loops during history loads when merging, print a better
@@ -6,6 +28,7 @@
   2. PR/94: Small apple issues (SAVESIGVEC, HOSTTYPE)
   1. PR/81: Fix range matching issue where we were comparing with the
      range character instead of the start of range. [l-z]* would match foo
+
  12. V6.21.00 - 20190508
  11. Abort history loading on words and lines too long
      https://bugzilla.redhat.com/show_bug.cgi?id=1598502
diff --git a/contrib/tcsh/Imakefile b/contrib/tcsh/Imakefile
index be2bebe17ca9..bd1b43b1a24e 100644
--- a/contrib/tcsh/Imakefile
+++ b/contrib/tcsh/Imakefile
@@ -492,14 +492,15 @@ SHSRCS=	sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c \
 	sh.char.c sh.exp.c sh.file.c sh.func.c \
 	sh.glob.c sh.hist.c sh.init.c sh.lex.c \
 	sh.misc.c sh.parse.c sh.print.c sh.proc.c \
-	sh.sem.c sh.set.c sh.time.c glob.c \
+	sh.sem.c sh.set.c sh.time.c dotlock.c dotlock.h glob.c \
 	sh.char.h sh.dir.h sh.proc.h sh.h \
 	sh.decls.h glob.h ${SYSSRCS}
 SHOBJS=	sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
 	sh.char.${SUF} sh.exp.${SUF} sh.file.${SUF} sh.func.${SUF} \
 	sh.glob.${SUF} sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} \
 	sh.misc.${SUF} sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} \
-	sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} glob.${SUF} ${SYSOBJS}
+	sh.sem.${SUF} sh.set.${SUF} sh.time.${SUF} dotlock.${SUF} glob.${SUF} \
+	${SYSOBJS}
 
 TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
 	tw.comp.c tw.color.c
@@ -512,9 +513,10 @@ EDOBJS=	ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
 	ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
 
 TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
-	tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
-	tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
-	tc.who.c tc.h 
+	tc.func.c tc.nls.c tc.nls.h tc.os.c tc.os.h tc.printf.c tc.prompt.c \
+	tc.disc.${SUF} tc.func.${SUF} tc.nls.${SUF} tc.os.${SUF} \
+	tc.printf.${SUF} tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h \
+	tc.vers.c tc.wait.h tc.who.c tc.h 
 TCOBJS=	tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.defs.${SUF} \
 	tc.disc.${SUF} tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
 	tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
@@ -524,7 +526,7 @@ MISCF = Makefile.std BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md \
 	FAQ WishList config_f.h eight-bit.me glob.3 patchlevel.h pathnames.h \
 	tcsh.man Ported src.desc Imakefile imake.config complete.tcsh \
 	Makefile.vms termcap.vms snames.h host.defs gethost.c tcsh.man2html \
-	Makefile.in configure.ac Makefile.win32 aclocal.m4
+	Makefile.in configure.ac Makefile.win32 aclocal.m4 dot.login dot.tcshrc
 CONFSRCS=config/[a-z]*
 
 
diff --git a/contrib/tcsh/Makefile.ADMIN b/contrib/tcsh/Makefile.ADMIN
new file mode 100644
index 000000000000..5ad3bb8fb3c5
--- /dev/null
+++ b/contrib/tcsh/Makefile.ADMIN
@@ -0,0 +1,24 @@
+#
+# Makefile.ADMIN
+#
+# Maintenance tasks
+#
+# You can refetch files from the website, then run "git diff" to
+# sanity check any changes before committing.
+#
+
+LYNX=	lynx -dump -nolist
+TRIM=	expand | sed -e 's/^  *$$//' | cat -s
+WEB=	https://www.tcsh.org
+
+PAGES=	FAQ
+
+all: ${PAGES}
+
+.for i in ${PAGES}
+$i: force
+	${LYNX} ${WEB}/${i:tl}/ | ${TRIM} > ${.TARGET}
+.endfor
+
+.DUMMY: force
+force:
diff --git a/contrib/tcsh/Makefile.in b/contrib/tcsh/Makefile.in
index 210b7de72dfe..c6b5f2554cc0 100644
--- a/contrib/tcsh/Makefile.in
+++ b/contrib/tcsh/Makefile.in
@@ -6,6 +6,7 @@
 # things; Paul Placeway, CIS Dept., Ohio State University
 #
 SHELL=/bin/sh
+ENVCMD=/usr/bin/env
 VERSION=@PACKAGE_VERSION@
 BUILD=tcsh$(EXEEXT)
 VPATH=@srcdir@
@@ -410,7 +411,7 @@ AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
 	pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
 	complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
 	gethost.c tcsh.man2html configure.ac configure config.h.in \
-	tests/testsuite.at aclocal.m4
+	tests/testsuite.at aclocal.m4 dot.login dot.tcshrc
 TESTFILES= tests/aliases.at tests/arguments.at tests/commands.at \
 	tests/expr.at tests/lexical.at tests/mb-eucjp.at \
 	tests/mb-utf8.at tests/noexec.at tests/parenthesis.at tests/syntax.at \
@@ -634,6 +635,8 @@ veryclean: clean
 	${RM} -f Makefile config.h config_p.h
 	${RM} -f config.status config.cache config.log tcsh.ps
 	${RM} -f missing
+	${RM} -f testsuite.log
+	${RM} -rf testsuite.dir
 	${RM} -rf autom4te.cache
 	${RM} -f *~ #*
 
@@ -735,8 +738,10 @@ $(srcdir)/stamp-h.in: $(srcdir)/configure.ac
 	cd $(srcdir) && autoheader
 	@echo timestamp > $(srcdir)/stamp-h.in
 
-check: atconfig $(srcdir)/tests/testsuite
-	$(SHELL) $(srcdir)/tests/testsuite
+check test: atconfig $(srcdir)/tests/testsuite
+	$(ENVCMD) - \
+		USER="$(USER)" \
+		$(SHELL) $(srcdir)/tests/testsuite
 
 #
 # Dependencies
diff --git a/contrib/tcsh/Makefile.std b/contrib/tcsh/Makefile.std
index 3466d4ceac86..8c479fa1f213 100644
--- a/contrib/tcsh/Makefile.std
+++ b/contrib/tcsh/Makefile.std
@@ -320,7 +320,7 @@ AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
 	pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
 	complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
 	gethost.c tcsh.man2html configure.ac configure config.h.in \
-	aclocal.m4
+	aclocal.m4 dot.login dot.tcshrc
 
 VHSRCS=${PVSRCS} ${AVSRCS}
 
diff --git a/contrib/tcsh/Makefile.vms b/contrib/tcsh/Makefile.vms
index bc241147e253..2e3f4adbfed4 100644
--- a/contrib/tcsh/Makefile.vms
+++ b/contrib/tcsh/Makefile.vms
@@ -297,7 +297,7 @@ AVSRCS= BUILDING Fixes MAKEDIFFS MAKESHAR NewThings README.md FAQ \
 	WishList config_f.h eight-bit.me glob.3 patchlevel.h \
 	pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
 	complete.tcsh vmsreadme.txt termcap.vms snames.h host.defs \
-	gethost.c tcsh.man2html configure.ac aclocal.m4
+	gethost.c tcsh.man2html configure.ac aclocal.m4 dot.login dot.tcshrc
 
 VHSRCS=${PVSRCS} ${AVSRCS}
 
diff --git a/contrib/tcsh/README.md b/contrib/tcsh/README.md
index 58a30738daa6..df6671b0316e 100644
--- a/contrib/tcsh/README.md
+++ b/contrib/tcsh/README.md
@@ -5,7 +5,7 @@
 The Tcsh source code is available on GitHub as a read-only repo
 mirror at:
 
-> http://github.com/tcsh-org/tcsh
+> https://github.com/tcsh-org/tcsh
 
 Instructions for compiling Tcsh can be found in [BUILDING].
 
@@ -20,7 +20,10 @@ the tcsh mailing list:
 > https://mailman.astron.com/mailman/listinfo/tcsh
 
 [![Build Status][status]][travis]
+[![Coverity Scan][badge]][coverity]
 
 [BUILDING]: BUILDING
-[status]: https://travis-ci.org/tcsh-org/tcsh.svg?branch=master
-[travis]: https://travis-ci.org/tcsh-org/tcsh
+[badge]: https://scan.coverity.com/projects/20307/badge.svg
+[coverity]: https://scan.coverity.com/projects/tcsh-org-tcsh
+[status]: https://travis-ci.com/tcsh-org/tcsh.svg?branch=master
+[travis]: https://travis-ci.com/tcsh-org/tcsh
diff --git a/contrib/tcsh/configure b/contrib/tcsh/configure
index 4e724c2bfb80..27a6bec356a0 100755
--- a/contrib/tcsh/configure
+++ b/contrib/tcsh/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcsh 6.21.00.
+# Generated by GNU Autoconf 2.69 for tcsh 6.22.03.
 #
 # Report bugs to <https://bugs.astron.com/>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcsh'
 PACKAGE_TARNAME='tcsh'
-PACKAGE_VERSION='6.21.00'
-PACKAGE_STRING='tcsh 6.21.00'
+PACKAGE_VERSION='6.22.03'
+PACKAGE_STRING='tcsh 6.22.03'
 PACKAGE_BUGREPORT='https://bugs.astron.com/'
 PACKAGE_URL=''
 
@@ -628,10 +628,10 @@ BUILD_CATALOGS
 HESLIB
 HESDEF
 DFLAGS
-LTLIBICONV
-LIBICONV
 CC_FOR_GETHOST
 GENCAT
+LTLIBICONV
+LIBICONV
 EGREP
 GREP
 CPP
@@ -1250,7 +1250,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 tcsh 6.21.00 to adapt to many kinds of systems.
+\`configure' configures tcsh 6.22.03 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1315,7 +1315,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcsh 6.21.00:";;
+     short | recursive ) echo "Configuration of tcsh 6.22.03:";;
    esac
   cat <<\_ACEOF
 
@@ -1411,7 +1411,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcsh configure 6.21.00
+tcsh configure 6.22.03
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2174,7 +2174,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tcsh $as_me 6.21.00, which was
+It was created by tcsh $as_me 6.22.03, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2723,278 +2723,222 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking cached host tuple" >&5
-$as_echo_n "checking cached host tuple... " >&6; }
-if { test x"${ac_cv_host_system_type+set}" = x"set" &&
-     test x"$ac_cv_host_system_type" != x"$host"; }; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: different" >&5
-$as_echo "different" >&6; }
-  as_fn_error $? "remove config.cache and re-run configure" "$LINENO" 5
+
+      if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-ac_cv_host_system_type="$host"
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
 
-case "${host}" in
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ## Alpha (DEC) machines.
-  alpha*-dec-osf* )
-    tcsh_config_file=decosf1
-  ;;
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  ## Ultrix
-  *-dec-ultrix* )
-    tcsh_config_file=ultrix
-  ;;
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
 
-  ## DGUX
-  *-dg-dguxR4* )
-    tcsh_config_file=dgux5.4
-  ;;
-  m88k-dg-dgux5.4R* )
-    tcsh_config_file=dgux5.4
-  ;;
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-  ## HP/UX
-  *-hp-hpux7* )
-    tcsh_config_file=hpux7
-  ;;
-  *-hp-hpux[89]* )
-    tcsh_config_file=hpux8
-  ;;
-  *-hp-hpux1[0-9]* )
-    tcsh_config_file=hpux11
-  ;;
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  ## IBM AIX systems
-  *-ibm-aix*)
-    tcsh_config_file=aix
-  ;;
 
-  ## SX-4
-  sx4-nec-*)
-    CC='cc -h0,ansi,novector,float0'
-    LDFLAGS='-Gsmall'
-    tcsh_config_file=superux8
-  ;;
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
*** 5135 LINES SKIPPED ***


More information about the dev-commits-src-all mailing list